Giter VIP home page Giter VIP logo

cs-mgmt.vim's Introduction

cs-mgmt.vim

Introduction

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.

Usage

Pressing cs, to display your cs-mgmt database within vim's buffer. And then you can operate these referencing file by hot-keys.

Command

:CsMgmt and cs

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.

:Csmgmtadd

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

Example

: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

Options

g:CsMgmtRefHome

your cscope's database will be putted into this folder.

let g:CsMgmtRefHome = $HOME.'/.cs-mgmt/'

g:CsMgmtDbFile

It is a txt file of JSON format. that defined your db structure.

let g:CsMgmtDbFile = $HOME.'/.cs-mgmt.json

g:CsMgmtSrcDepot

Where will put your source code that build by CsMgmtAdd comamnd.

let g:CsMgmtSrcDepot = g:CsMgmtRefHome.'.source_depot/'

g:CsMgmtReAttach

Re-attach your reference file after rebuilding.

let g:CsMgmtReAttach = 1

g:CsMgmtCtags

Support tags referencing file. It will also create a tags file of ctags after creating referencing file of cscope

let g:CsMgmtCtags = 1

g:CsMgmtDebugEnable

Enable debug mode. The default is based on Decho plugin.

let g:CsMgmtDebugEnable = 1

JSON File

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/', 
        ],
}

Key Mapping In Menu

When you cursor focused on buffer of CsMgmt, following key can be used to manage your reference configuration.

Operation:

  • Press a to attach
  • Press d to detach
  • Press b to build db
  • Press r to rebuild db

Group Operation:

  • It will do group operation, if the cursor is under group tag.

Access Operation:

  • Press dd to delete a single reference or whole group.
  • Press oo to open all file on vim buffer at one time.

cs-mgmt.vim's People

Contributors

blue119 avatar czchen avatar

Stargazers

 avatar  avatar

Watchers

 avatar

cs-mgmt.vim's Issues

new configration structure

new struct
{
version: xxxx,
lastupdate: xxxxx,
dbs: {
foo: {
type: item,
src: ['/foo/bar', /bar/foo'],
lastupdate: xxxxx,
chksum: xxxxxx,
filter: xxxxxx,
},
bar-group: {
type: group
children: ['bar1', 'bar2', 'bar3'],
lastupdate: xxxxx,
chksum: xxxxxx,
filter: xxxxxx,
},
},
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.