]> git.rmz.io Git - dotfiles.git/blobdiff - vim/vimrc
vim: unindent terminating `)`
[dotfiles.git] / vim / vimrc
index 0e533cf4f69e8eea87d6f83a66fb49406cfccf6b..c3fe2daea73723816c6d6b74091d80c6bc0f5e1a 100644 (file)
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -492,12 +492,6 @@ inoremap <C-C> <Esc>gUiwgi
 " http://git.io/v3ZeU
 nmap <silent> <leader>qq :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
 
 " http://git.io/v3ZeU
 nmap <silent> <leader>qq :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
 
-" commands {{{1
-command! Cd cd %:h
-command! Cr execute('cd ' . FindGitDirOrHome())
-command! LCd lcd %:h
-command! LCr execute('lcd ' . FindGitDirOrHome())
-
 " plugins options {{{1
 " airline {{{2
 let g:airline#extensions#whitespace#enabled = 1
 " plugins options {{{1
 " airline {{{2
 let g:airline#extensions#whitespace#enabled = 1
@@ -741,6 +735,7 @@ function! SortLinesOpFunc(...)
   '[,']sort
 endfunction
 nnoremap <silent> gs :<C-U>set operatorfunc=SortLinesOpFunc<CR>g@
   '[,']sort
 endfunction
 nnoremap <silent> gs :<C-U>set operatorfunc=SortLinesOpFunc<CR>g@
+vnoremap <silent> gs :sort<cr>
 
 " edit configs  {{{2
 function! EditConfig(what)
 
 " edit configs  {{{2
 function! EditConfig(what)
@@ -811,5 +806,9 @@ function! FindGitDirOrHome()
     return '~'
   endif
 endfunction
     return '~'
   endif
 endfunction
+command! Cd cd %:h
+command! Cr execute('cd ' . FindGitDirOrHome())
+command! LCd lcd %:h
+command! LCr execute('lcd ' . FindGitDirOrHome())
 
 " vim:set et sw=2 ts=2 tw=78:
 
 " vim:set et sw=2 ts=2 tw=78: