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

來源:互聯網
上載者:User

 

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.