Fixing vim

From Da Nerd Mage Wiki
Revision as of 14:38, 3 January 2022 by Bart (talk | contribs) (Created page with "= VIM (& fixing it on Debian) = (as installed on Debian) has mouse weirdness. Selecting text with the mouse automatically enters '''visual mode'''. This prevents useful things like using the mouse to copy/paste while editing in the terminal. ('''Visual Mode''' is stupid...) ==== Solution ==== Either enter: *<code>:set mouse-=a</code> during an editing session, or even better, put it (without the leading colon) in your <code>~/.vimrc</code> file. (create the <code>.vim...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

VIM (& fixing it on Debian)

(as installed on Debian) has mouse weirdness. Selecting text with the mouse automatically enters visual mode. This prevents useful things like using the mouse to copy/paste while editing in the terminal. (Visual Mode is stupid...)

Solution

Either enter:

  • :set mouse-=a

during an editing session, or even better, put it (without the leading colon) in your ~/.vimrc file. (create the .vimrc file if it's not already there...)

  • vim ~/.vimrc
set mouse-=a

If you tend to use vim via sudo a lot... (duh... Who doesn't?)

  • sudo vim ~root/.vimrc

Sadly, this seems to turn off the colour syntax hilighting.

But!

add

syntax on

to the .vimrc files & it's back.