the mean of the vim command

Posted on 2007-12-10 10:55 T.S Liu 阅读(416) 评论(0)  编辑 收藏 引用 所属分类: vim/gvim

1. 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窗


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理