Просмотр исходного кода

add new shortcuts to vim

toggle for nerdcommenter (although visual mode doesn't seem to work) and better
beginning/end of line
Weiyi Lou 13 лет назад
Родитель
Сommit
3af7fdfb95
1 измененных файлов с 8 добавлено и 2 удалено
  1. 8 2
      vim/vimrc

+ 8 - 2
vim/vimrc

@@ -140,9 +140,11 @@ nmap <leader>j o<Esc>k
 nmap <leader>k O<Esc>j
 nmap <leader>k O<Esc>j
 
 
 " Toggle NERDTree instead of the normal dir browser
 " Toggle NERDTree instead of the normal dir browser
-nmap <silent> <leader>d   :NERDTreeToggle<CR>
+nnoremap <silent> <leader>d    :NERDTreeToggle<CR>
 
 
 " Comment out lines with NERDCommenter
 " Comment out lines with NERDCommenter
+nnoremap <silent> <leader>,    :call NERDComment(0, "toggle")<CR>
+vnoremap <silent> <leader>,    <ESC>:call NERDComment(1, "toggle")<CR>
 
 
 " Edit .vimrc
 " Edit .vimrc
 map <leader>v   :e $MYVIMRC<CR>
 map <leader>v   :e $MYVIMRC<CR>
@@ -151,6 +153,10 @@ map <leader>v   :e $MYVIMRC<CR>
 "" Key Remaps - Movement and Windows
 "" Key Remaps - Movement and Windows
 """"""""""""""""""""""""""""""""""""""""""""""""""""""""
 """"""""""""""""""""""""""""""""""""""""""""""""""""""""
 
 
+" jump to beginning and end of line easier
+nmap H ^
+nmap L $
+
 " Smart way to move btw. windows
 " Smart way to move btw. windows
 map <C-j> <C-W>j
 map <C-j> <C-W>j
 map <C-k> <C-W>k
 map <C-k> <C-W>k
@@ -186,4 +192,4 @@ nnoremap <silent> <expr> ^ ScreenMovement("^")
 """"""""""""""""""""""""""""""""""""""""""""""""""""""""
 """"""""""""""""""""""""""""""""""""""""""""""""""""""""
 
 
 " let g:NERDTreeQuitOnOpen = 1
 " let g:NERDTreeQuitOnOpen = 1
-let g:SuperTabDefaultCompletionType = "context"
+" let g:SuperTabDefaultCompletionType = "context"