Mercurial > public > dotfiles
changeset 16:b8049010198a
Changes to .vimrc after reading Practical Vim.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 29 Dec 2013 18:22:38 -0600 |
parents | 9b01ad28a5c3 |
children | 45dbc5547309 |
files | vim/.vimrc |
diffstat | 1 files changed, 12 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/vim/.vimrc Sun Dec 29 18:21:04 2013 -0600 +++ b/vim/.vimrc Sun Dec 29 18:22:38 2013 -0600 @@ -49,25 +49,21 @@ set background=dark colorscheme peaksea2 -" colorscheme Dark " shortcut for word completion in insert mode imap <S-Tab> <C-n> " buffer next and previous commands -nnoremap <Tab> :bnext<CR> -nnoremap <S-Tab> :bprevious<CR> +" TODO: find a better mapping +" TODO: nnoremap <Tab> :bnext<CR> +" TODO: nnoremap <S-Tab> :bprevious<CR> " Remove extra trailing spaces nnoremap <F2> :%s/\s\+$//<CR> " setlocal spell spelllang=en_us -let mapleader="," - -" NERD tree plugin -" nmap ,n :NERDTreeToggle<CR> -" let g:NERDTreeQuitOnOpen=1 +let mapleader="\\" " ctags support @@ -92,23 +88,23 @@ set gdefault set showmatch set formatoptions=tcqrn1 -nnoremap ,/ :noh<CR> -" nnoremap / /\v -" vnoremap / /\v +nnoremap <leader>/ :noh<CR> +nnoremap / /\v +vnoremap / /\v " Splitting windows and moving around between them: -nnoremap ,v <C-w>v<C-w>l +nnoremap <leader>v <C-w>v<C-w>l nnoremap <C-h> <C-w>h nnoremap <C-j> <C-w>j nnoremap <C-k> <C-w>k nnoremap <C-l> <C-w>l " Absolute vs relative line numbers: -nnoremap ,na :set norelativenumber<CR>:set number<CR> -nnoremap ,nr :set relativenumber<CR> +nnoremap <leader>na :set norelativenumber<CR>:set number<CR> +nnoremap <leader>nr :set relativenumber<CR> " Format paragraph -nnoremap ,p gqip +nnoremap <leader>p gqip function BgnSwitchPart() python << EOF @@ -136,7 +132,7 @@ EOF endfunction -nnoremap ,s :call BgnSwitchPart()<CR> +nnoremap <leader>s :call BgnSwitchPart()<CR> " Pathogen support call pathogen#infect()