Disable VIM copy paste Insert Visual Mode

5
(1)

VIM Visual Mode (insert) VISUAL Disable when inserting with right-click

Vi Improved is the universal tool for many admins and developers in the Unix world in their daily tasks. The powerful editor with regular expressions, especially established in Unix operating systems, can count on so many followers.

Vim also learns the porting for Windows, which is probably more interesting for those who move in the parallel universe, Linux and Windows. For beginners, however, the entry of the uncommon editor means greater hurdles in familiarization. But also Vim professionals facing new features, because Vim is also constantly being further developed, so there is the compatibility mode and, for some time, the visual block mode, which is enabled with CTRL-V.

Disable VIM Visual Block Mode when inserting with mouse right-click
Figure: Vim Visual Block Mode (Ctrl+V) when inserting with mouse right-click.

The symptom is that the Vim blockwise visual mode Ctrl+V collides when inserting using right-click with the mouse or a trackpad.

A personal .vimrc can enable the compatibility to the classic vi, also the mouse control can by disabled. If you would insert with right-click then use the option set mouse-=a.

$ echo "set compatible" > ~/.vimrc
$ echo "set mouse-=a" >> ~/.vimrc

NOTE: that ~/.vimrc Vim automatically enables nocompatible mode as soon as a personal initialization file is available.

debian.vim sets nocompatible. Setting compatible changes numerous options, so any other options should be set AFTER setting compatible.

The — VISUAL BLOCK — mode differs from the normal VISUAL mode in which after completing the command you automatically return to the normal insert mode. When editing you go with CTRL-V in the VISUAL BLOCK mode.

To insert the previously yanked (y) or deleted (d) text in Visual Block mode, enter (p) for insert in normal mode.

The Vim Compatibility Mode

Compatible mode means vi compatibility with the old vi with :set compatible,which disables all improvements and innovations of Vi Improved. This is not recommended, but some systems (mainly for backward compatibility with old Unix systems) offer the vi command implemented with Vim in compatible mode.

Reference:
Vim Visual Mode Rerference Manual – Vim Version 7.3

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

One thought on “Disable VIM copy paste Insert Visual Mode”

Leave a Reply

Your email address will not be published. Required fields are marked *