Vi editor


vim configuration : colorscheme etc..
vast colorscheme gebruiken na opstarten: vb. desert.vim
=> in ~/.vimrc een regel definieren : 
colorscheme desert

vi produceert de volgende tekens ipv de arrows links rechts oboven en onder bewegen:A,B,C en D.


I wonder how many of you are annoyed with the arrow key behavior during insert mode in Vim.

Leave all the key mappings default, do not change your TERM environment. Here's a simple tip,

:set term=cons25


 files vergelijken op 2 servers ( 1 local en 1 remote )

 vimdiff /path/to/file scp://remotehost//path/to/file

 How to clear trailing spaces using VIM

After a bit of googling, it turned out to be REALLY easy!
And thats it!
 The % tells it to be global - not just the current line.
S is a shortcut for substitute.
The \s (whitespace) and \+ (at least once) are regular expression terms (the + needs to be escaped, it seems…).
The $ (dollar) represents the end of a line.
The = are being used as delimiters, the == at the end implies that the pattern is replaced with nothing.

Remove unwanted spaces

Simple commands to remove unwanted whitespaceEdit

In a search, \s finds whitespace (a space or a tab), and \+ finds one or more occurrences.
Delete all trailing whitespace (at the end of each line) with: