轉(zhuǎn)自http://blog.csdn.net/lujun9972/article/details/46002881
woman實(shí)現(xiàn)了Emacs中man(或manual-entry)命令的一個(gè)子集,而不用調(diào)用任何外部程序
所有WoMan的相關(guān)命令和變量都以前綴woman-
開頭(偶爾也以WoMan-
開頭)
通過命令woman-mini-help
可以獲得WoMan相關(guān)命令和變量的簡(jiǎn)要說明
WoMan提供了三種user interface來查看man文檔
topic interface
filename interface
automatic interface
=============
使用Topic interface前,需要先告訴WoMan去哪里查找man文檔. 默認(rèn)情況下WoMan使用man的設(shè)置,但也可以自定義配置,有兩個(gè)相關(guān)變量:
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時(shí),WoMan會(huì)將man文檔內(nèi)容緩沖起來,如果緩沖的內(nèi)容和實(shí)際內(nèi)容不對(duì)時(shí),可以使用C-u M-x woman
來重建緩存. 只有在man文件的名字或地址改變時(shí)才需要重建緩存,如果僅僅是文件內(nèi)容變了,則不用重建緩存.
woman-cache-level
不同的level緩存的信息也不一樣.
woman-cache-filename
一般情況下,WoMan在內(nèi)存中建立緩存. 但通過設(shè)置該值可以讓W(xué)oMan將緩存保存起來下次使用. 默認(rèn)情況下該值為nil表示不保存.
woman-find-file
woman-dired-find-file
在dired-mode下,可以用該命令查看光標(biāo)所在的man文檔,一般綁定到W或w
woman-tar-extract-file
在tar-mode下,可以用該命令查看光標(biāo)所在的man文檔,一般綁定到W或w
woman-decode-buffer
將當(dāng)前buffer內(nèi)容當(dāng)成man文檔內(nèi)容來查看.
Automatic Interface下,Emacs會(huì)自動(dòng)檢測(cè)所打開文件的格式,若為man格式的文檔,則自動(dòng)解碼.
;在.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
下翻一頁(yè)
DEL
上翻一頁(yè)
Nn
移動(dòng)到下N個(gè)section-默認(rèn)情況下是1個(gè)section
Np
移動(dòng)上上一個(gè)section-默認(rèn)情況下是1個(gè)section
g
定位到指定的section
s
定位到”SEE ALSO” section
r
跳轉(zhuǎn)到指定的鏈接.
Mouse-2 / RET
跳轉(zhuǎn)到光標(biāo)所在的鏈接
m
運(yùn)行shell命令man
,它讀取minibuffer中輸入的關(guān)鍵字取得Unix的manual page,并且在buffer中顯示出來
w
運(yùn)行另一個(gè)WoMan
q
退出包含當(dāng)前man page的buffer(不會(huì)關(guān)閉原buffer,只是跳到其他buffer中)
k
關(guān)閉包含當(dāng)前man page的buffer
M-p
跳到上一個(gè)WoMan buffer
M-n
跳到下一個(gè)WoMan buffer
R
重新格式化最后一個(gè)被WoMan格式化過的man page
< / .
跳到當(dāng)前buffer的最開頭位置,并在原位置加mark
>
跳到當(dāng)前buffer的最末尾位置,并在原位置加mark
?
顯示當(dāng)前mode的說明文檔
新聞熱點(diǎn)
疑難解答
圖片精選