-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc.local
123 lines (98 loc) · 3.55 KB
/
.vimrc.local
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
nnoremap ; :
set listchars=tab:,\ ,trail:\ ,extends:#,nbsp:\ " Just highlight problematic whitespace, don't put punctuation in it too.
set nocursorline " I don't like the cursorline color now.
"set scrolljump=0 " I don't like the jumpiness that much.
set colorcolumn=80
set textwidth=79
" move between split windows with Alt-arrow
nnoremap <silent> <A-Up> :wincmd k<CR>
nnoremap <silent> <A-Down> :wincmd j<CR>
nnoremap <silent> <A-Left> :wincmd h<CR>
nnoremap <silent> <A-Right> :wincmd l<CR>
" also with Ctrl-<hjkl key>
nnoremap <silent> <C-h> <C-w>h
nnoremap <silent> <C-j> <C-w>j
nnoremap <silent> <C-k> <C-w>k
nnoremap <silent> <C-l> <C-w>l
" map <leader>d to delete to black hole register
nnoremap <leader>d "_dd
vnoremap <leader>d "_dd
" seems to already happen, but eh
" dump line to black hole, put clean line in its place
nnoremap <leader>D "_ddO<Esc>
nnoremap <leader><leader>d "_ddO<Esc>
" map <leader>w to remove trailing whitespace across file
nnoremap <leader>W :%s/\s\+$//e<CR>
vnoremap <leader>W :%s/\s\+$//e<CR>
" I use tabs now. Tabs are cool.
nnoremap <silent> <leader>tt :tabnew<CR>
nnoremap <silent> <leader>tp :tabprev<CR>
nnoremap <silent> <leader>tn :tabnext<CR>
nnoremap <silent> <leader>tq :tabclose<CR>
" Toggle NERDTree
nmap <leader>b :NERDTreeTabsToggle<CR>
" Vundle mappings
nnoremap <leader>vl :BundleList<CR>
nnoremap <leader>vi :BundleInstall<CR>
nnoremap <leader>vI :BundleInstall!<CR>
nnoremap <leader>vc :BundleClean<CR>
nnoremap <leader>vC :BundleClean!<CR>
" Clear search highlighting
nnoremap <silent> <leader>/ :nohlsearch<CR>
nnoremap <silent> <CR> :nohlsearch<CR>
" Make up/down jump to next line in editor, not file
"nnoremap <Up> g<Up>
"nnoremap <Down> g<Down>
" Time to try to learn hjkl instead of arrow keys
noremap <Up> <nop>
noremap <Down> <nop>
noremap <Left> <nop>
noremap <Right> <nop>
" Thanks learn-vimscript-the-hard-way!
imap <c-u> <esc>viwUi
nmap <c-u> viwU
" ack.vim
noremap <leader>a :Ack <cword><CR>
noremap <leader>A :Ack<Space>
" grunt.vim
noremap <C-g> :Grunt<Space>
" J joins lines... K splits lines
nnoremap K i<CR><Esc>
" Powerline segment to indicate the presence of trailing whitespace
"call Pl#Theme#InsertSegment('ws_marker', 'after', 'lineinfo')
" ConqueTerm mapping if we have python support and hence conque shell
if has("python")
nnoremap <leader>qq :ConqueTermVSplit bash<CR>
let g:ConqueTerm_CloseOnEnd = 1
endif
" Don't highlight whitespace in Makefiles
autocmd FileType make set invlist
autocmd FileType conque_term set invlist " same for conque term
autocmd FileType gitcommit set invlist " and for commit messages
autocmd FileType json nnoremap <silent> <leader>s :setlocal conceallevel=0<CR>
autocmd FileType json setlocal conceallevel=0
let g:vim_json_syntax_conceal = 0
" Make it easy to use emmet.io
noremap <leader>z <End> :call emmet#expandAbbr(3, "")<CR>
" Sometimes the Solarized theme freaks out?
set bg=dark
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
let g:airline_left_sep = '⮀'
let g:airline_left_alt_sep = '⮁'
let g:airline_right_sep = '⮂'
let g:airline_right_alt_sep = '⮃'
let g:airline_symbols.branch = '⭠'
let g:airline_symbols.readonly = '⭤'
let g:airline_symbols.linenr = '⭡'
let g:pymode_rope_autoimport_import_after_complete = 1
let g:pymode_rope_regenerate_on_write = 0
let g:pymode_lint = 0
" Fold settings
" I've had it with these monkey-fighting folds in this Monday-to-Friday buffer!
set nofoldenable
"let g:pymode_debug = 1
let g:pymode_breakpoint_bind = '<leader>B'
let g:pymode_no_change_on_autoimport = 1
nnoremap <leader>rp :PymodeRopeRegenProject<CR>