Setting up ViM

From MoodleDocs
Revision as of 12:21, 8 May 2007 by Dan Poltawski (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Setting up Vim for Moodle Development

There are many powerful features available in vim, here are a few tips to ensure you get powerful use out of vim with moodle development


Moodle Coding Guidelines state that indentation should be spaces of 4 spaces (not Tabs). Some .vimrc options will help you adhere to these guidelines with ease:

" insert space characters whenever the tab key is presse
set expandtab

" insert 4 spaces characters when tab key is pressed
set tabstop=4

" insert 4 spaces wen autoindent indents
set shiftwidth=4

" automatically indent files
set autoindent

" Do smart indentation depending on code syntax (e.g. { }, keywords etc)
set smartindent