萬盛學電腦網

 萬盛學電腦網 >> Linux教程 >> 使用SecureCRT對Linux vim進行顏色設置

使用SecureCRT對Linux vim進行顏色設置

class="21004"> ; 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
copyright © 萬盛學電腦網 all rights reserved