Vim Tips and Tricks

To display the line numbers when editing a file using vim

vi ~/.vimrc
:set number
or
set nu

To Disable displaying line numbers

vi  ~/.vimrc
:set nonumber
or
:set nonu
or
:set nu!

For Tab like file completion in vim use

Ctrl-x Ctrl-f

For Dictionary Word Completion in vim add below lines to .vimrc file

set dictionary+=/usr/share/dict/words

now use Ctrl-x Ctrl-k after typing first some of the characteres of the word

Advertisements
This entry was posted in Linux. Bookmark the permalink.

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