vim: avoid selecting and copying line number

You can display line numbers in vi using the command

:set nu
:set number

Before enabling mouse option

But this creates problems when you use mouse to select text and copy it. This problem can be avoided by enabling the mouse option:

:set mouse+=a

After enabling mouse option


Ravi Teja is a technology entrepreneur with interest in Embedded Systems, Software engineering, Operating Systems, Web development, Cloud computing, Machine learning, etc.

More Posts - Website

Follow Me:
LinkedInGoogle Plus