-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
76 lines (55 loc) · 1.8 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
set nocompatible
" Neobundler set-up and plugin loading --{{{
set runtimepath+=~/.vim/bundle/neobundle.vim/
call neobundle#rc(expand('~/.vim/bundle/'))
NeoBundleFetch 'Shougo/neobundle.vim'
NeoBundle 'altercation/vim-colors-solarized'
NeoBundle 'mattn/emmet-vim'
NeoBundle 'klen/python-mode'
" }}}
" Basic settings -{{{
let mapleader=","
set background=dark
colorscheme solarized
syntax on
filetype plugin indent on
set number numberwidth=4 nowrap shiftround ruler visualbell wildmenu
set noerrorbells tabstop=4 expandtab autoindent laststatus=2 shortmess=at
set shiftwidth=4 softtabstop=4 smarttab hlsearch incsearch
" }}}
" Mappings ---{{{
inoremap jk <esc>
inoremap <esc> <nop>
inoremap <leader>u <esc>viwUei
nnoremap <leader>u viwUw
nnoremap <leader>d dd
nnoremap <leader>op :execute "rightbelow vsplit " . bufname("#")<cr>
nnoremap <leader>ev :vsplit $MYVIMRC<cr>
nnoremap <leader>sv :source $MYVIMRC<cr>
" Show / hide lines with trailing whitespace
nnoremap <leader>w :match Error /\v.*\s+$/<cr>
nnoremap <leader>W :match none /\v.*\s+$/<cr>
" toggle highlight search
nnoremap <leader>hl :set hlsearch!<cr>
imap <expr> <tab> emmet#expandAbbrIntelligent("\<tab>")
" }}}
" File-specific settings ----------------------{{{
" Vimscript file settings ---------------------{{{
augroup filetype_vim
autocmd!
autocmd FileType vim setlocal foldmethod=marker foldlevelstart=0
augroup END
" }}}
" Text file settings ------------------------{{{
augroup filetype_text
autocmd!
autocmd FileType text,markdown setlocal wrap
augroup END
" }}}
" }}}
" Grep plugin experiment -{{{
"nnoremap <leader>g :silent execute "grep! -R " . shellescape(expand("<cWORD>")) . " ."<cr>:copen 16<cr>
nnoremap <leader>n :cnext<cr>
nnoremap <leader>p :cprev<cr>
" }}}
NeoBundleCheck