comparison vimrc @ 175:a7247b4a7e69

Fix issue with mapping where vim would hang on unmapped <leader> keys
author zegervdv <zegervdv@me.com>
date Tue, 04 Nov 2014 20:49:12 +0100
parents e4c677e2acde
children f817460f011a
comparison
equal deleted inserted replaced
174:e4c677e2acde 175:a7247b4a7e69
120 120
121 " Set leader to space 121 " Set leader to space
122 " let mapleader = " " 122 " let mapleader = " "
123 map <space> <leader> 123 map <space> <leader>
124 124
125 " Fix weird error where space n hangs vim with search
126 noremap <space>n <nop>
127
125 " See long lines as line breaks 128 " See long lines as line breaks
126 map j gj 129 map j gj
127 map k gk 130 map k gk
128 131
129 " remap tag-search to better place 132 " remap tag-search to better place
148 151
149 " Jump out of inner bracket 152 " Jump out of inner bracket
150 inoremap <C-f> <ESC>%%a 153 inoremap <C-f> <ESC>%%a
151 154
152 " Switch between the last two files 155 " Switch between the last two files
153 nnoremap <SPACE><SPACE> <C-^> 156 nnoremap <leader><leader> <C-^>
154 " Move between buffers 157 " Move between buffers
155 nnoremap gb :bnext<CR> 158 nnoremap gb :bnext<CR>
156 nnoremap gB :bprevious<CR> 159 nnoremap gB :bprevious<CR>
157 160
158 " Very Magic search patterns 161 " Very Magic search patterns
161 164
162 " Keep search matches in the middle of the window. 165 " Keep search matches in the middle of the window.
163 nnoremap n nzzzv 166 nnoremap n nzzzv
164 nnoremap N Nzzzv 167 nnoremap N Nzzzv
165 168
166 " Show local search results in quickfix
167 nnoremap <silent> <leader>/ :execute 'vimgrep /'.@/.'/g %'<CR>:copen<CR>
168 nnoremap <silent> <leader>? :Ag <cword><CR>
169 " nnoremap <silent> <leader>? :execute "Ag! '" . substitute(substitute(substitute(@/, "\\\\<", "\\\\b", ""), "\\\\>", "\\\\b", ""), "\\\\v", "","") . "'"<CR>
170
171 " Clear highlight 169 " Clear highlight
172 nnoremap <silent> <C-l> :nohl<CR> 170 nnoremap <silent> <C-l> :nohl<CR>
173 171
174 inoremap £ \ 172 inoremap £ \
175 173
176 nnoremap <TAB> % 174 nnoremap <TAB> %
177 vnoremap <TAB> % 175 vnoremap <TAB> %
178
179 " Move between tabs
180 map <leader> w <ESC>:tabprevious<CR>
181 map <leader> n <ESC>:tabnext<CR>
182 176
183 " Move between splits 177 " Move between splits
184 map <C-j> <C-w>j 178 map <C-j> <C-w>j
185 map <C-k> <C-w>k 179 map <C-k> <C-w>k
186 map <C-l> <C-w>l 180 map <C-l> <C-w>l
496 " Use vimfiler as default 490 " Use vimfiler as default
497 let g:vimfiler_as_default_explorer = 1 491 let g:vimfiler_as_default_explorer = 1
498 nnoremap <leader>e :VimFilerExplorer<CR> 492 nnoremap <leader>e :VimFilerExplorer<CR>
499 let g:vimfiler_ignore_pattern = '\%(.o\|.bin\|.elf\|.un\~\|.swp\)$' 493 let g:vimfiler_ignore_pattern = '\%(.o\|.bin\|.elf\|.un\~\|.swp\)$'
500 " }}} 494 " }}}
501 " Vim - Rspec {{{
502 map <leader>t :call RunCurrentSpecFile()<CR>
503 " map <leader>s :call RunNearestSpec()<CR>
504 " map <leader>l :call RunLastSpec()<CR>
505 " map <leader>r :call RunAllSpecs()<CR>
506 " }}}
507 " Cucumber {{{ 495 " Cucumber {{{
508 " map <leader>f :call RunAllFeatures()<CR> 496 " map <leader>f :call RunAllFeatures()<CR>
509 " map <leader>k :call RunCurrentFeature()<CR> 497 " map <leader>k :call RunCurrentFeature()<CR>
510 " }}} 498 " }}}
511 " Markdown {{{ 499 " Markdown {{{