the mean of the vim command
Posted on 2007-12-10 10:55 T.S Liu 閱讀(458) 評論(0) 編輯 收藏 引用 所屬分類: vim/gvim1. Motions and operators *operator*
The motion commands can be used after an operator command, to have the command
operate on the text that was moved over. That is the text between the cursor
position before and after the motion. Operators are generally used to delete
or change text. The following operators are available:
|c| c change
|d| d delete
|y| y yank into register (does not change the text)
|~| ~ swap case (only if 'tildeop' is set)
|g~| g~ swap case
|gu| gu make lowercase
|gU| gU make uppercase
|!| ! filter through an external program
|=| = filter through 'equalprg' or C-indenting if empty
|gq| gq text formatting
|g?| g? ROT13 encoding
|>| > shift right
|<| < shift left
|zf| zf define a fold
|g@| g@ call function set with the 'operatorfunc' option
在函數中移動光標
[[ 轉到上一個位于第一列的“{”
]] 轉到下一個位于第一列的“{”
{ 轉到上一個空行
} 轉到下一個空行
gd 轉到當前光標所指的局部變量的定義
* 轉到當前光標所指的單詞下一次出現的地方
# 轉到當前光標所指的單詞上一次出現的地方
括號的匹配
% 用來進行小括號、中括號和大括號的匹配
taglist幫助文件
<CR> 跳到光標下tag所定義的位置,用鼠標雙擊此tag功能也一樣
o 在一個新打開的窗口中顯示光標下tag
<Space> 顯示光標下tag的原型定義
u 更新taglist窗口中的tag
s 更改排序方式,在按名字排序和按出現順序排序間切換
x taglist窗口放大和縮小,方便查看較長的tag
+ 打開一個折疊,同zo
- 將tag折疊起來,同zc
* 打開所有的折疊,同zR
= 將所有tag折疊起來,同zM
[[ 跳到前一個文件
]] 跳到后一個文件
q 關閉taglist窗口
<F1> 顯示幫助
""""""""""""""""""""""""""""""
" Tag list (ctags)
""""""""""""""""""""""""""""""
if MySys() == "windows" "設定windows系統中ctags程序的位置
let Tlist_Ctags_Cmd = 'ctags'
elseif MySys() == "linux" "設定windows系統中ctags程序的位置
let Tlist_Ctags_Cmd = '/usr/bin/ctags'
endif
let Tlist_Show_One_File = 1 "不同時顯示多個文件的tag,只顯示當前文件的
let Tlist_Exit_OnlyWindow = 1 "如果taglist窗口是最后一個窗口,則退出vim
let Tlist_Use_Right_Window = 1 "在右側窗口中顯示taglist窗