Providing a efficient way of managing the symbol cross-reference(cscope) and tag files(ctags).
- Offer a menu for choosing which one referencing file you want to include.
- There is one file contain all information about your referencing file structure.
- One command to create item to cs-mgmt db. and then to operate your db with hotkey within buffer of cs-mgmt.
- Providing attach, detach, delete, build, and rebuild function for referencing file operation.
- All referencing files concentrated into same folder in $HOME/.cs-mgmt. so you can know how many that you have and attaching them on the fly by cs-mgmt's menu within vim.
Pressing cs, to display your cs-mgmt database within vim's buffer. And then you can operate these referencing file by hot-keys.
Used as toggle command to open or close cs-mgmt menu. the hot-key 'q' can be used to close cs-mgmt buffer as well.
It is used to add a configure to your cs-mgmt db file that is a JSON file. Currently, It only support two types of compress file: .tar.gz and .tar.bz2
:Csmgmtadd <file|dir|url|apt> <src path> [<alias> [<group>]]
:Csmgmtadd dir ~/foo/bar # Add a "bar" in top level
:Csmgmtadd dir ~/foo/bar foo_bar # Add a "foo_bar" in top level
:Csmgmtadd dir ~/foo/bar foo_bar group/foo/bar # Add a "foo_bar" in group/foo/bar level
your cscope's database will be putted into this folder.
let g:CsMgmtRefHome = $HOME.'/.cs-mgmt/
'
It is a txt file of JSON format. that defined your db structure.
let g:CsMgmtDbFile = $HOME.'/.cs-mgmt.json
Where will put your source code that build by CsMgmtAdd comamnd.
let g:CsMgmtSrcDepot = g:CsMgmtRefHome.'.source_depot/
'
Re-attach your reference file after rebuilding.
let g:CsMgmtReAttach = 1
Support tags referencing file. It will also create a tags file of ctags after creating referencing file of cscope
let g:CsMgmtCtags = 1
Enable debug mode. The default is based on Decho plugin.
let g:CsMgmtDebugEnable = 1
The following JSON file is a simple configuration. It is only define a items for C standard library. If you'd like to edit this file by your self. I don't recommend you do this but I think following the fellowing configuration is a good start.
{
'usr_include' : [
'/usr/include/',
],
}
When you cursor focused on buffer of CsMgmt, following key can be used to manage your reference configuration.
- Press a to attach
- Press d to detach
- Press b to build db
- Press r to rebuild db
- It will do group operation, if the cursor is under group tag.
- Press dd to delete a single reference or whole group.
- Press oo to open all file on vim buffer at one time.