瀏覽代碼

title case line doesn't need visual mode

Daniel Sheffield 2 周之前
父節點
當前提交
3aa0886e8f
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      vim/vimfiles/vimrc

+ 5 - 1
vim/vimfiles/vimrc

@@ -76,10 +76,14 @@ scriptencoding utf-8
 
 " Title Case
 vnoremap gt :s/\%V\v<(.)(\w*)/\u\1\L\2/g<CR>:noh<CR>
-vnoremap gT :s/\v<(.)(\w*)/\u\1\L\2/g<CR>:noh<CR>
+nnoremap gT V:s/\v<(.)(\w*)/\u\1\L\2/g<CR>:noh<CR>
+
+" Quote selection
 vnoremap gi" c"<C-r>""<Esc>
 vnoremap gi' c'<C-r>"'<Esc>
 vnoremap gi` c`<C-r>"`<Esc>
+
+" Bracket selection
 vnoremap gi( c(<C-r>")<Esc>
 vnoremap gi) c(<C-r>")<Esc>
 vnoremap gi[ c[<C-r>"]<Esc>