vim - 用 t 和 f move 光标,使用 word 作为参数,vim

标签 vim cursor move forward words

是否可以在 vim 中使用 t 继续前进?和 f (或以另一种方式使用 TF ),但使用单词作为参数?

最佳答案

怎么样/word ?

它可以像其他任何东西一样与运算符结合使用:

the lazy cow jumped over the high moon

光标在开始处,d/high进入:
high moon

奖金

此外,您可能有兴趣学习一些像这样的 ex 模式命令:
the lazy cow jumped over the high moon
the hazy cow jumped over the high moon
the noble cow jumped over the high moon
the crazy cow jumped over the high moon

现在输入
:g/azy/ norm! /jumped<CR>d/high/e<CR>

(注意:<CR> 表示回车键 (^M) 的 C-vC-m)

结果:
the lazy cow  moon
the hazy cow  moon
the noble cow jumped over the high moon
the crazy cow  moon
/e旗达行为类似于 f ;获取直到 行为代替:
:g/azy/ norm! /jumped<CR>d/high/<CR>

结果:
the lazy cow high moon
the hazy cow high moon
the noble cow jumped over the high moon
the crazy cow high moon

关于vim - 用 t 和 f move 光标,使用 word 作为参数,vim,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7555019/

相关文章:

c++ - C/C++ 开发环境中最有用/最常用的 vim 命令是什么

java - 光标问题

java - 调用 JEditor.setEditable() 时更改光标悬停在超链接上

linux - 如何将选定的文件从一个文件夹 move 到另一个带有子文件夹的文件夹

在 ~/.vim/上找不到 OS X 10.8 Mountain Lion 上的 VIM 安装

vim - 如何在 Vim 中将所有文本转换为小写

linux - neovim ultisnips 激活无法识别换行键击

javascript - 如何将这个球附加到光标上?

c++ - std::forward 与 std::move 的用法

struct - 在 Rust 中调用存储在结构中的堆栈分配闭包