Saturday, April 24, 2010

Vim Settings

You can setup default vim settings for all users in /etc/vim/vimrc.local:
" Enable syntax highlighting
syntax on
filetype plugin indent on

" If using a dark background within the editing area and syntax 
" highlighting turn on this option as well
set background=dark

" Enable mouse usage (all modes) in terminals
set mouse=a 

set t_Co=256
"colorscheme desert256
colorscheme wombat256

set expandtab           " Convert tabs to spaces
set tabstop=4           " Tabs = 4 spaces
set shiftwidth=4        " Indent/outdent 4 spaces

set incsearch           " Do incremental searching
set showmatch           " Show matching brackets

set nobackup
set noswapfile
set number
set termencoding=utf-8
set encoding=utf-8
set fileencodings=utf-8,cp1251
Here is how you can install new color schemes for vim:
deby:~# wget -O /usr/share/vim/vimcurrent/colors/desert256.vim \
http://www.vim.org/scripts/download_script.php?src_id=4055

deby:~# wget -O /usr/share/vim/vimcurrent/colors/wombat256.vim \
http://www.vim.org/scripts/download_script.php?src_id=13397
Once downloaded, open vim and issue the following command to try:
:colorscheme wombat256
If you prefer black background in wombat256:
hi Normal       ctermfg=254     ctermbg=0       cterm=none      guifg=#f6f3e8  guibg=#CCCCCC  gui=none

No comments :

Post a Comment