Hot answers tagged vim
To determine what editor to run, sudo checks three environment variables (in order): SUDO_EDITOR, VISUAL, and EDITOR, and uses the first editor it finds. (If it doesn't find one, it falls back to a default.) So you can make it run vimdiff instead of vim as follows: $ VISUAL=vimdiff sudoedit file1 file2 If your sudoers policy only lets you edit certain ...
This is nothing to do with the shell, or with the version of vim. It's a simple configuration thing, as the operation of backspace in insert mode is ordinary vim configurable behaviour. Specifically, it is vim's backspace setting. On one machine you (most probably) have that set to the empty string, and on another you have it set to include the value ...
/\/var\/adm\> \< means start of a word (/var is not start of a word)
You can drop-ship text from the cut buffer with swap-pasting -- pasting into a selection swaps, so dwVP line-deletes everything but the deleted word. Start with Use three words. This is the first string of another block of strings. This is the second string of another block of strings. This is the third string of another block of strings. and do ...
Here is a fiddly solution. Please feel free to optimise it! Perhaps this might work in ~/vimrc? Open both files with sudoedit $ sudoedit file1 file2 Vertically split one buffer :vsp | b2 In each window, run :diffthis
One options is to use: if system("uname") == "Linux" set filetype off match ExtraWhitespace /\s\+$/ endif
Only top voted, non community-wiki answers of a minimum length are eligible