轉自http://blog.csdn.net/lujun9972/article/details/46002881
woman實現了Emacs中man(或manual-entry)命令的一個子集,而不用調用任何外部程序
所有WoMan的相關命令和變量都以前綴woman-
開頭(偶爾也以WoMan-
開頭)
通過命令woman-mini-help
可以獲得WoMan相關命令和變量的簡要說明
WoMan提供了三種user interface來查看man文檔
topic interface
filename interface
automatic interface
=============
使用Topic interface前,需要先告訴WoMan去哪里查找man文檔. 默認情況下WoMan使用man的設置,但也可以自定義配置,有兩個相關變量:
woman-manpath
the elements of `woman-manpath’ must be directories that contain directories of man files
woman-path
the elements of `woman-path’ must be directories that contain man files directly.
============= 在第一次使用Topic interface時,WoMan會將man文檔內容緩沖起來,如果緩沖的內容和實際內容不對時,可以使用C-u M-x woman
來重建緩存. 只有在man文件的名字或地址改變時才需要重建緩存,如果僅僅是文件內容變了,則不用重建緩存.
woman-cache-level
不同的level緩存的信息也不一樣.
woman-cache-filename
一般情況下,WoMan在內存中建立緩存. 但通過設置該值可以讓WoMan將緩存保存起來下次使用. 默認情況下該值為nil表示不保存.
woman-find-file
woman-dired-find-file
在dired-mode下,可以用該命令查看光標所在的man文檔,一般綁定到W或w
woman-tar-extract-file
在tar-mode下,可以用該命令查看光標所在的man文檔,一般綁定到W或w
woman-decode-buffer
將當前buffer內容當成man文檔內容來查看.
Automatic Interface下,Emacs會自動檢測所打開文件的格式,若為man格式的文檔,則自動解碼.
;在.emacs中加入如下代碼(autoload 'woman-decode-region "woman")(add-to-list 'format-alist '(man "Unix man-page source format" "http://.//(TH//|ig//) " woman-decode-region nil nil (lambda (arg) set-visited-file-name (file-name-sans-extension buffer-file-name))))SPC
下翻一頁
DEL
上翻一頁
Nn
移動到下N個section-默認情況下是1個section
Np
移動上上一個section-默認情況下是1個section
g
定位到指定的section
s
定位到”SEE ALSO” section
r
跳轉到指定的鏈接.
Mouse-2 / RET
跳轉到光標所在的鏈接
m
運行shell命令man
,它讀取minibuffer中輸入的關鍵字取得Unix的manual page,并且在buffer中顯示出來
w
運行另一個WoMan
q
退出包含當前man page的buffer(不會關閉原buffer,只是跳到其他buffer中)
k
關閉包含當前man page的buffer
M-p
跳到上一個WoMan buffer
M-n
跳到下一個WoMan buffer
R
重新格式化最后一個被WoMan格式化過的man page
< / .
跳到當前buffer的最開頭位置,并在原位置加mark
>
跳到當前buffer的最末尾位置,并在原位置加mark
?
顯示當前mode的說明文檔
新聞熱點
疑難解答