这是我第一次注意到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/