Pimping My vim
28 June 2015
vim is a versatile and powerful text editor for command-line environments. In *nix world, it would be very difficult to survive if you cannot edit files/configs without using vi. It was first dubbed as Vi iMitation but was later relabeled Vi IMproved. It is free and open source software and is released under a license that includes some charityware clauses. To pimp your vim, you will need to create a file called .vimrc
under your home folder.
Creating ~/.vimrc
set nocompatible
syntax on
set mouse=a
set showmatch
set autoindent
set smartindent
set backspace=2
set tabstop=4
set number
set smarttab
set shiftwidth=4
colorscheme torte
set nocompatible fixes the issue where arrow keys do not function properly on some systems
syntax on enables syntax highlighting for programming languages
set mouse=a allows you to click around the text editor with your mouse to move the cursor
set showmatch highlights matching brackets in programming languages
set autoindent if indented, new lines will also be indented
set smartindent automatically indents lines after opening a bracket in programming languages
set backspace=2 makes the backspace key function like it should
set tabstop=4 how much space Vim gives to a tab
set number enables line numbering
set smarttab improves tabbing
set shiftwidth=4 assists code formatting
colorscheme torte changes the color scheme to your liking. Look in /usr/share/vim/vim73/colors
for options. Folder location varies according to your version of vim.