mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 02:30:03 +08:00
Add cscope doc
This commit is contained in:
parent
4aa42c85a4
commit
add42aafb6
@ -4,3 +4,13 @@ function! SpaceVim#layers#cscope#plugins() abort
|
||||
\ ]
|
||||
return plugins
|
||||
endfunction
|
||||
|
||||
|
||||
function! SpaceVim#layers#cscope#config() abort
|
||||
let g:_spacevim_mappings_space.m.c = {'name' : '+cscope'}
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['m', 'c', 'c'], 'GtagsGenerate!', 'create a gtags database', 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['m', 'c', 'u'], 'GtagsGenerate', 'update tag database', 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['m', 'c', 'f'], 'Unite gtags/path', 'list all file in GTAGS', 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['m', 'c', 'd'], 'Unite gtags/def', 'find definitions', 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['m', 'c', 'r'], 'Unite gtags/ref', 'find references', 1)
|
||||
endfunction
|
||||
|
43
docs/layers/cscope.md
Normal file
43
docs/layers/cscope.md
Normal file
@ -0,0 +1,43 @@
|
||||
---
|
||||
title: "SpaceVim cscope layer"
|
||||
description: "This layer provide cscope manager for project"
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
This layer provides a smart [Cscope](http://cscope.sourceforge.net/) and [PyCscope](https://github.com/portante/pycscope) helper for SpaceVim.
|
||||
|
||||
For more info about the differences between Cscope and other similar tools, please read [Comparison with Similar Tools](https://github.com/oracle/opengrok/wiki/Comparison-with-Similar-Tools)
|
||||
|
||||
## Features
|
||||
|
||||
- Tag indexing and searching for C-C++ via Cscope
|
||||
- Tag indexing and searching for python via PyCscope
|
||||
|
||||
## Installation
|
||||
|
||||
### cscope
|
||||
|
||||
```shell
|
||||
sudo pacman -S cscope
|
||||
```
|
||||
|
||||
### layer
|
||||
|
||||
To use this configuration layer, add it to your `~/.SpaceVim.d/init.vim`.
|
||||
|
||||
```vim
|
||||
call SpaceVim#layers#load('cscope')
|
||||
```
|
||||
|
||||
## Key bindings
|
||||
|
||||
| Key Binding | Description |
|
||||
| ----------- | -------------------------------------- |
|
||||
| `SPC m c i` | Create cscope index |
|
||||
| `SPC m c c` | Find functions called by this function |
|
||||
| `SPC m c C` | Find functions calling this function |
|
||||
| `SPC m c d` | find global definition of a symbol |
|
||||
| `SPC m c r` | find references of a symbol |
|
||||
| `SPC m c u` | manually update tag database |
|
||||
| `SPC m c f` | jump to a file in tag database |
|
@ -52,10 +52,12 @@ call SpaceVim#layers#disable('shell')
|
||||
| [checkers](https://spacevim.org/layers/checkers/) | This layer provides syntax checking feature |
|
||||
| [chinese](https://spacevim.org/layers/chinese/) | Layer for chinese users, include chinese docs and runtime messages |
|
||||
| [colorscheme](https://spacevim.org/layers/colorscheme/) | colorscheme provides a list of colorscheme for SpaceVim, default colorscheme is gruvbox with dark theme. |
|
||||
| [cscope](https://spacevim.org/layers/cscope/) | This layer provide cscope manager for project |
|
||||
| [debug](https://spacevim.org/layers/debug/) | This layer provide debug workflow support in SpaceVim |
|
||||
| [default](https://spacevim.org/layers/default/) | lt layer contains none plugins, but it has some better default config for vim and neovim |
|
||||
| [git](https://spacevim.org/layers/git/) | This layers adds extensive support for git |
|
||||
| [lang#c](https://spacevim.org/layers/lang/c/) | This layer is for c/c++/object-c development |
|
||||
| [lang#dart](https://spacevim.org/layers/lang/dart/) | This layer is for dart development, provide autocompletion, syntax checking, code format for dart file. |
|
||||
| [lang#elixir](https://spacevim.org/layers/lang/elixir/) | This layer is for elixir development, provide autocompletion, syntax checking, code format for elixir file. |
|
||||
| [lang#go](https://spacevim.org/layers/lang/go/) | This layer is for golang development. It also provides additional language-specific key mappings. |
|
||||
| [lang#haskell](https://spacevim.org/layers/lang/haskell/) | This layer is for haskell development |
|
||||
|
Loading…
Reference in New Issue
Block a user