This post lists the steps to install and setup Vim for Linux kernel development.
Steps
1. Type sudo apt-get install vim
2. Type vi ~/.vimrc
3. Copy :set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab cindent cc=80 | %retab | autocmd BufWritePre * %s/\s\+$//e
4. In vim type i
5. Paste the line you copied into the doc
6. Press ESC
7. Type :w ENTER
8. Press ESC
9. Press :q ENTER
Reference
Note
A post that covers fixing tabs is at [link].