Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| home_server:home_server_setup:other_services:vim [2024-03-24 Sun wk12 10:51] – [VIM Customisation] baumkp | home_server:home_server_setup:other_services:vim [2024-03-24 Sun wk12 14:04] (current) – [nocompatible] baumkp | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| {{tag> | {{tag> | ||
| + | ======VIM Editor====== | ||
| + | When using '' | ||
| =====VIM Customisation===== | =====VIM Customisation===== | ||
| - | + | ++++~/ | |
| - | <code bash> | + | <code bash> | 
| - | :colorscheme desert | + | set nocompatible | 
| - | :set nocompatible | + | |
| syntax on | syntax on | ||
| - | :set number relativenumber | + | set number relativenumber | 
| set autoindent expandtab tabstop=2 shiftwidth=2 | set autoindent expandtab tabstop=2 shiftwidth=2 | ||
| filetype plugin on | filetype plugin on | ||
| Line 14: | Line 15: | ||
| set shiftwidth=2 | set shiftwidth=2 | ||
| set tabstop=2 | set tabstop=2 | ||
| - | set expandtab | + | set expandtab</ | 
| - | </ | + | ++++ | 
| ====vim color scheme==== | ====vim color scheme==== | ||
| I use the VI (or VIM) editor. It comes standard on most Linux and UNIX distributions, | I use the VI (or VIM) editor. It comes standard on most Linux and UNIX distributions, | ||
| The different VIM colour scheme definition files are located at ''/ | The different VIM colour scheme definition files are located at ''/ | ||
| + | ====nocompatible==== | ||
| + | Original vi had some strange key bindings, e.g. the cursor keys did not function. the '' | ||
| ====vim syntax color==== | ====vim syntax color==== | ||
| If syntax color is not working in the file '' | If syntax color is not working in the file '' | ||
| ====vim line numbers==== | ====vim line numbers==== | ||
| + | In .vimrc, add '' | ||
| + |   * '' | ||
| + |   * '' | ||
| + |   * '' | ||
| + |   * '' | ||
| + | In visual mode '': | ||
| + | |||
| ====VIM Text Editor==== | ====VIM Text Editor==== | ||