Vim – Minimal Setup Explained

34
command description
 nocompatible 
 set nocp 
This changes the values of a LOT of options,
enabling features which are not Vi compatible
but really really nice.
 digraph 
 set digraph 
Enables input of special characters by a combination of two characters.
Example: Type ‘a’, erase it by typing CTRL-H –
and then type ‘:’ – this results in the umlaut: ä
So Vim remembers the character you have erased and combines it
with the character you have typed “over” the previos one.
 esckeys 
 set ek 
Enables recognition of arrow key codes which start off with an ESC.
This would normally end your current mode (insert/append/open mode)
and return you command mode (aka normal mode), and the rest of the
code would trigger commands. bah! Although I dont use the arrow
keys often, I sometimes want to use them with replace mode and
virtual editing And I don’t want to be *thatcompatible to vanilla vi, anyway. (so sue me).
 hidden 
 set hid 
Allows hiding buffers even though they contain modifications
which have not yet been written back to the associated file.
(sounds quite technical, eh?)
 ruler 
 set ru 
Shows the “ruler” for the cursor, ie its current position
with line+column and the percentage within the buffer.
This saves me typing CTRL-G (or better “g CTRL-G”) –
and many users like this feature, too.
And it is nice when showing Vim.
 showcmd 
 set sc 
Show the input of an *incompletecommand.
So while you are typing the command "y23dd
you will see "y23dd before you type
the last ‘d’ which completes the command.
Makes learning Vi much simpler as you get
some feedback to what you have already typed.
 visualbell 
 set vb 
Chose “visual bell” effect rather than “beeping”.
 wildmenu 
 set wmnu 
Make use of the “status line” to show possible completions of
command line commands, file names, and more. Allows to cycle
forward and backward throught the list.
This is called the “wild menu”.
 noerrorbells 
 set noeb 
Turn off the bell. You do know the “beep”
you get when you type ESC in normal mode?
Be nice to your co-workers – turn it off! πŸ˜‰
 noexpandtab 
 set noet 
When inserting text do not expand TABs to spaces.
While I try to avoid all control characters in text
I can make good use of TABs when typing a table.
And I know I can always make Vim expand the TABs later
(using the “:retab” command). Your mileage may vary..
 nostartofline 
 set nosol 
Prevent the cursor from changing the current column
when jumping to other lines within the window.
(And if you like that then you’ll “virtual editing” with Vim-6! πŸ™‚
 autoindent 
 set ai 
Automatic indentation. This automatically inserts the
indentation from the current line when you start a new line;
in insert mode you would start a new line by ending the current
one by inserting CTRL-J or CTRL-M – and in command mode you’d
“open” a new line with either ‘o’ or ‘O’ for below or above the
current line, respectively.
By the way, “autoindent” is actually a feature of vanilla vi.
 backspace 
 set bs=2 
Backspace with this value allows to use the backspace character
(aka CTRL-H or ”
 formatoptions 
 set fo=cqrt 
The

-)td>

Read More

Vanic
WRITTEN BY

Vanic

β€œSimplicity, patience, compassion.
These three are your greatest treasures.
Simple in actions and thoughts, you return to the source of being.
Patient with both friends and enemies,
you accord with the way things are.
Compassionate toward yourself,
you reconcile all beings in the world.”
― Lao Tzu, Tao Te Ching