vim 隨手寫(二)

VimTip 6:百分号"%"的用途
"%"可以用来:
1.跳转到一个成对出现的左半边
或者右半边的圆括号()、方括号 []或者大括号{}afasdf
2.跳转到一个C语言风格注释的 开头或结尾
3.跳转到完整出现的C预处理条 件从句:#if,#ifdef, #else,#elif,#en dif
如果需要关于"%"的详细信息, 请在VIM的命令状态下输入:
        :help %
通过修改"matchpairs "选项,"%"可以被扩展到定位 其他的成对出现的符号。输入
:help matchpairs获得更多的 帮助。

原文:
-----------------------------------------------------------------------------------------------------------
VimTip 6: Using the % key
http://vim.sourceforge.net/tip_view.php?tip_id=

The % key can be used

1. To jump to a matching opening or closing parenthesis, square
   bracket or a curly brace i.e. ([{}])
2. To jump to start or end of a C-style comment /* */.
3. To jump to a matching #if, #ifdef, #else, #elif, #endif C
   preprocessor conditionals.

To get more information about this, do

             :help %

The % key can be extended to support other matching pairs by
modifying the "matchpairs" option.  Read the help on

             :help matchpairs


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值