Saari Development

Ali Rizvi's Technical Blog as a Professional Software Development Engineer

Config: .vimrc

leave a comment »

" Ali Rizvi's Vim Settings

set number
set shiftwidth=4

set incsearch
set hlsearch
set textwidth=80

" from lindes:
syntax on
hi Comment term=bold ctermfg=Cyan guifg=Cyan
set autoindent

" from benji fisher to turn on the matchit plugin automatically and more
filetype plugin on

" explicity map file extension .t to perl syntax instead of tads
" which is autodetected by filetype plugin on
" This line should always be after filetype plugin
autocmd BufNewFile,BufRead *.t set syntax=perl

" to show real tabs and spaces in file
set list
set listchars=tab:>-,trail:^,eol:$
"set listchars=tab:>-,trail:-

"to add spaces instead of tabs
set expandtab

" evil, bad! -- hard tabs should be 8 chars... --lindes
" set tabstop=4
" _but_ we can use this:
set smarttab

"use arrow keys to move to previous and next buffers
nnoremap  :bn
nnoremap  :bp

"make the background light
set background=light

"show matching parens
set showmatch

"show row and column number
set ruler

" allow backspacing over everything in insert mode
set backspace=indent,eol,start

filetype plugin indent on

"set shiftwidth to 2 for ruby only
autocmd FileType ruby setlocal  sw=2

"shortcuts inspired by
let mapleader = " "
map n :execute 'NERDTreeToggle ' . getcwd()

let g:fuzzy_ignore = "*.log"
let g:fuzzy_matching_limit = 70
map ft :FuzzyFinderTextMate
map fb :FuzzyFinderBuffer
map ff :FuzzyFinderFile =fnamemodify('**/x', ':p')
map fm :FuzzyFinderMruFile

command Ped :exec '!p4 edit %'
command Pad :exec '!p4 add %'

set backupdir=~/.vim-tmp
set directory=~/.vim-tmp


Written by imsaar

November 24, 2009 at 6:19 am

Posted in configuration

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 )

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

%d bloggers like this: