Skip to content

Vim Text Editor

March 16, 2010

Vim is a good, light-weight text editor that should run well on most any netbook. It’s very lean, consuming just under 2mb of RAM, but it’s also extremely powerful. There’s pretty much nothing it can’t do — there’s even a twitter client for it. Most importantly it offers syntax hilighting and formatting for many different programming languages including HTML and Javascript.

Unfortunately gvim is not that good out of the box. The base install is very offputting. But, fortunately, it’s easy to customize it and make the editor much more friendly. You have to edit the C:\Program Files\Vim\_vimrc to reconfigure the editor. Here’s a sample of my vimrc to get you started:

" use a sane default font
set guifont=Consolas:h10:cANSI

" tabs
set softtabstop=3
set shiftwidth=3
set tabstop=3

" colorscheme
colorscheme torte

" syntax hilight for html by default
setf html

" To disable the annoying 'recovery is impossible' error on startup
set directory=.,$TEMP

" keep all the random backup files vim creates in one place
set backupdir=C://data//temp

" enable sane wordwrap
set lbr

" default filetype for new buffers should be html too
let g:do_filetype = 0
au GUIEnter,BufAdd * if expand('') == "" | let g:do_filetype = 1 | endif
au BufEnter * if g:do_filetype | setf html | let g:do_filetype = 0 | endif

" turn off all autoindenting
set noautoindent
set nocindent
set nosmartindent
set indentexpr=""
filetype indent off
let b:did_indent = 1

Also check out the popular Vim Tips Wiki and IRC channel and google to find out all the other great stuff that Vim can do.


From → netbook

Leave a Comment

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: