Need to find out why: vim对于.flex后缀文件无法识别为.lex文件的solution(适用于其他后缀文件)

google: how to get extend from a file

sudo vim /usr/share/vim/vimrc

在打开的文件里加上这几句:

let s:extension = expand('%:e')

  set syntax=lex

endif

 

ps:

:e Extension of the file name.

vim help doc:     http://vimdoc.sourceforge.net/index.php

posted @ 2014-10-29 00:09  昭瑶  阅读(186)  评论(0编辑  收藏  举报