[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: 不知道是不是vim的bug



On 3/20/06, wd <wd.afei@gmail.com> wrote:
>
> 最近需要测试一个东西,所以反复安装了几次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_@-]*"
        对,这里是有点问题,你是使用gbk/gb2312的吧?使用utf8就没有问题
        使用gb2312/gbk自己修改一下这一句也可以
>
> 上vim的网站可以找到这个css.vim,替换debian中的之后就没有问题了。
>
> 我用的源是mirror.vmmatrix.net的testing,vim版本是6.4.7。
>
> --
> wd <wd.afei#gmail.com>
>
>
> --
> To UNSUBSCRIBE, email to debian-chinese-gb-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>


--
                                                           Yours,
                                                            swhe

Reply to: