My Custom Vim Configuration

Though Vim is my favourite command-line text editor, not all the default configurations suit my taste. Luckily, changing the default configurations of Vim editor on my Xubuntu 14.04 LTS (any Linux based OS for that matter) is fairly easy and so is persisting the changes. Here’s what you need to do in order to persist the changed configurations for Vim editor (so that the changes do not disappear after you restart your Vim editor): Create a file with name .vimrc and save it in your home directory. So whatever configurations you write in that .vimrc file of yours, will be picked when you start your Vim editor (after modifying .vimrc, you may need to restart the Vim editor in order for the changes to take effect).

Here’s how my .vimrc looks like:

" Indent automatically depending on filetype
filetype indent on
set autoindent

" Turn on line numbering. Turn it off with "set nonu"
set number

" Change colorscheme from default to elflord
colorscheme elflord

About the last point, I don’t like the look of shell scripts under the default colorscheme of Vim editor. So I changed it. Here’s how shell scripts look like under elflord.

Vim editor under delek theme

I hope that helps.

Advertisements

I am a software engineer, an open-source enthusiast and a hobbyist blogger.

Tagged with: , , , , , , ,
Posted in Blog, Shell, Ubuntu
One comment on “My Custom Vim Configuration

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: