开发者

How to select a column using a mouse, in Vim

开发者 https://www.devze.com 2023-03-24 04:47 出处:网络
Is it possible to use 开发者_如何学运维SHIFT + drag mouse to select a column of text in VIM?If so, how?No. Vi was written for restricted non-graphical environments and doesn\'t even assume the presenc

Is it possible to use 开发者_如何学运维SHIFT + drag mouse to select a column of text in VIM? If so, how?


No. Vi was written for restricted non-graphical environments and doesn't even assume the presence of arrow keys. Depending on what shell / terminal you're using, you may be able to use your operating system's mouse and text selection facilities to do what you need. Just bear in mind they're not native to Vim.

Use Ctrl+V and J/K [or up/down arrows if you have them ;)] to move the highlighted selection.

Hit Y to copy the column and p to paste it somewhere else.


At least in Windows, you can Alt-drag.


AFAIK alt-dragging works everywhere (on Mac it's option-dragging).

But I'm with Andrew and Kit... keep your friggin' hands off that damned mouse! :)


Not recommended. You can use Ctrl+V to highlight a block.

0

精彩评论

暂无评论...
验证码 换一张
取 消