mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 07:10:06 +08:00
feat(gtags): add the shortcut for jumping to a symbol
This commit is contained in:
parent
e1fc546d7f
commit
977bf3d0d0
@ -58,6 +58,7 @@ function! SpaceVim#layers#gtags#config() abort
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['m', 'g', 'r'], 'exe "Gtags -r " . expand("<cword>")', 'find-references', 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['m', 'g', 's'], 'exe "Gtags -s " . expand("<cword>")', 'find-cursor-symbol', 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['m', 'g', 'g'], 'exe "Gtags -g " . expand("<cword>")', 'find-cursor-string', 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['m', 'g', 'j'], 'exe "Gtags -d " . input("Jump to the symbol: ")', 'Input a symbol and find the definitions', 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['m', 'g', 'f'], 'Gtags -f %', 'list of objects', 1)
|
||||
let g:gtags_gtagslabel = s:gtagslabel
|
||||
call SpaceVim#plugins#projectmanager#reg_callback(function('s:update_ctags_option'))
|
||||
|
@ -189,3 +189,4 @@ pygments 后,可以通过 gtags 查询函数和变量的定义以及引用处
|
||||
| `SPC m g f` | 列出数据库中所涉及到的文件 |
|
||||
| `SPC m g d` | 查找 definitions |
|
||||
| `SPC m g r` | 查找 references |
|
||||
| `SPC m g j` | 输入符号并查找其定义 |
|
||||
|
@ -156,10 +156,11 @@ the following additional languages will have tags created for them:
|
||||
|
||||
## Key bindings
|
||||
|
||||
| Key Binding | Description |
|
||||
| ----------- | ------------------------------ |
|
||||
| `SPC m g c` | create a tag database |
|
||||
| `SPC m g u` | manually update tag database |
|
||||
| `SPC m g f` | jump to a file in tag database |
|
||||
| `SPC m g d` | find definitions |
|
||||
| `SPC m g r` | find references |
|
||||
| Key Binding | Description |
|
||||
| ----------- | ----------------------------------- |
|
||||
| `SPC m g c` | create a tag database |
|
||||
| `SPC m g u` | manually update tag database |
|
||||
| `SPC m g f` | jump to a file in tag database |
|
||||
| `SPC m g d` | find definitions |
|
||||
| `SPC m g r` | find references |
|
||||
| `SPC m g j` | input a symbol and find definitions |
|
||||
|
Loading…
Reference in New Issue
Block a user