Skip navigation.

Log in | Sign up

photo of Yunt

云一样的梦…

只是当时已惘然

一条命令得到vim syntax目录中的词典

[yurt@yurt ~] [18:51:17 ]
<2 files 50M >
>>>for i in /usr/share/vim/vim70/syntax/*;do cat $i | grep keyword | grep -v nextgroup | \
awk '{ $1=""; $2=""; $3=""; print}' | perl -pe 's/\s+/\n/g' | grep -v contained | grep -v '^$' | \
sort | uniq>~/.vim/dict/`basename $i .vim`.dict;done

这样能得到/usr/share/vim/vim70/syntax目录下所有格式的字典文件
不过这么多的字典文件大多数都是没有的

可以简化成这样得到特定的字典文件:
[yurt@yurt ~] [18:51:17 ]
<2 files 50M >
>>>cat /usr/share/vim/vim70/syntax/FILENAME | grep keyword | grep -v nextgroup | \
awk '{ $1=""; $2=""; $3=""; print}' | perl -pe 's/\s+/\n/g' | grep -v contained | grep -v '^$' | \
sort | uniq > /home/user/.vim/dict/FILENAME.dict

替换FILENAME就行了!


记得吗?你的祖先名叫炎黄。Python线程编程(一)线程对象

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies