比較常用的命令
命令 | 簡介 |
---|---|
[[,]],[],][,{} | 跳到上年鸳,下,定義欣簇,空白處 |
0,gm | 句子的前后 |
nH,nL | 跳到屏幕的第n行(H從上算起,L反之) |
M | 屏幕中間 |
C+f,C+b,C+e,C+y,C+u,C+d | 上下翻頁裳瘪,上下翻行懒熙,上下翻半頁 |
ga | 查看當(dāng)前光標(biāo)所在位置的字符的編碼 |
:digraphs | 或者 :h digraph-table 查看編碼 |
Insert Mode
命令 | 簡介 |
---|---|
^A | 插入上一次normal mode之前插入的數(shù)據(jù) |
^@ | 和^A一樣,不過插入之后進入normal mode |
^W | 刪除光標(biāo)前的單詞 |
^Kc1-c2 | 有趣啤它,特殊字符輸入如 ^K12 => ? |
^R= | 數(shù)學(xué)運算 |
D,T | 左右縮進 |
XE,XY | 在輸入模式下滾動屏幕,光標(biāo)不變 |
有趣的配置
個人覺得必須添加的是ESC鍵替換鍵,不然每次手都要跑到ESC那里去变骡。
"This is awesome!! inoremap kj<Esc>
把上面這段放入 .vimrc都可以离赫,簡單有效,特別是在輸入模式下快速執(zhí)行命令時
1.安裝插件管理器 PluginInstall
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
2.配置基本的要求
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
3.添加(可以直接復(fù)制github上的名字)塌碌,然后 source % 配置文件后 :PluginInstall
安裝
如: Plugin 'The-NERD-tree
我自己的配置
必備插件
-
terryma/vim-multiple-cursors 多光標(biāo)移動插件
配置:
" Default mapping
let g:multi_cursor_next_key='<C-m>'
let g:multi_cursor_prev_key='<C-l>'
let g:multi_cursor_skip_key='<C-x>'
let g:multi_cursor_quit_key='<Esc>'