vim - vim 中 "selection mode"的常见用例是什么?

标签 vim

这是我第一次注意到vim中的选择模式,当时我不小心从visual-line触发了它。模式由<c-g> .

Vim 已经有 visual mode对于文本选择 selection mode 的用例是什么,有人可以给我提示吗?

(注意:我检查了手册页,将其描述为

a resemblance of MS Windows text selection

但我仍然不太明白为什么我们需要在 vim 中进行任何鼠标操作)

最佳答案

选择模式通常用于代码片段插件,例如 vim-snipmate 。可以创建选择模式特有的映射,以免干扰常规视觉模式行为。

这是 Practical Vim 的摘录作者:德鲁·尼尔:

If you are happy to embrace the modal nature of Vim, then you should find little use for Select mode, which holds the hand of users who want to make Vim behave more like other text editors. I can think of only one place where I consistently use Select mode: when using a plugin that emulates TextMate's snippet functionality, Select mode highlights the active placeholder.

关于vim - vim 中 "selection mode"的常见用例是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38987174/

相关文章:

Vim Dvorak 键绑定(bind)(重新绑定(bind) :)

bash - 没有扩展的 shell 脚本的 ctags

c - 可靠的 C 上下文窗口

Vim:空格分隔的数字列表

vim - 使用 vim 的 -W 选项

vim - vi/vim 编辑器,复制一个 block (不是通常的操作)

coffeescript - 在vim中映射shift键

vim - 使用带有浅色或白色背景配色方案的 Vim

linux - 无法拉取 .vim/目录

python - 在 Vim 中更改 Python for 循环的颜色