Although you are advised to configure Vim manually as described in the next section, you also may use the following script that can do everything automatically. Copy this shell script setup-vim.sh (you may save it in HOME, for example). Then give it executable permissions and run:
chmod +x setup-vim.sh ./setup-vim.sh
It will create the following files in your file system:
~/.vimrc ~/.vim/colors/harlequin.vim ~/.vim/colors/desertink.vim ~/.vim/colors/wombat256mod.vim
Vim (Vi improved) can be run from the terminal as follows:
By default, the editor comes with an extremely minimal default configuration.
In particular, it does not have code indentation turned on.
To enable this code editing functionality, you need to make a configuration file called
.vimrc in your HOME directory.
Download this .vimrc file and put in your HOME directory.
Note that in Unix, the files that start with a dot are hidden, so you might not be able to see it by default after copying. To make the command
lsshow all hidden files, use the option
-a, for example:
ls -a ~
New color schemes should be stored in
Make this directory if you don’t have it yet:
mkdir ~/.vim mkdir ~/.vim/colors
Copy the following three color schemes files in
.vimrc configuration file to choose the color scheme you like. For example, to choose Harlequin, add a line:
.vimrc I gave you, already contains the lines to enable the color schemes you just downloaded. Just uncomment the corresponding line
(note that the file is using double quote symbol
" to mark comments).
You can find more color schemes here: [See this huge list].