Configuring VIM Editor
The most and the best editor in the Linux we can find is VIM editor and I’m using this for a long time. I hope everyone should try this editor it is really Awesome! . Here are the some of the steps which I found awesome when I configured my VIM for the first time. If you don’t have VIM Editor in your Linux OS type this command on your terminal to get installed.
$sudo apt-get install vim
After when the installation was over open your VIM application for configuring your VIM editor appearance.
- Open your terminal. By default, your terminal directory will be in Home Folder if not switch to “Home Folder” using “cd” command in the terminal
- Type the following code in your terminal “vim ~/.vimrc” which creates a new hidden file named vimrc in your Home Folder
- After when your file is opened set your appearance by the following commands
set number syntax enable filetype indent on set et set sw=4 set smarttab set incsearch set tabstop=4 set showmatch colorscheme evening
Description:
- set number:
Sets the Line Number
- syntax enable:
Enables Syntax Highlight
- filetype indent on:
Enables automatic file type Identation
- set et:
Inserts Tab characters whenever tab key is pressed
- set sw = 4:
Sets no of characters to be moved if you press tab
- set smattab:
Automatically follows the same indentation when the Enter key is pressed
- set incsearch:
Sets incremental Search
- set tabstop = 4:
No tabs in the source file
- set showmatch:
Highlights the matching braces
- colorscheme evening:
A Milky-Black background theme for your VIM editor.