Skip to content
Browse files

Adds my vim customizations

  • Loading branch information...
1 parent 93eb93f commit 5c7f762529485ec205252b243e2c107d39cc9832 @alindeman committed
Showing with 78 additions and 0 deletions.
  1. +71 −0 vimrc.after
  2. +7 −0 vimrc.before
View
71 vimrc.after
@@ -0,0 +1,71 @@
+" More sane searching
+nnoremap / /\v
+vnoremap / /\v
+set ignorecase
+set smartcase
+set incsearch
+set showmatch
+set hlsearch
+
+" <leader><space> clears search
+nnoremap <leader><space> :noh<cr>
+
+" <leader><leader> toggles between files
+nnoremap <leader><leader> <c-^>
+
+" <tab> matches bracket pairs
+nnoremap <tab> %
+vnoremap <tab> %
+
+" show colored column at 80
+set colorcolumn=80
+
+" Disable arrow keys
+"nnoremap <up> <nop>
+"nnoremap <down> <nop>
+"nnoremap <left> <nop>
+"nnoremap <right> <nop>
+"inoremap <up> <nop>
+"inoremap <down> <nop>
+"inoremap <left> <nop>
+"inoremap <right> <nop>
+
+" j and k move by screen lines
+nnoremap j gj
+nnoremap k gk
+
+" I never really want to hit F1
+inoremap <F1> <ESC>
+nnoremap <F1> <ESC>
+vnoremap <F1> <ESC>
+
+" shortcut for :Ack
+nnoremap <leader>a :Ack
+
+" <leader>v selects text that was just pasted
+nnoremap <leader>v V`]
+
+" <leader>w opens a vertical split window and switches to it
+nnoremap <leader>w <C-w>v<C-w>l
+
+" moving among splits
+nnoremap <C-h> <C-w>h
+nnoremap <C-j> <C-w>j
+nnoremap <C-k> <C-w>k
+nnoremap <C-l> <C-w>l
+
+" autosave
+au FocusLost * :wa
+
+colorscheme solarized
+set transparency=6
+
+" no menubar
+set guioptions=-m
+
+let os = substitute(system('uname'), "\n", "", "")
+if os == "Linux"
+ set guifont=Inconsolata\ 14
+else
+ set guifont=Inconsolata:h14
+endif
View
7 vimrc.before
@@ -0,0 +1,7 @@
+" Thanks http://stevelosh.com/blog/2010/09/coming-home-to-vim/
+
+set ttyfast
+set wildmenu
+
+" Remap leader to comma
+let mapleader = ","

0 comments on commit 5c7f762

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