Vim:反向可视模式透视

19
假设您正在使用vim的可视模式进行选择。您按下v,然后使用l向右移动。然后,假设您希望将选择向左扩展,而不改变右边的点。也就是说,您对'>感到满意,但想更改'<
如何交换以使其好像您从'>开始选择向左移动,并更改'<
我模糊地记得以前见过这个问题,但很难在谷歌上搜索到。
2个回答

20

哎呀,发布到stackoverflow后阅读(F)手册变得更容易了...

3. Changing the Visual area             *visual-change*

                            *v_o*
o           Go to Other end of highlighted text: The current
            cursor position becomes the start of the highlighted
            text and the cursor is moved to the other end of the
            highlighted text.  The highlighted area remains the
            same.

4
不要忘记在块状(矩形)选择中包括大写字母 O,不要沿对角线进行选择::help v_O - Benoit

5

o

根据文档:

o           Go to Other end of highlighted text: The current
            cursor position becomes the start of the highlighted
            text and the cursor is moved to the other end of the
            highlighted text.  The highlighted area remains the
            same. 

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接