天天看點

txt.vim : Universal syntax script for all txt docs, logs and other types

http://vim.sourceforge.net/scripts/script.php?script_id=1532

增加txt檔案的顯示效果,如圖:

<a href="http://www.haze.ehost.pl/pub/vim/txt-default.png" target="_blank">http://www.haze.ehost.pl/pub/vim/txt-default.png</a>

方法如下:

1.下載下傳txt.vim 檔案,放入systax目錄.

2.按照作者的介紹要識别txt檔案,必須如下操作:

I'd also suggest to add a file into your $HOME/ftdetect called txt.vim that contains a line:

au BufRead,BufNewFile * setfiletype txt

This way if Vim cannot detect a filetype of a file you've just opened - it sets this universal syntax.

我直接加入_vimrc檔案,現在看txt檔案好多了!