/
.vimrc
97 lines (73 loc) · 2.44 KB
/
.vimrc
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
" init vundle
source ~/.vim/bundle.vim
filetype plugin indent on
se nocompatible
colorscheme solarized
se background=dark
syntax on " syntax highlighting
se encoding=utf-8
se nocompatible
se nobackup
se nowritebackup
se noswapfile
se history=1000
se viminfo+=n~/.vim/.viminfo
se timeout timeoutlen=500 ttimeoutlen=-1
se autoread " auto read files changed outside of vim
se hidden
se nowrap
se lbr
se tabstop=2
se shiftwidth=2
se expandtab
se smarttab
se backspace=indent,eol,start " allow backspacing over everything in insert mode
se scrolloff=6 " keep 4 lines of context when scrolling
set showbreak=↪
" se foldmethod=syntax
" se nofoldenable
se incsearch " do incremental search
se hlsearch " highlight search results
se noignorecase " don't ignore case when matching patterns
se smartcase " ignores ignorecase when pattern contains uppercase characters
se wildmenu " use wild menus
se laststatus=2 " always show the status bar
se number " show line numbers
se numberwidth=5
se ruler " show line/column number
se showcmd
se winminheight=0
se winheight=999
se fillchars+=vert: " non breaking space
se noerrorbells
" super slow cursor movement, unfortunately https://github.com/vim/vim/issues/282
" se cursorline
se linespace=2
se guifont=Menlo\ for\ Powerline:h14.00
se clipboard=unnamed " use the OSX clipboard
" se paste
se <BS>=
compiler ruby
au FocusLost * :silent! wa " autosave on focus lost
au BufWritePre * :%s/\s\+$//e " remove whitespace on save
au WinEnter * wincmd _ " horizontally maximize windows on enter
let mapleader = " "
map <tab> <c-w>w
map <s-tab> <c-w>W
vnoremap p "0dP
" Use ctrl-n to unhighlight search results in normal mode
nmap <silent> <C-N> :silent noh<CR>
" nnoremap <D-j> :m+<CR>==
" nnoremap <D-k> :m-2<CR>==
" inoremap <D-j> <Esc>:m+<CR>==gi
" inoremap <D-k> <Esc>:m-2<CR>==gi
" vnoremap <D-j> :m'>+<CR>gv=gv
" vnoremap <D-k> :m-2<CR>gv=gv
au BufNewFile,BufRead *.coffee set filetype=coffee
au BufNewFile,BufRead *.hbs set filetype=handlebars
au BufNewFile,BufRead *.slim set filetype=slim
au VimEnter * exe ":VimTree"
let g:ctrlp_extensions = ['tag', 'buffertag', 'quickfix', 'dir']
se noshowmode " airline shows the mode
let g:airline_powerline_fonts = 1
let g:airline_section_z="%3p%%%4l%:%3v"