Skip to content

Commit

Permalink
update vimrc
Browse files Browse the repository at this point in the history
  • Loading branch information
chxuan committed Jun 2, 2018
1 parent 0c2f677 commit e6a3803
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
7 changes: 6 additions & 1 deletion .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ let g:airline_right_alt_sep = ''
" cppfun
nnoremap <leader>y :CopyFun<cr>
nnoremap <leader>p :PasteFun<cr>
nnoremap <leader>U :GoToDefinition<cr>
nnoremap <leader><leader>fp :FormatFunParam<cr>
nnoremap <leader><leader>if :FormatIf<cr>
Expand All @@ -192,6 +193,9 @@ inoremap <silent> <F11> <esc> :RandomColorScheme<cr>
nnoremap <silent> <F12> :ShowColorScheme<cr>
inoremap <silent> <F12> <esc> :ShowColorScheme<cr>
" prepare-code
let g:prepare_code_plugin_path = expand($HOME . "/.vim/plugged/prepare-code")

" nerdtree
nnoremap <silent> <leader>n :NERDTreeToggle<cr>
inoremap <silent> <leader>n <esc> :NERDTreeToggle<cr>
Expand All @@ -211,7 +215,8 @@ let g:ycm_seed_identifiers_with_syntax = 1
let g:ycm_complete_in_comments = 1
let g:ycm_complete_in_strings = 1
nnoremap <leader>u :YcmCompleter GoToDeclaration<cr>
nnoremap <leader>i :YcmCompleter GoToDefinition<cr>
" 已经使用cppfun插件提供的转到函数实现的功能
" nnoremap <leader>i :YcmCompleter GoToDefinition<cr>
nnoremap <leader>o :YcmCompleter GoToInclude<cr>
nnoremap <leader>ff :YcmCompleter FixIt<cr>
nmap <F5> :YcmDiags<cr>
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ An automatic configuration program for vim

| 插件 | 说明 |
| ------- | ----- |
| [cppfun][58] | 生成函数实现(I'm author:smile:) |
| [cppfun][58] | 提供生成函数实现、函数声明/实现跳转等功能(I'm author:smile:) |
| [change-colorscheme][27] | 随心所欲切换主题(I'm author:smile:) |
| [prepare-code][67] | 新建文件时,生成预定义代码片段(I'm author:smile:) |
| [vimplus-startify][66] | vimplus开始页面(修改自[mhinz/vim-startify][25]) |
Expand Down Expand Up @@ -118,11 +118,11 @@ An automatic configuration program for vim
| `<leader>n` | 打开/关闭代码资源管理器 |
| `<leader>t` | 打开/关闭函数列表 |
| `<leader>a` | .h .cpp 文件切换 |
| `<leader>i` | 转到函数声明 |
| `<leader>u` | 转到函数实现 |
| `<leader>u` | 转到函数声明 |
| `<leader>U` | 转到函数实现 |
| `<leader>o` | 打开include文件 |
| `<leader>y` | 拷贝函数声明 |
| `<leader>p` | 生成函数定义 |
| `<leader>p` | 生成函数实现 |
| `<leader>w` | 单词跳转 |
| `<leader>f` | 搜索~目录下的文件 |
| `<leader>F` | 搜索当前目录下的文本 |
Expand Down
6 changes: 3 additions & 3 deletions help.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
| `<leader>n` | 打开/关闭代码资源管理器 |
| `<leader>t` | 打开/关闭函数列表 |
| `<leader>a` | .h .cpp 文件切换 |
| `<leader>i` | 转到函数声明 |
| `<leader>u` | 转到函数实现 |
| `<leader>u` | 转到函数声明 |
| `<leader>U` | 转到函数实现 |
| `<leader>o` | 打开include文件 |
| `<leader>y` | 拷贝函数声明 |
| `<leader>p` | 生成函数定义 |
| `<leader>p` | 生成函数实现 |
| `<leader>w` | 单词跳转 |
| `<leader>f` | 搜索~目录下的文件 |
| `<leader>F` | 搜索当前目录下的文本 |
Expand Down

0 comments on commit e6a3803

Please sign in to comment.