Created
February 18, 2012 18:05
-
-
Save kshwetabh/1860433 to your computer and use it in GitHub Desktop.
My .vimrc configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" | |
" Kumar Shwetabh's Vim Configuration | |
" | |
" Features/Plugins Used | |
" 1. pathogen | |
" 2. NERDTree. | |
" 3. vim-coffee-script | |
" 4. conque | |
" 5. gundo | |
" 6. xpt | |
" 7. vim-colors-solarized | |
" 8. autoclose | |
" | |
"----------------------------------------------------------------------------- | |
"----------------------------------------------------------------------------- | |
" Global Stuff | |
"----------------------------------------------------------------------------- | |
" Set filetype stuff to on | |
filetype on | |
call pathogen#infect() | |
call pathogen#helptags() | |
filetype plugin on | |
filetype indent on | |
set nocompatible | |
" Tabstops are 4 spaces | |
set tabstop=2 | |
set shiftwidth=2 | |
set softtabstop=2 | |
set expandtab | |
set autoindent | |
" set the search scan to wrap lines | |
set wrapscan | |
set ignorecase | |
" Make command line one lines high | |
set ch=1 | |
" set visual bell -- i hate that damned beeping | |
"set vb | |
" Allow backspacing over indent, eol, and the start of an insert | |
set backspace=2 | |
" Set the status line the way i like it | |
" set stl=%f\ %m\ %r%{fugitive#statusline()}\ Line:%l/%L[%p%%]\ Col:%v\ Buf:#%n\ [%b][0x%B] | |
" tell VIM to always put a status line in, even if there is only one window | |
set laststatus=2 | |
" Show the current mode | |
set showmode | |
" Switch on syntax highlighting. | |
syntax on | |
" Set up the gui cursor to look nice | |
set guicursor=n-v-c:block-Cursor-blinkon0,ve:ver35-Cursor,o:hor50-Cursor,i-ci:ver25-Cursor,r-cr:hor20-Cursor,sm:block-Cursor-blinkwait175-blinkoff150-blinkon175 | |
" Keep some stuff in the history | |
set history=100 | |
" These commands open folds | |
set foldopen=block,insert,jump,mark,percent,quickfix,search,tag,undo | |
" Make the command-line completion better | |
set wildmenu | |
" Make it easier to complete buffers, open files, etc... | |
"set wildignorecase | |
" When completing by tag, show the whole tag, not just the function name | |
set showfulltag | |
" Set the textwidth to be 80 chars | |
set textwidth=80 | |
" get rid of the silly characters in separators | |
set fillchars = "" | |
" Add ignorance of whitespace to diff | |
set diffopt+=iwhite | |
" Enable search highlighting | |
set hlsearch | |
" Incrementally match the search | |
set incsearch | |
set number | |
" cd to the directory containing the file in the buffer | |
" nmap <silent> ,cd :lcd %:h<CR> | |
" nmap <silent> <CCD> :lcd %:h<CR> | |
" nmap <silent> ,md :!mkdir -p %:p:h<CR> | |
"----------------------------------------------------------------------------- | |
" NERD Tree Plugin Settings | |
"----------------------------------------------------------------------------- | |
" Toggle the NERD Tree on an off with F9 | |
nmap <F9> :NERDTreeToggle<CR> | |
"----------------------------------------------------------------------------- | |
" FuzzyFinder Settings | |
"----------------------------------------------------------------------------- | |
"let g:fuf_file_exclude = '\v\~$|\.(o|exe|dll|bak|class|meta|lock|orig|jar|swp)$|/test/data\.|(^|[/\\])\.(hg|git|bzr)($|[/\\])' | |
"nmap <silent> ,fv :FufFile ~/.vim/<cr> | |
"nmap <silent> ,fb :FufBuffer<cr> | |
"nmap <silent> ,ff :FufFile<cr> | |
"nmap <silent> ,fc :FufMruCmd<cr> | |
"nmap <silent> ,fm :FufMruFile<cr> | |
"nmap <silent> ,fp :FufFile ~/git/*<cr> | |
"----------------------------------------------------------------------------- | |
" Gundo Settings | |
"----------------------------------------------------------------------------- | |
nnoremap <F10> :GundoToggle<CR> | |
"----------------------------------------------------------------------------- | |
" XPTemplate settings | |
"----------------------------------------------------------------------------- | |
let g:xptemplate_brace_complete = '' | |
"----------------------------------------------------------------------------- | |
" CoffeeScript auto compile settings | |
" The redraw! command is needed to fix a redrawing | |
" quirk in terminal vim, but can removed for gVim | |
"----------------------------------------------------------------------------- | |
au BufWritePost *.coffee silent CoffeeMake! -b | cwindow | |
nmap <F5> :CoffeeRun <CR> | |
"----------------------------------------------------------------------------- | |
" Key mapping to switch between different open windows/buffers in VIM | |
"----------------------------------------------------------------------------- | |
nmap <silent> <A-Up> :wincmd k<CR> | |
nmap <silent> <A-Down> :wincmd j<CR> | |
nmap <silent> <A-Left> :wincmd h<CR> | |
nmap <silent> <A-Right> :wincmd l<CR> | |
"----------------------------------------------------------------------------- | |
" Set up the window colors and size | |
"----------------------------------------------------------------------------- | |
if has("gui_running") | |
" exe "set guifont=" . g:main_font | |
" set background=dark | |
colorscheme solarized | |
if !exists("g:vimrcloaded") | |
winpos 0 0 | |
if !&diff | |
winsize 130 120 | |
else | |
winsize 227 120 | |
endif | |
let g:vimrcloaded = 1 | |
endif | |
endif | |
:nohls |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment