-
Notifications
You must be signed in to change notification settings - Fork 0
/
osxvimrc
73 lines (65 loc) · 1.97 KB
/
osxvimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
" prep vundle
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
" load plugins; remember to run :BundleInstall
Bundle 'kien/ctrlp.vim'
Bundle 'Lokaltog/vim-easymotion'
Bundle 'kchmck/vim-coffee-script'
Bundle 'tpope/vim-rails'
Bundle 'scrooloose/syntastic'
Bundle 'scrooloose/nerdtree'
Bundle 'tpope/vim-endwise'
Bundle 'tpope/vim-surround'
Bundle 'tpope/vim-repeat'
Bundle 'tpope/vim-fugitive'
Bundle 'bling/vim-airline'
Bundle 'altercation/vim-colors-solarized'
Bundle 'mattn/emmet-vim'
Bundle 'groenewege/vim-less.git'
Bundle 'bronson/vim-trailing-whitespace'
" visual settings
syntax enable
set background=dark
colorscheme solarized
set guifont=Inconsolata\ for\ Powerline:h22
" use bar cursor in insert mode
let &t_SI = "\<Esc>]50;CursorShape=1\x7"
let &t_EI = "\<Esc>]50;CursorShape=0\x7"
" leader + shortcuts
let mapleader = ","
nnoremap <leader>p :CtrlP<cr>
nnoremap <leader>w :w<cr>
nnoremap <leader>v :e $MYVIMRC<cr>
nnoremap <leader>s :source $MYVIMRC<cr>
nnoremap <leader>t :NERDTreeToggle<cr>
inoremap jj <Esc>
inoremap <leader>a <C-N>
nnoremap <tab> %
vnoremap <tab> %
nnoremap j gj
nnoremap k gk
" settings
set shortmess+=A " stop warning on .swp files
set number " show line numbers
set tabstop=4 " AN uses hard tabs
set shiftwidth=4 " AN uses hard tabs
set noexpandtab " AN uses hard tabs
set autoindent " indent on paste
set scrolloff=999 " center the screen on the cursor
set incsearch " handle searching better
set ignorecase " handle searching better
set smartcase " handle searching better
set wildignore+=*/tmp/*,*.swp,*/coverage/*,*/doc/*,*/log/*,*/db/*,*/vcr/*,*mocha_runner* " ignore useless files in Ctrl-P
" command to convert spaces to tabs - used by selecting text, then
" :SuperRetab #
:command! -nargs=1 -range SuperRetab <line1>,<line2>s/\v%(^ *)@<= {<args>}/\t/g
" zen shortcuts
imap <leader>c <c-y>,
nmap <leader>c <c-y>,
" airline open & settings
set laststatus=2
let g:airline_theme='solarized'
let g:airline_powerline_fonts=1