Due to my recent work need to use Vim and linux shell programming, I gathered some nice articles about self-learning those relative knowledge. Here I share them for you , hope it does work first, you need some shell exprience. Bash Guide for
需要在編輯器中臨時啟用的話,按照如下所以完成即可開啟CSS::set omnifunc=csscomplete#CompleteCSS 開啟HTML::set omnifunc=htmlcomplete#CompleteTags 自動開啟時需要在~/.vimrc中進行配置:autocmd FileType css set omnifunc=csscomplete#CompleteCSSautocmd FileType html set omnifunc=htmlcomplete#Complete
1, 首先安裝通用的vim pkg_add vim2,伺服器上的vim外掛程式不夠豐富,我這裡提供了外掛程式包,解壓到linux目錄下/Files/kungfupanda/vimsettings.rar3, copy pluin (在上述的壓縮檔中) 解壓上述檔案,拷貝所有檔案到自己的 vim71/plugin下 cp *.vim /usr/local/share/vim/vim71/plugin4, install vim 輸入vim , then in vim 執行
從別的編輯器裡粘貼到vim裡的代碼經常由於不正常的縮排變得格式混亂。在vim的官方FAQ (http://vimdoc.sourceforge.net/cgi-bin/vimfaq2html3.pl)找到的:格式化全文: gg=G自動縮排當前行: ==這個是原文節選:14.6. How do I format/indent an entire file?You can format/indent an entire file using the gg=G command, where
作者:gnuhpc 出處:http://www.cnblogs.com/gnuhpc/在VIM下用cscope讀源碼,隨手在檔案中寫點注釋什麼的,但是在跳轉的時候必須儲存才能跳轉,否則提示No write since last change,這個原理我明白的,不過能不能暫時不儲存或者自動儲存呢,每次跳轉都要:w太麻煩……有兩種方法可以解決:set autowrite 可以自動儲存 set hidden 放在buffer裡不儲存,等跳回來再儲存。 作者:gnuhpc
Vim 可以很好的編輯各種字元編碼的檔案,包括 UCS-2、UTF-8 等流行的 Unicode 編碼方式:Vim 有四個跟字元編碼方式有關的選項,encoding、fileencoding、fileencodings、termencoding,它們的意義如下:* encoding: Vim 內部使用的字元編碼方式,包括 Vim 的 buffer (緩衝區)、菜單文本、訊息文本等;* fileencoding: Vim 中當前編輯的檔案的字元編碼方式,Vim