gVim设置

来源:互联网 发布:阿尔法淘宝复制软件 编辑:程序博客网 时间:2024/05/19 22:50

【vim的下载与安装】

1. 在线安装

直接shell中输入如下命令:

[plain] view plain copy
 在CODE上查看代码片派生到我的代码片
  1. sudo apt-get install vim (ubuntu)  
  2. yum install vim (redHat/Fedora/CentOS)  

linux会自动检测并下载安装。

2 手动下载编译安装

      截止当前最新版本是7.4(vim-7.4.tar.bz2),可在windows环境下载好,拷贝至linux环境安装,或直接linux命令行下载。这里给出 linux直接下载并编译安装(以下均为shell命令):
1). wget下载
wget 
ftp://ftp.vim.org/ftp/pub/vim/unix/vim-7.4.tar.bz2
(或用ftp命令登陆ftp://ftp.vim.org,get命令获取)

2). 解压 
bunzip2 vim-7.4.tar.bz2

3). 解压 
tar xvf vim-7.4.tar

4). 进入vim74(解压后的)目录,执行
./configure --disable-selinux --enable-cscope
(./configure -help 查看后面参数选项的含义)

5). 编译
make

6). 安装
make install

只要不出现error即代表成功安装,也可直接用vim命令来检测,或whatis vim(whereis vim)查看。通常情况下,许多发行版会默认安装vim,则可省略上述步骤。

【vim的初始化配置.vimrc】

1. 存放位置

      linux环境下vim的初始化配置文件为.vimrc, 通常有两个:系统版本和用户版本,前者不同发行版linux会有不同,一般位于/etc/vimrc,是整个系统vim的默认配置;后者位于~/.vimrc,是当前用户的vim配置,会覆盖系统配置。关于vim的其他配置参数文件位于/usr/local/share/vim/下,可进入vim,在命令模式下键入
:version (查看基本配置路径)
:echo $VIM
:echo $HOME(查看具体路径值)
~/.vimrc有时并不存在,此时用户可以建立一个.vimrc,放入主目录以实现自己的vim配置。

2. 主要命令参数
      .vimrc通常用于指定vim的编辑参数和外观环境。下面列出常用的命令参数及其含义:

<a target=_blank id="L1" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L1" rel="#L1" style="color: rgb(102, 102, 102); text-decoration: none;">   1</a><a target=_blank id="L2" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L2" rel="#L2" style="color: rgb(102, 102, 102); text-decoration: none;">   2</a><a target=_blank id="L3" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L3" rel="#L3" style="color: rgb(102, 102, 102); text-decoration: none;">   3</a><a target=_blank id="L4" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L4" rel="#L4" style="color: rgb(102, 102, 102); text-decoration: none;">   4</a><a target=_blank id="L5" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L5" rel="#L5" style="color: rgb(102, 102, 102); text-decoration: none;">   5</a><a target=_blank id="L6" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L6" rel="#L6" style="color: rgb(102, 102, 102); text-decoration: none;">   6</a><a target=_blank id="L7" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L7" rel="#L7" style="color: rgb(102, 102, 102); text-decoration: none;">   7</a><a target=_blank id="L8" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L8" rel="#L8" style="color: rgb(102, 102, 102); text-decoration: none;">   8</a><a target=_blank id="L9" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L9" rel="#L9" style="color: rgb(102, 102, 102); text-decoration: none;">   9</a><a target=_blank id="L10" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L10" rel="#L10" style="color: rgb(102, 102, 102); text-decoration: none;">  10</a><a target=_blank id="L11" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L11" rel="#L11" style="color: rgb(102, 102, 102); text-decoration: none;">  11</a><a target=_blank id="L12" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L12" rel="#L12" style="color: rgb(102, 102, 102); text-decoration: none;">  12</a><a target=_blank id="L13" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L13" rel="#L13" style="color: rgb(102, 102, 102); text-decoration: none;">  13</a><a target=_blank id="L14" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L14" rel="#L14" style="color: rgb(102, 102, 102); text-decoration: none;">  14</a><a target=_blank id="L15" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L15" rel="#L15" style="color: rgb(102, 102, 102); text-decoration: none;">  15</a><a target=_blank id="L16" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L16" rel="#L16" style="color: rgb(102, 102, 102); text-decoration: none;">  16</a><a target=_blank id="L17" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L17" rel="#L17" style="color: rgb(102, 102, 102); text-decoration: none;">  17</a><a target=_blank id="L18" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L18" rel="#L18" style="color: rgb(102, 102, 102); text-decoration: none;">  18</a><a target=_blank id="L19" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L19" rel="#L19" style="color: rgb(102, 102, 102); text-decoration: none;">  19</a><a target=_blank id="L20" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L20" rel="#L20" style="color: rgb(102, 102, 102); text-decoration: none;">  20</a><a target=_blank id="L21" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L21" rel="#L21" style="color: rgb(102, 102, 102); text-decoration: none;">  21</a><a target=_blank id="L22" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L22" rel="#L22" style="color: rgb(102, 102, 102); text-decoration: none;">  22</a><a target=_blank id="L23" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L23" rel="#L23" style="color: rgb(102, 102, 102); text-decoration: none;">  23</a><a target=_blank id="L24" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L24" rel="#L24" style="color: rgb(102, 102, 102); text-decoration: none;">  24</a><a target=_blank id="L25" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L25" rel="#L25" style="color: rgb(102, 102, 102); text-decoration: none;">  25</a><a target=_blank id="L26" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L26" rel="#L26" style="color: rgb(102, 102, 102); text-decoration: none;">  26</a><a target=_blank id="L27" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L27" rel="#L27" style="color: rgb(102, 102, 102); text-decoration: none;">  27</a><a target=_blank id="L28" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L28" rel="#L28" style="color: rgb(102, 102, 102); text-decoration: none;">  28</a><a target=_blank id="L29" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L29" rel="#L29" style="color: rgb(102, 102, 102); text-decoration: none;">  29</a><a target=_blank id="L30" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L30" rel="#L30" style="color: rgb(102, 102, 102); text-decoration: none;">  30</a><a target=_blank id="L31" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L31" rel="#L31" style="color: rgb(102, 102, 102); text-decoration: none;">  31</a><a target=_blank id="L32" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L32" rel="#L32" style="color: rgb(102, 102, 102); text-decoration: none;">  32</a><a target=_blank id="L33" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L33" rel="#L33" style="color: rgb(102, 102, 102); text-decoration: none;">  33</a><a target=_blank id="L34" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L34" rel="#L34" style="color: rgb(102, 102, 102); text-decoration: none;">  34</a><a target=_blank id="L35" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L35" rel="#L35" style="color: rgb(102, 102, 102); text-decoration: none;">  35</a><a target=_blank id="L36" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L36" rel="#L36" style="color: rgb(102, 102, 102); text-decoration: none;">  36</a><a target=_blank id="L37" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L37" rel="#L37" style="color: rgb(102, 102, 102); text-decoration: none;">  37</a><a target=_blank id="L38" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L38" rel="#L38" style="color: rgb(102, 102, 102); text-decoration: none;">  38</a><a target=_blank id="L39" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L39" rel="#L39" style="color: rgb(102, 102, 102); text-decoration: none;">  39</a><a target=_blank id="L40" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L40" rel="#L40" style="color: rgb(102, 102, 102); text-decoration: none;">  40</a><a target=_blank id="L41" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L41" rel="#L41" style="color: rgb(102, 102, 102); text-decoration: none;">  41</a><a target=_blank id="L42" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L42" rel="#L42" style="color: rgb(102, 102, 102); text-decoration: none;">  42</a><a target=_blank id="L43" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L43" rel="#L43" style="color: rgb(102, 102, 102); text-decoration: none;">  43</a><a target=_blank id="L44" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L44" rel="#L44" style="color: rgb(102, 102, 102); text-decoration: none;">  44</a><a target=_blank id="L45" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L45" rel="#L45" style="color: rgb(102, 102, 102); text-decoration: none;">  45</a><a target=_blank id="L46" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L46" rel="#L46" style="color: rgb(102, 102, 102); text-decoration: none;">  46</a><a target=_blank id="L47" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L47" rel="#L47" style="color: rgb(102, 102, 102); text-decoration: none;">  47</a><a target=_blank id="L48" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L48" rel="#L48" style="color: rgb(102, 102, 102); text-decoration: none;">  48</a><a target=_blank id="L49" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L49" rel="#L49" style="color: rgb(102, 102, 102); text-decoration: none;">  49</a><a target=_blank id="L50" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L50" rel="#L50" style="color: rgb(102, 102, 102); text-decoration: none;">  50</a><a target=_blank id="L51" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L51" rel="#L51" style="color: rgb(102, 102, 102); text-decoration: none;">  51</a><a target=_blank id="L52" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L52" rel="#L52" style="color: rgb(102, 102, 102); text-decoration: none;">  52</a><a target=_blank id="L53" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L53" rel="#L53" style="color: rgb(102, 102, 102); text-decoration: none;">  53</a><a target=_blank id="L54" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L54" rel="#L54" style="color: rgb(102, 102, 102); text-decoration: none;">  54</a><a target=_blank id="L55" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L55" rel="#L55" style="color: rgb(102, 102, 102); text-decoration: none;">  55</a><a target=_blank id="L56" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L56" rel="#L56" style="color: rgb(102, 102, 102); text-decoration: none;">  56</a><a target=_blank id="L57" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L57" rel="#L57" style="color: rgb(102, 102, 102); text-decoration: none;">  57</a><a target=_blank id="L58" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L58" rel="#L58" style="color: rgb(102, 102, 102); text-decoration: none;">  58</a><a target=_blank id="L59" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L59" rel="#L59" style="color: rgb(102, 102, 102); text-decoration: none;">  59</a><a target=_blank id="L60" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L60" rel="#L60" style="color: rgb(102, 102, 102); text-decoration: none;">  60</a><a target=_blank id="L61" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L61" rel="#L61" style="color: rgb(102, 102, 102); text-decoration: none;">  61</a><a target=_blank id="L62" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L62" rel="#L62" style="color: rgb(102, 102, 102); text-decoration: none;">  62</a><a target=_blank id="L63" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L63" rel="#L63" style="color: rgb(102, 102, 102); text-decoration: none;">  63</a><a target=_blank id="L64" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L64" rel="#L64" style="color: rgb(102, 102, 102); text-decoration: none;">  64</a><a target=_blank id="L65" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L65" rel="#L65" style="color: rgb(102, 102, 102); text-decoration: none;">  65</a><a target=_blank id="L66" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L66" rel="#L66" style="color: rgb(102, 102, 102); text-decoration: none;">  66</a><a target=_blank id="L67" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L67" rel="#L67" style="color: rgb(102, 102, 102); text-decoration: none;">  67</a><a target=_blank id="L68" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L68" rel="#L68" style="color: rgb(102, 102, 102); text-decoration: none;">  68</a><a target=_blank id="L69" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L69" rel="#L69" style="color: rgb(102, 102, 102); text-decoration: none;">  69</a><a target=_blank id="L70" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L70" rel="#L70" style="color: rgb(102, 102, 102); text-decoration: none;">  70</a><a target=_blank id="L71" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L71" rel="#L71" style="color: rgb(102, 102, 102); text-decoration: none;">  71</a><a target=_blank id="L72" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L72" rel="#L72" style="color: rgb(102, 102, 102); text-decoration: none;">  72</a><a target=_blank id="L73" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L73" rel="#L73" style="color: rgb(102, 102, 102); text-decoration: none;">  73</a><a target=_blank id="L74" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L74" rel="#L74" style="color: rgb(102, 102, 102); text-decoration: none;">  74</a><a target=_blank id="L75" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L75" rel="#L75" style="color: rgb(102, 102, 102); text-decoration: none;">  75</a><a target=_blank id="L76" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L76" rel="#L76" style="color: rgb(102, 102, 102); text-decoration: none;">  76</a><a target=_blank id="L77" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L77" rel="#L77" style="color: rgb(102, 102, 102); text-decoration: none;">  77</a><a target=_blank id="L78" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L78" rel="#L78" style="color: rgb(102, 102, 102); text-decoration: none;">  78</a><a target=_blank id="L79" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L79" rel="#L79" style="color: rgb(102, 102, 102); text-decoration: none;">  79</a><a target=_blank id="L80" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L80" rel="#L80" style="color: rgb(102, 102, 102); text-decoration: none;">  80</a><a target=_blank id="L81" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L81" rel="#L81" style="color: rgb(102, 102, 102); text-decoration: none;">  81</a><a target=_blank id="L82" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L82" rel="#L82" style="color: rgb(102, 102, 102); text-decoration: none;">  82</a><a target=_blank id="L83" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L83" rel="#L83" style="color: rgb(102, 102, 102); text-decoration: none;">  83</a><a target=_blank id="L84" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L84" rel="#L84" style="color: rgb(102, 102, 102); text-decoration: none;">  84</a><a target=_blank id="L85" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L85" rel="#L85" style="color: rgb(102, 102, 102); text-decoration: none;">  85</a><a target=_blank id="L86" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L86" rel="#L86" style="color: rgb(102, 102, 102); text-decoration: none;">  86</a><a target=_blank id="L87" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L87" rel="#L87" style="color: rgb(102, 102, 102); text-decoration: none;">  87</a><a target=_blank id="L88" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L88" rel="#L88" style="color: rgb(102, 102, 102); text-decoration: none;">  88</a><a target=_blank id="L89" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L89" rel="#L89" style="color: rgb(102, 102, 102); text-decoration: none;">  89</a><a target=_blank id="L90" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L90" rel="#L90" style="color: rgb(102, 102, 102); text-decoration: none;">  90</a><a target=_blank id="L91" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L91" rel="#L91" style="color: rgb(102, 102, 102); text-decoration: none;">  91</a><a target=_blank id="L92" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L92" rel="#L92" style="color: rgb(102, 102, 102); text-decoration: none;">  92</a><a target=_blank id="L93" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L93" rel="#L93" style="color: rgb(102, 102, 102); text-decoration: none;">  93</a><a target=_blank id="L94" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L94" rel="#L94" style="color: rgb(102, 102, 102); text-decoration: none;">  94</a><a target=_blank id="L95" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L95" rel="#L95" style="color: rgb(102, 102, 102); text-decoration: none;">  95</a><a target=_blank id="L96" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L96" rel="#L96" style="color: rgb(102, 102, 102); text-decoration: none;">  96</a><a target=_blank id="L97" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L97" rel="#L97" style="color: rgb(102, 102, 102); text-decoration: none;">  97</a><a target=_blank id="L98" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L98" rel="#L98" style="color: rgb(102, 102, 102); text-decoration: none;">  98</a><a target=_blank id="L99" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L99" rel="#L99" style="color: rgb(102, 102, 102); text-decoration: none;">  99</a><a target=_blank id="L100" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L100" rel="#L100" style="color: rgb(102, 102, 102); text-decoration: none;"> 100</a><a target=_blank id="L101" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L101" rel="#L101" style="color: rgb(102, 102, 102); text-decoration: none;"> 101</a><a target=_blank id="L102" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L102" rel="#L102" style="color: rgb(102, 102, 102); text-decoration: none;"> 102</a><a target=_blank id="L103" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L103" rel="#L103" style="color: rgb(102, 102, 102); text-decoration: none;"> 103</a><a target=_blank id="L104" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L104" rel="#L104" style="color: rgb(102, 102, 102); text-decoration: none;"> 104</a><a target=_blank id="L105" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L105" rel="#L105" style="color: rgb(102, 102, 102); text-decoration: none;"> 105</a><a target=_blank id="L106" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L106" rel="#L106" style="color: rgb(102, 102, 102); text-decoration: none;"> 106</a><a target=_blank id="L107" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L107" rel="#L107" style="color: rgb(102, 102, 102); text-decoration: none;"> 107</a><a target=_blank id="L108" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L108" rel="#L108" style="color: rgb(102, 102, 102); text-decoration: none;"> 108</a><a target=_blank id="L109" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L109" rel="#L109" style="color: rgb(102, 102, 102); text-decoration: none;"> 109</a><a target=_blank id="L110" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L110" rel="#L110" style="color: rgb(102, 102, 102); text-decoration: none;"> 110</a><a target=_blank id="L111" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L111" rel="#L111" style="color: rgb(102, 102, 102); text-decoration: none;"> 111</a><a target=_blank id="L112" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L112" rel="#L112" style="color: rgb(102, 102, 102); text-decoration: none;"> 112</a><a target=_blank id="L113" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L113" rel="#L113" style="color: rgb(102, 102, 102); text-decoration: none;"> 113</a><a target=_blank id="L114" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L114" rel="#L114" style="color: rgb(102, 102, 102); text-decoration: none;"> 114</a><a target=_blank id="L115" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L115" rel="#L115" style="color: rgb(102, 102, 102); text-decoration: none;"> 115</a><a target=_blank id="L116" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L116" rel="#L116" style="color: rgb(102, 102, 102); text-decoration: none;"> 116</a><a target=_blank id="L117" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L117" rel="#L117" style="color: rgb(102, 102, 102); text-decoration: none;"> 117</a><a target=_blank id="L118" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L118" rel="#L118" style="color: rgb(102, 102, 102); text-decoration: none;"> 118</a><a target=_blank id="L119" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L119" rel="#L119" style="color: rgb(102, 102, 102); text-decoration: none;"> 119</a><a target=_blank id="L120" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L120" rel="#L120" style="color: rgb(102, 102, 102); text-decoration: none;"> 120</a><a target=_blank id="L121" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L121" rel="#L121" style="color: rgb(102, 102, 102); text-decoration: none;"> 121</a><a target=_blank id="L122" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L122" rel="#L122" style="color: rgb(102, 102, 102); text-decoration: none;"> 122</a><a target=_blank id="L123" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L123" rel="#L123" style="color: rgb(102, 102, 102); text-decoration: none;"> 123</a><a target=_blank id="L124" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L124" rel="#L124" style="color: rgb(102, 102, 102); text-decoration: none;"> 124</a><a target=_blank id="L125" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L125" rel="#L125" style="color: rgb(102, 102, 102); text-decoration: none;"> 125</a><a target=_blank id="L126" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L126" rel="#L126" style="color: rgb(102, 102, 102); text-decoration: none;"> 126</a><a target=_blank id="L127" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L127" rel="#L127" style="color: rgb(102, 102, 102); text-decoration: none;"> 127</a><a target=_blank id="L128" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L128" rel="#L128" style="color: rgb(102, 102, 102); text-decoration: none;"> 128</a><a target=_blank id="L129" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L129" rel="#L129" style="color: rgb(102, 102, 102); text-decoration: none;"> 129</a><a target=_blank id="L130" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L130" rel="#L130" style="color: rgb(102, 102, 102); text-decoration: none;"> 130</a><a target=_blank id="L131" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L131" rel="#L131" style="color: rgb(102, 102, 102); text-decoration: none;"> 131</a><a target=_blank id="L132" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L132" rel="#L132" style="color: rgb(102, 102, 102); text-decoration: none;"> 132</a><a target=_blank id="L133" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L133" rel="#L133" style="color: rgb(102, 102, 102); text-decoration: none;"> 133</a><a target=_blank id="L134" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L134" rel="#L134" style="color: rgb(102, 102, 102); text-decoration: none;"> 134</a><a target=_blank id="L135" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L135" rel="#L135" style="color: rgb(102, 102, 102); text-decoration: none;"> 135</a><a target=_blank id="L136" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L136" rel="#L136" style="color: rgb(102, 102, 102); text-decoration: none;"> 136</a><a target=_blank id="L137" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L137" rel="#L137" style="color: rgb(102, 102, 102); text-decoration: none;"> 137</a><a target=_blank id="L138" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L138" rel="#L138" style="color: rgb(102, 102, 102); text-decoration: none;"> 138</a><a target=_blank id="L139" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L139" rel="#L139" style="color: rgb(102, 102, 102); text-decoration: none;"> 139</a><a target=_blank id="L140" href="http://blog.csdn.net/g_brightboy/article/details/14229139#L140" rel="#L140" style="color: rgb(102, 102, 102); text-decoration: none;"> 140</a>
"打开语法高亮
syntax on
"使用配色方案
colorscheme desert
"打开文件类型检测功能
filetype on
"不同文件类型采用不同缩进
filetype indent on
"允许使用插件
filetype plugin on
filetype plugin indent on
"关闭vi模式
set nocp
"与windows共享剪贴板
set clipboard+=unnamed
"取消VI兼容,VI键盘模式不易用
set nocompatible
"显示行号, 或set number
set nu
"历史命令保存行数
set history=100
"当文件被外部改变时自动读取
set autoread
"取消自动备份及产生swp文件
set nobackup
set nowb
set noswapfile
"允许使用鼠标点击定位
set mouse=a
"允许区域选择
set selection=exclusive
set selectmode=mouse,key
"高亮光标所在行
set cursorline
"取消光标闪烁
set novisualbell
"总是显示状态行
set laststatus=2
"状态栏显示当前执行的命令
set showcmd
"标尺功能,显示当前光标所在行列号
set ruler
"设置命令行高度为3
set cmdheight=3
"粘贴时保持格式
set paste
"高亮显示匹配的括号
set showmatch
"在搜索的时候忽略大小写
set ignorecase
"高亮被搜索的句子
set hlsearch
"在搜索时,输入的词句的逐字符高亮(类似firefox的搜索)
set incsearch
"继承前一行的缩进方式,特别适用于多行注释
set autoindent
"为C程序提供自动缩进
set smartindent
"使用C样式的缩进
set cindent
"制表符为4
set tabstop=4
"统一缩进为4
set softtabstop=4
set shiftwidth=4
"允许使用退格键,或set backspace=2
set backspace=eol,start,indent
set whichwrap+=<,>,h,l
"取消换行
set nowrap
"启动的时候不显示那个援助索马里儿童的提示
set shortmess=atI
"在被分割的窗口间显示空白,便于阅读
set fillchars=vert:\ ,stl:\ ,stlnc:\
"光标移动到buffer的顶部和底部时保持3行距离, 或set so=3
set scrolloff=3
"设定默认解码
set fenc=utf-8
set fencs=utf-8,usc-bom,euc-jp,gb18030,gbk,gb2312,cp936
"设定字体
set guifont=Courier_New:h11:cANSI
set guifontwide=新宋体:h11:cGB2312
"设定编码
set enc=utf-8
set fileencodings=ucs-bom,utf-8,chinese
set langmenu=zh_CN.UTF-8
language message zh_CN.UTF-8
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
"自动补全
filetype plugin indent on
set completeopt=longest,menu
"自动补全命令时候使用菜单式匹配列表
set wildmenu
autocmd FileType ruby,eruby set omnifunc=rubycomplete#Complete
autocmd FileType python set omnifunc=pythoncomplete#Complete
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
autocmd FileType java set omnifunc=javacomplete#Complet
 来自CODE的代码片
vimrc.vim

【vim的语法高亮/配色方案】

vim的配色分两部分:编辑环境配色和文本区域配色
1) vim编辑环境配色:比如Vim编辑区的前景背景色、状态栏颜色、错误提示颜色、查找、光标、圈选区、行号、折叠等的颜色
这里列出几个配色组名及其含义(全部的详细信息查看帮助文件 :help hi 查找 "highlight-group" 即可):

[plain] view plain copy
 在CODE上查看代码片派生到我的代码片
  1. Cursor        光标下的字符颜色    
  2. CursorLine    光标所在行颜色    
  3. ErrorMsg      命令行出现的错误信息提示    
  4. IncSearcg     被搜索字符的颜色    
  5. Normal        普通字符    
  6. Pmenu         弹出的提示条目颜色    
  7. PmenuSel      弹出的提示条目中被选中条目的颜色    
  8. SpellBad      拼写错误字符颜色    
  9. Visual        可视化模式下选中字符的颜色    
  10. Menu          菜单栏的颜色字体    
  11. Scrollbar     滚动条的颜色   

2) 文本区域配色:可编辑的文本区域的字符配色(详细信息请执行 :help hi搜索 "*comment")
由于配色种类较多,vim默认分了几大类(帮助信息中带*的):

[plain] view plain copy
 <a target=_blank href="https://code.csdn.net/snippets/74519" target="_blank" title="在CODE上查看代码片" style="color: rgb(160, 160, 160); text-decoration: none; border: none; padding: 1px; margin: 0px 10px 0px 0px; font-size: 9px; display: inline-block; width: 16px; height: 16px; background-image: none; background-attachment: ini
0 0
原创粉丝点击