不知道是不是vim的bug
最近需要测试一个东西,所以反复安装了几次debian,发现以下2个问题。
1 /etc/vim/vimrc中有这么一段
" Uncomment the following to have Vim jump to the last position when
" reopening a file
" if has("autocmd")
" au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
" \| exe normal g'\"" | endif
" endif
这段应该是用来让vim每次打开文件的时候跳到上次编辑的位置的。可是我去掉if
到endif段前面的引号后,会提示出错。按照redhat中的修改为下面这样就没问题
了。
if has("autocmd")
" In text files, always limit the width of text to 78 characters
autocmd BufRead *.txt set tw=78
" When editing a file, always jump to the last cursor position
autocmd BufReadPost *
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
\ exe "normal g'\"" |
\ endif
endif
具体里面的内容没有细看,看着是差不多的。
2 新安装的vim编辑网页文件(php、html)的时候,会出现下面的错误。
处理 /usr/share/vim/vim64/syntax/css.vim 时发生错误:
DD 41:
E16: 不正确的范围
E475: Invalid argument: cssIdentifier "#[A-Za-zà-?_@][A-Za-zà-?0-9_@-]*"
上vim的网站可以找到这个css.vim,替换debian中的之后就没有问题了。
我用的源是mirror.vmmatrix.net的testing,vim版本是6.4.7。
--
wd <wd.afei#gmail.com>
Reply to: