Don’t you hate it when you use vim and you want to select with mouse and you can not do that easily because of –VISUAL– mode?
Usually I use this ’trick’ to get rid of that visual mode, by making a .vimrc (or editing an existing one) in my home directory and setting this:
BTW, I also do this in the root home, so when I do sudo vim I’m also getting rid of the visual mode. This works on Debian 9 and 10 on Raspberry Pi’s (Raspian) and on Linux Mint but also on Red Hat derivatives.
But this didn’t work at all on Parrot 5.0 (which is built on Debian 11). After trying, digging and searching via Google I found this. While in vim do this:
:verbose set mouse
The answer of that vim command is the location of the latest used config file for your vim settings. Turned out it was an obscure nvim settings file: ~/.config/nvim/init.vim, this is the content:
set number set expandtab set autoindent set softtabstop=4 set shiftwidth=2 set tabstop=4 "Enable mouse click for nvim set mouse=a "Fix cursor replacement after closing nvim set guicursor= "Shift + Tab does inverse tab inoremap <S-Tab> <C-d> "See invisible characters set list listchars=tab:>\ ,trail:+,eol:$ "wrap to next line when end of line is reached set whichwrap+=<,>,[,]
Add a minus sign in the “set mouse=a” before the equals sign, like so:
and save the file. Now you no longer have the visual mode.
Now if you use sudo (who doesn’t) on vim, you’ll see that this does not help, because root has it’s own configuration files in it’s home. So you’ll also have to perform these steps within the root home.
To sum up: actually you are not using vim but nvim (neo vim) on Parrot (maybe also on Debian 11, but I didn’t check). An alias is set from vim to nvim, which uses it’s own config file. Changes in the behaviour of vim should be set per user in this nvim config file.
Een gedachte over “Disable annoying visual mode in (n)vim on Parrot”
Reacties zijn gesloten.