vim: avoid selecting and copying line number

You can display line numbers in vi using the command

:set nu
:set number
before_mouse

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_mouse

After enabling mouse option

tejainece

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