使用SecureCRT对Linux vim进行颜色设置

资讯 驱动中国 489 次阅读 0 条评论
分享 Q
 

Linux的控制台颜色很好设置:Options ->Session Options -> Terminal -> Emulation 中Terminal选择ANSI or linux or xterm,必须钩上 ANSI Colour

    vi的颜色设置,编辑~/.vimrc文件,如下:(^[的输入方式是Ctrl+v然后Ctrl+[)

1 ” ==============================================
2 ” General settings
3 ” ==============================================
4
5 set nocp
6 set ru
7 set nu
8 ” 使用cindent
9 “set cin
10 “set cino = :0g0t0(sus
11
12 set sm
13 set ai
14 ” 缩近
15 set sw=4
16 set ts=4
17 ” 不展开tab为空格,反之set et
18 set noet
19
20 set lbr
21 set hls
22 “set backspace = indent , eol , start
23 “set whichwrap = b , s , < , > , [ , ]
24 “set fo+ = mB
25 set selectmode =
26 “set mousemodel = popup
27 set keymodel =
28 “set selection = inclusive
29 “set matchpairs+ =
30
31 ” ==============================================
32 ” Cursor movement
33 ” ==============================================
34 “nnoremap gj
35 “nnoremap gk
36 “vnoremap gj
37 “vnoremap gk
38 “inoremap gj
39 “inoremap gk
40
41 “nnoremap g$
42 “nnoremap g0
43 “vnoremap g$
44 “vnoremap g0
45 “inoremap g$
46 “inoremap g0
47
48 “nmap :confirm bd
49 “vmap :confirm bd
50 “omap :confirm bd
51 “map! :confirm bd
52
53 ” 打开语法高亮
54 syntax on
55 ” 使用语法进行折叠
56 set foldmethod=syntax
57
58 if (has( ” gui_running ” ))
59 set nowrap
60 set guioptions+=b
61 colo inkpot
62 else
63 set wrap
64 colo ron
65 endif
66
67 ” 设置leader的快捷键,原来的“\”太远了,而且位置还不固定
68 “let mapleader = ” , ”
69
70 if !has(”gui_running”)
71 set t_Co=8
72 set t_Sf=^[[3%p1%dm
73 set t_Sb=^[[4%p1%dm
74 endif
版权声明:本文由驱动中国整理发布,转载需注明出处与原文链接。如有疑问请联系 editor@qudong.com
本文价值 成为第一个评分的人
登录后为本文打分
网友评论0 条评论
正在回复 的评论取消
评论加载中…
🔐

登录后参与互动

评论、点赞均可赚积分
连续签到、邀请好友也有奖励 🎁

电脑端: 微信扫码登录 微信内: 一键登录

微信扫一扫

打开微信「扫一扫」,分享本文到朋友圈或好友