Mercurial > dotfiles
changeset 294:8bc056d80c39
Remove unused stuff, add grepping, shorter status line.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 02 Apr 2015 08:00:31 -0700 |
parents | e2a48fb5e143 |
children | e40cdce29e5a |
files | vim/vimrc |
diffstat | 1 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/vim/vimrc Thu Apr 02 07:59:41 2015 -0700 +++ b/vim/vimrc Thu Apr 02 08:00:31 2015 -0700 @@ -449,9 +449,6 @@ " Simple way to close a buffer without closing the window. nnoremap <leader>bd :bprevious<cr>:bdelete #<cr> -" File-type switching. -nnoremap <leader>ftmd :set ft=markdown<cr> - " Use sane regexes. nnoremap / /\v vnoremap / /\v @@ -472,14 +469,17 @@ " Quick search and replace. function! s:VSetSearch() - let temp = @@ - norm! gvy - let @/ = '\V' . substitute(escape(@@, '\'), '\n', '\\n', 'g') - let @@ = temp + let temp = @@ + norm! gvy + let @/ = '\V' . substitute(escape(@@, '\'), '\n', '\\n', 'g') + let @@ = temp endfunction vnoremap * :<C-u>call <SID>VSetSearch()<CR>//<CR><c-o> vnoremap # :<C-u>call <SID>VSetSearch()<CR>??<CR><c-o> +nnoremap <leader>fa :vimgrep /<C-R><C-W>/ +vnoremap <leader>fa "zy:vimgrep /<C-R>z/ + " Jump to tags by keeping things better in view. Option for jumping to a tag " in a split window where everything is folded except what you need to see. function! JumpToTag() @@ -551,7 +551,7 @@ set statusline+=) " Line and column position and counts. -set statusline+=\ (line\ %l\/%L,\ col\ %03c) +set statusline+=\ (%l\/%L,%03c) " }}}