編輯器】Vim學(xué)習(xí)筆記

      網(wǎng)友投稿 653 2025-03-31

      1.Vim入門基礎(chǔ) http://www.jianshu.com/p/bcbe916f97e1

      2.vim配置 http://blog.csdn.net/g_brightboy/article/details/14229139

      3.簡(jiǎn)明Vim練級(jí)攻略 http://coolshell.cn/articles/5426.html

      4.http://blog.csdn.net/mu_zhou233/article/details/53045831

      字體 Mac上用Monaco 20號(hào)(Monaco字體太漂亮了太可愛(ài)了),Windows上用16號(hào)

      "2017.7.20 g++ with macvim By gwj let s:cpo_save = &cpo set cpo&vim colorscheme macvim set cin set tabstop=4 set softtabstop=4 set shiftwidth=4 set nu set guitablabel=%M%t set ruler set autoindent set smartindent filetype on syntax on set showmatch set guifont=Monaco:h20 set mouse=a set selection=exclusive set selectmode=mouse,key nnoremap :w:!g++ % -Wall -o nnoremap :!./ nnoremap :w:!g++ % -Wall -o a nnoremap :!./a set printexpr=system('open\ -a\ Preview\ '.v:fname_in)\ +\ v:shell_error let $SSH_ASKPASS = simplify($VIM . '/../../MacOS') . '/macvim-askpass' let $SUDO_ASKPASS = $SSH_ASKPASS let &cpo = s:cpo_save unlet s:cpo_save

      1

      2

      3

      4

      5

      6

      7

      8

      9

      10

      11

      【編輯器】Vim學(xué)習(xí)筆記

      12

      13

      14

      15

      16

      17

      18

      19

      20

      21

      22

      23

      24

      25

      26

      27

      28

      29

      30

      31

      32

      33

      34

      35

      36

      37

      38

      " Candy? MacOS set number set ruler set tabstop=4 set shiftwidth=4 set autoindent set smartindent filetype on syntax on colorscheme solarized set showmatch set guifont=Monaco:h20 set mouse=a set selection=exclusive set selectmode=mouse,key nnoremap :w:!g++ % -Wall -o nnoremap :!./ nnoremap :w:!g++ % -Wall -o a nnoremap :!./a

      1

      2

      3

      4

      5

      6

      7

      8

      9

      10

      11

      12

      13

      14

      15

      16

      17

      18

      19

      20

      "mhy12345 "Configure of Vundle set nocompatible " be iMproved, required filetype off " required " set the runtime path to include Vundle and initialize set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() " alternatively, pass a path where Vundle should install plugins "call vundle#begin('~/some/path/here') " Default Plugin Plugin 'VundleVim/Vundle.vim' Plugin 'vim-airline/vim-airline' Plugin 'vim-airline/vim-airline-themes' Plugin 'Valloric/YouCompleteMe' " All of your Plugins must be added before the following line call vundle#end() " required filetype plugin indent on " required " To ignore plugin indent changes, instead use: "filetype plugin on " " Brief help " :PluginList - lists configured plugins " :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate " :PluginSearch foo - searches for foo; append `!` to refresh local cache " :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal " " see :h vundle for more details or wiki for FAQ " " Put your non-Plugin stuff after this line " "Old encoding setting... set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936 set termencoding=utf-8 set encoding=utf-8 "Configure airline let molokai_original=1 let g:airline_theme="molokai" "始終顯示狀態(tài)欄 set laststatus=2 "打開(kāi)tabline功能,方便查看Buffer和切換,省去了minibufexpl插件 let g:airline#extensions#tabline#enabled = 1 let g:airline#extensions#tabline#buffer_nr_show = 1 "設(shè)置切換Buffer快捷鍵" nnoremap :bn nnoremap :bp " 關(guān)閉狀態(tài)顯示空白符號(hào)計(jì)數(shù) let g:airline#extensions#whitespace#enabled = 0 let g:airline#extensions#whitespace#symbol = '!' " 設(shè)置consolas字體"前面已經(jīng)設(shè)置過(guò) "set guifont=Consolas\ for\ Powerline\ FixedD:h11 if !exists('g:airline_symbols') let g:airline_symbols = {} endif "End "YouCompleteMe let g:ycm_global_ycm_extra_conf='~/.vim/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py' let g:airline_powerline_fonts = 1 "Own configure nnoremap f :YcmCompleter FixIt function Compile() if &filetype == 'cpp' exec "!g++ % -o %< -g -Wall -Wextra -Wconversion -std=c++11" elseif &filetype == 'c' exec "!gcc % -o %< -g -Wall -Wextra -Wconversion" elseif &filetype == 'pas' exec "!fpc % -g" elseif &filetype == 'tex' exec "!xelatex '%'" elseif &filetype == 'java' exec "!javac %" elseif &filetype == 'scss' exec "!sass % > %<.css" endif endfunction function Debug() if &filetype == 'cpp' exec "!gdb ./%<" elseif &filetype == 'tex' exec "!open './%<.pdf'" elseif &filetype == 'java' exec "!jdb %<" endif endfunction function Run() if &filetype == 'cpp' exec "!time ./%<" elseif &filetype == 'tex' exec "!open './%<.pdf'" elseif &filetype == 'java' exec "!java %<" elseif &filetype == 'ruby' exec "!ruby %" elseif &filetype == 'html' exec "!firefox %" elseif &filetype == 'php' exec "!php %" elseif &filetype == 'sh' exec "!bash %" endif endfunction set hlsearch set mouse=a set smartindent set fdm=marker set number set tabstop=4 set softtabstop=4 set shiftwidth=4 set backspace=2 syntax on imap jj map : call Compile() map : call Debug() map : call Run() map : ! xcodebuild map : ! subl ./% map : ! python3 % colors evening

      1

      2

      3

      4

      5

      6

      7

      8

      9

      10

      11

      12

      13

      14

      15

      16

      17

      18

      19

      20

      21

      22

      23

      24

      25

      26

      27

      28

      29

      30

      31

      32

      33

      34

      35

      36

      37

      38

      39

      40

      41

      42

      43

      44

      45

      46

      47

      48

      49

      50

      51

      52

      53

      54

      55

      56

      57

      58

      59

      60

      61

      62

      63

      64

      65

      66

      67

      68

      69

      70

      71

      72

      73

      74

      75

      76

      77

      78

      79

      80

      81

      82

      83

      84

      85

      86

      87

      88

      89

      90

      91

      92

      93

      94

      95

      96

      97

      98

      99

      100

      101

      102

      103

      104

      105

      106

      107

      108

      109

      110

      111

      112

      113

      114

      115

      116

      117

      118

      119

      120

      121

      122

      123

      124

      125

      126

      127

      "main command "打開(kāi)語(yǔ)法高亮 syntax on "使用配色方案 colorscheme desert "打開(kāi)文件類型檢測(cè)功能 filetype on "不同文件類型采用不同縮進(jìn) filetype indent on "允許使用插件 filetype plugin on filetype plugin indent on "關(guān)閉vi模式 set nocp "與windows共享剪貼板 set clipboard+=unnamed "取消VI兼容,VI鍵盤模式不易用 set nocompatible "顯示行號(hào), 或set number set nu "歷史命令保存行數(shù) set history=100 "當(dāng)文件被外部改變時(shí)自動(dòng)讀取 set autoread "取消自動(dòng)備份及產(chǎn)生swp文件 set nobackup set nowb set noswapfile "允許使用鼠標(biāo)點(diǎn)擊定位 set mouse=a "允許區(qū)域選擇 set selection=exclusive set selectmode=mouse,key "高亮光標(biāo)所在行 set cursorline "取消光標(biāo)閃爍 set novisualbell "總是顯示狀態(tài)行 set laststatus=2 "狀態(tài)欄顯示當(dāng)前執(zhí)行的命令 set showcmd "標(biāo)尺功能,顯示當(dāng)前光標(biāo)所在行列號(hào) set ruler "設(shè)置命令行高度為3 set cmdheight=3 "粘貼時(shí)保持格式 set paste "高亮顯示匹配的括號(hào) set showmatch "在搜索的時(shí)候忽略大小寫(xiě) set ignorecase "高亮被搜索的句子 set hlsearch "在搜索時(shí),輸入的詞句的逐字符高亮(類似firefox的搜索) set incsearch "繼承前一行的縮進(jìn)方式,特別適用于多行注釋 set autoindent "為C程序提供自動(dòng)縮進(jìn) set smartindent "使用C樣式的縮進(jìn) set cindent "制表符為4 set tabstop=4 "統(tǒng)一縮進(jìn)為4 set softtabstop=4 set shiftwidth=4 "允許使用退格鍵,或set backspace=2 set backspace=eol,start,indent set whichwrap+=<,>,h,l "取消換行 set nowrap "啟動(dòng)的時(shí)候不顯示那個(gè)援助索馬里兒童的提示 set shortmess=atI "在被分割的窗口間顯示空白,便于閱讀 set fillchars=vert:\ ,stl:\ ,stlnc:\ "光標(biāo)移動(dòng)到buffer的頂部和底部時(shí)保持3行距離, 或set so=3 set scrolloff=3 "設(shè)定默認(rèn)解碼 set fenc=utf-8 set fencs=utf-8,usc-bom,euc-jp,gb18030,gbk,gb2312,cp936 "設(shè)定字體 set guifont=Courier_New:h11:cANSI set guifontwide=新宋體:h11:cGB2312 "設(shè)定編碼 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 "自動(dòng)補(bǔ)全 filetype plugin indent on set completeopt=longest,menu "自動(dòng)補(bǔ)全命令時(shí)候使用菜單式匹配列表 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

      1

      2

      3

      4

      5

      6

      7

      8

      9

      10

      11

      12

      13

      14

      15

      16

      17

      18

      19

      20

      21

      22

      23

      24

      25

      26

      27

      28

      29

      30

      31

      32

      33

      34

      35

      36

      37

      38

      39

      40

      41

      42

      43

      44

      45

      46

      47

      48

      49

      50

      51

      52

      53

      54

      55

      56

      57

      58

      59

      60

      61

      62

      63

      64

      65

      66

      67

      68

      69

      70

      71

      72

      73

      74

      75

      76

      77

      78

      79

      80

      81

      82

      83

      84

      85

      86

      87

      88

      89

      90

      91

      92

      93

      94

      95

      96

      97

      98

      99

      100

      101

      102

      103

      104

      105

      106

      107

      108

      109

      110

      111

      112

      113

      114

      115

      116

      117

      118

      119

      120

      121

      122

      123

      124

      125

      126

      127

      128

      129

      130

      131

      132

      133

      134

      135

      136

      137

      138

      139

      140

      141

      占坑待填。

      Windows

      版權(quán)聲明:本文內(nèi)容由網(wǎng)絡(luò)用戶投稿,版權(quán)歸原作者所有,本站不擁有其著作權(quán),亦不承擔(dān)相應(yīng)法律責(zé)任。如果您發(fā)現(xiàn)本站中有涉嫌抄襲或描述失實(shí)的內(nèi)容,請(qǐng)聯(lián)系我們jiasou666@gmail.com 處理,核實(shí)后本網(wǎng)站將在24小時(shí)內(nèi)刪除侵權(quán)內(nèi)容。

      版權(quán)聲明:本文內(nèi)容由網(wǎng)絡(luò)用戶投稿,版權(quán)歸原作者所有,本站不擁有其著作權(quán),亦不承擔(dān)相應(yīng)法律責(zé)任。如果您發(fā)現(xiàn)本站中有涉嫌抄襲或描述失實(shí)的內(nèi)容,請(qǐng)聯(lián)系我們jiasou666@gmail.com 處理,核實(shí)后本網(wǎng)站將在24小時(shí)內(nèi)刪除侵權(quán)內(nèi)容。

      上一篇:兩個(gè)excel表怎么合并
      下一篇:工作時(shí)間進(jìn)度表甘特圖(怎么甘特圖畫(huà)進(jìn)度表)
      相關(guān)文章
      91亚洲自偷在线观看国产馆| 亚洲乱码日产一区三区| 久久亚洲国产欧洲精品一| 亚洲成A人片在线观看中文| 蜜芽亚洲av无码一区二区三区| 亚洲中文字幕久久久一区| 亚洲一区在线免费观看| 亚洲国产精品成人精品软件| 亚洲毛片一级带毛片基地| 久久亚洲精品成人av无码网站| 亚洲成人精品久久| 亚洲国产成人久久精品动漫| 午夜影视日本亚洲欧洲精品一区| 久久亚洲AV无码精品色午夜麻| 久久精品国产精品亚洲色婷婷 | 亚洲人成色777777精品| 亚洲人成网国产最新在线| 亚洲成_人网站图片| 亚洲日本VA午夜在线电影| 亚洲精品女同中文字幕| 久久水蜜桃亚洲AV无码精品| 国产精品亚洲天堂| 亚洲一区二区三区免费| 成人午夜亚洲精品无码网站| 国产精品亚洲精品日韩已满| 久久精品亚洲中文字幕无码网站| 亚洲国产老鸭窝一区二区三区| 亚洲午夜久久影院| 亚洲制服在线观看| 亚洲一卡2卡三卡4卡无卡下载 | 久久久无码精品亚洲日韩蜜桃| 婷婷亚洲综合五月天小说| 亚洲成a人片毛片在线| 亚洲精品综合在线影院| 亚洲AV成人一区二区三区观看| 亚洲精品国产自在久久| 亚洲日本一区二区三区在线| 久久精品国产亚洲AV麻豆~| 亚洲国产成+人+综合| 亚洲精华国产精华精华液网站| 日韩亚洲精品福利|