http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html
:set wrap
:set nowrap
Replace all string in document
- : %s / ______________ /\ ________________/ g
Set tab spaces
1. vim /etc/vim/vimrc
2. set ts=4
利用字串取代('^M' 要用 Ctrl+V 不要放開 Ctrl 再按 M 才能打出來喔!)
:%s/^M/\r/g
Display the line number in vim
- vim /etc/vim/vimrc
- :set number
Foreground and Background Switch
1) Ctrl + z
2) fg ....
http://arjanvandergaag.nl/blog/foreground-and-background-processes.html
Set current line highlight
set cursorlinehi CursorLine cterm=NONE ctermbg=darkred ctermfg=white
hi CursorColumn cterm=NONE ctermbg=darkred ctermfg=white
※lightmagenta darkgray lightgrey darkgrey lightgreen lightgray darkmagenta gray white red grey darkred brown darkblue darkgreen lightblue yellow cyan
Folding codes in vim
1. visual select the codes (v) (ctrl+v)
2. zf
3. za
相關文件
- Graphical vi-vim Cheat Sheet and Tutorial
- tab 切換
- Ctrl+PageUp | Ctrl+PageDown
- gt
- http://www.ptt.cc/bbs/Editor/M.1340702403.A.CFA.html
- Copy and Paste using Visual Selection
- Vim 懶人包 Janus
- Vim After 11 years
- Vim 套件 : PHP and javascript 檢查套件
- Vim Plugins
- Automatic Syntax Checking
- Vim 外掛管理工具 Vundle
- Vim 自動完成
- https://bitbucket.org/ns9tks/vim-autocomplpop/
- http://www.ptt.cc/bbs/CSIE_DBMS/M.1356354669.A.B0B.html
- Vim 設定檔
- **snipMate (自動完成 for, foreach, etc.)
- http://www.vim.org/scripts/script.php?script_id=2540
- http://www.catonmat.net/blog/vim-plugins-snipmate-vim/ (Also for Cygwin)
- http://net.tutsplus.com/tutorials/other/vim-essential-plugin-snipmate/ (**)
- **AutoComplPop (自動完成keywork)
- http://www.vim.org/scripts/script.php?script_id=1879
- http://www.ptt.cc/bbs/Linux/M.1260322500.A.CE3.html
- **Code folding
- http://smartic.us/2009/04/06/code-folding-in-vim/
- http://www.youtube.com/watch?v=2VQozxCH7D0