How do I move to the next capital letter?

前端 未结 5 1155
庸人自扰
庸人自扰 2021-02-01 02:25

In vim I can use f followed by a character to go to the next occurrence of that character on the current line. For example, if I have the following (cursor position

5条回答
  •  逝去的感伤
    2021-02-01 02:44

    wilhelmtell's answer will work unless 'ignorecase' parameter is set. If 'smartcase' is activated or 'noignorecase' then it is okay.

    However a pattern that can replace [A-Z] is \u (see :help /\u or more globally :help pattern). Therefore you can replace your mapping with:

    :nnoremap C /\u:nohlsearch
    

提交回复
热议问题