Enabling mouse in vi editor in linux

While using the "vi" editor, one of the common problmes that we face is the inability to the mouse to move around in the file. Here is simple way to enable to usage of mouse in vi editor.

Open the vi editor in the command mode (Press "esc" to enter command mode) run the command

Now you should be able to click any where in the document and the cursor will move to that location.

To enable the mouse every time "vi" is launched we need to open the file

And uncomment the line

Note: un-commenting is done by removing the ' " ' at the beginning of the line.

Save and close the file. From the next time any file is opened using "vi" editor the mouse will be enabled by default.

No comments:

Post a Comment

Follow by Email