Skip to content
Browse files

Way better vim setup

  • Loading branch information...
1 parent 8624dd6 commit 8daf17138c53ae7e5dc706d4d303fedf677e7ad3 @listrophy committed Apr 2, 2012
Showing with 70 additions and 1 deletion.
  1. +70 −1 .vimrc.local.example
View
71 .vimrc.local.example
@@ -1,6 +1,75 @@
syntax on
filetype plugin indent on
+colorscheme vividchalk
+set autoindent
+set background=dark
+set backupdir=~/.vimbackupdir,~/tmp,~/,.
+set directory=~/.vimbackupdir,~/tmp,~/,.
+set expandtab
+set filetype=sh
+set guifont=Inconsolata:h16
+set guioptions-=T guioptions-=e guioptions-=L guioptions-=r
+set hlsearch
+set ignorecase
+set listchars=tab:⇀\ ,trail:␠
+set matchpairs+=<:>
+set modeline
+set modelines=5
+set number
+set wrap
+set ruler
+set shell=bash
set shiftwidth=2
+set showmatch
+set sts=2
set tabstop=2
-set expandtab
+set tildeop
+set visualbell
+set wildmenu
+set wildmode=longest,list,full
+
+au! BufRead,BufNewFile *.rb
+au! BufRead,BufNewFile *.xml
+au BufRead,BufNewFile *.scss set filetype=sass
+
+" CocoaPods
+au BufRead,BufNewFile Podfile,*podspec set filetype=ruby
+
+" Fix trailing whitespace
+command! -bar -range=% Trim :<line1>,<line2>s/\s\+$//e
+
+" find current file in NERDTree
+map <silent> <C-s> :NERDTree<CR>:wincmd l<CR>:NERDTreeFind<CR>
+
+" clear search
+nmap <silent> ,/ :nohlsearch<CR>
+
+nmap \\ <plug>NERDCommenterToggle<CR>
+vmap \\ <plug>NERDCommenterToggle<CR>
+
+map <silent> <C-h> :wincmd h<CR>
+map <silent> <C-Left> :wincmd h<CR>
+map <silent> <C-k> :wincmd k<CR>
+map <silent> <C-Up> :wincmd k<CR>
+map <silent> <C-j> :wincmd j<CR>
+map <silent> <C-Down> :wincmd j<CR>
+map <silent> <C-l> :wincmd l<CR>
+map <silent> <C-Right> :wincmd l<CR>
+
+map <silent> <C-Z> :retab<CR> :Trim<CR>
+
+map <C-J> ddp
+map <C-K> ddkP
+
+map <silent> <D-1> :tabn 1<CR>
+map <silent> <D-2> :tabn 2<CR>
+map <silent> <D-3> :tabn 3<CR>
+map <silent> <D-4> :tabn 4<CR>
+map <silent> <D-5> :tabn 5<CR>
+map <silent> <D-6> :tabn 6<CR>
+map <silent> <D-7> :tabn 7<CR>
+map <silent> <D-8> :tabn 8<CR>
+map <silent> <D-9> :tabn 9<CR>
+
+map Y y$

0 comments on commit 8daf171

Please sign in to comment.
Something went wrong with that request. Please try again.