diff --git a/vim/config/init.vim b/vim/config/init.vim index 842ed53..30a0d95 100644 --- a/vim/config/init.vim +++ b/vim/config/init.vim @@ -44,6 +44,7 @@ Plug 'Shougo/deoplete.nvim' " autocomplete let g:deoplete#enable_at_startup = 1 Plug 'scrooloose/syntastic' " syntax checker +Plug 'bkad/CamelCaseMotion' " camel case and underscore word movements Plug 'LargeFile' " gracefully handle very large files Plug 'tpope/vim-commentary' " toggle comments in code easily Plug 'tmux-plugins/vim-tmux-focus-events' " allow transitions within tmux @@ -275,6 +276,28 @@ nnoremap k gk vnoremap j gj vnoremap k gk +" camel case movements +map ,w CamelCaseMotion_w +map ,b CamelCaseMotion_b +map ,e CamelCaseMotion_e +map ,ge CamelCaseMotion_ge + +" inner _ objects +omap iw CamelCaseMotion_iw +xmap iw CamelCaseMotion_iw +omap ib CamelCaseMotion_ib +xmap ib CamelCaseMotion_ib +omap ie CamelCaseMotion_ie +xmap ie CamelCaseMotion_ie + +" a _ objects +omap aw CamelCaseMotion_aw +xmap aw CamelCaseMotion_aw +omap ab CamelCaseMotion_ab +xmap ab CamelCaseMotion_ab +omap ae CamelCaseMotion_ae +xmap ae CamelCaseMotion_ae + " remove trailing whitespace: map mw:%s/\s\+$//:let @/ = ""'w