Issue is what the title says. Earlier I used to copy text from text files open in vim
simply by selecting text and doing Ctrl + C
. But now it puts me into visual mode, thus not allowing to copy the text. Its really annoying. Anybody knows any fix for this.
Thanks.
Visual Block Mode of Vim allows us to perform different operations like delete, copy-paste, i.e., yanked and put, etc. To enable the Visual block mode in Vim, you have to try out the “Ctrl+V” command within the normal mode. You can see that the new. txt file has been opened in the Visual Block mode.
If you want ":set mouse=a" to work over SSH, just use the '-X' option when using SSH. If using vim in xterm and having set mouse=a, you will notice mouse middle-click paste no longer seems to work. Instead use Shift+middle-click to paste X selection.
Press v to begin character-based visual selection, or V to select whole lines, or Ctrl-v or Ctrl-q to select a block. Move the cursor to the end of the text to be cut/copied.
You probably have the mouse
mode active. You can turn it off with:
:set mouse=
And turn it back on with
:set mouse=a
If you are using iTerm, you can leave mouse mode on all the time if you want, and hold Option when you want to select without using visual mode. I am not aware of a way to do that in OS X Terminal.
Update (from Younes in comments): For Terminal.app on El Capitan, press the Fn key to bypass the mouse mode. See this question for more.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With