-
vim-plugPlug 'chxuan/cpp-mode'
-
VundlePlugin 'chxuan/cpp-mode'
-
:CopyFun拷贝函数,和
:PasteFun结合使用 -
:PasteFun生成函数实现,和
:CopyFun结合使用 -
:GoToDefinition转到函数实现,该功能可替代ycm提供的转到函数实现(因为ycm转到函数实现经常不成功)
-
:Switchc++头文件和实现文件切换
-
:FormatFunParam格式化函数参数,用于函数参数列表过多的情况
-
:FormatIf格式化if条件,用于if条件判断过多的情况
请将以下配置加到 ~/.vimrc,如果不喜欢以下映射,可根据个人喜好更改。
nnoremap <leader>y :CopyFun<cr>
nnoremap <leader>p :PasteFun<cr>
nnoremap <leader>U :GoToDefinition<cr>
nnoremap <silent> <leader>a :Switch<cr>
nnoremap <leader><leader>fp :FormatFunParam<cr>
nnoremap <leader><leader>if :FormatIf<cr>
This software is licensed under the MIT license. © 2018 chxuan
