Comments (5)
Does https://github.com/eapache/starscope/blob/master/doc/USER_GUIDE.md#editor-and-workflow-integration answer your question? Vim's cscope integration is quite good already.
If you want to build proper, native integration you will need to write a vim plugin. http://mattmargolis.net/scripting_vim_with_ruby.pdf is a bit old and might be out-of-date, but will probably point you in the right direction.
from starscope.
Thanks for the reply, Evan.
I do use tpopes setup for ctags. But I'm still a little unclear on the steps to use starscope with vim's builtin cscope support. Can you confirm I have it right?
- Add the line:
starscope --quiet -e cscope & i
to the tpope git hook files. - Now a cscope db file with the name 'cscope' will be added... where exactly? Inside of '.git', like the ctags file?
- Now I have a cscope file vim can use, and so at this point it's just a matter of
:he cscope
and then setting up the mappings I want to vim's various cscope commands -- is that correct? - Continuing point 3, I would have to
:cs add .git/cscope
or something like this, to setup the connection to the cscope db file created by starscope? - Use
:cs find...
commands to implement "Find references..." and other similar queries. - Roll my own vimscript if I want those commands wrapped up with nice names in a dropdown from the cursor?
Just want to make sure I'm understanding everything from a high-level before embarking on the actual setup...
Thanks again.
from starscope.
- You don't need to use it with git hooks. If you're still experimenting, you might do better to run it manually until you have a setup you're happy with.
- I'm not sure what the current working directory will be... your best bet is simply to run it once and see. I suspect it will either be inside the
.git
folder or it will be right at the root of your repository. It shouldn't be anywhere else so it will be easy to check. - Yup, you can also
:cscope help
for a summary help. - Yes, wherever the file ends up.
- Yes.
- I use bindings derived from http://cscope.sourceforge.net/cscope_maps.vim which you may find helpful.
from starscope.
For what it's worth, the exact section of my .vimrc
dedicated to cscope looks like this:
set cscopetag
set cscopetagorder=1
cscope add cscope.out
nnoremap <Leader>s :cs find s <C-R>=expand("<cword>")<CR><CR>
nnoremap <Leader>c :cs find c <C-R>=expand("<cword>")<CR><CR>
nnoremap <Leader>t :cs find t <C-R>=expand("<cword>")<CR><CR>
nnoremap <Leader>f :cs find f <C-R>=expand("<cfile>")<CR><CR>
nnoremap <Leader>i :cs find i <C-R>=expand("<cfile>")<CR><CR>
from starscope.
Very helpful, ty.
from starscope.
Related Issues (20)
- Parse/Export specified language files only HOT 2
- cannot install starscope on jRuby 9.1.6 HOT 3
- Tags can't be generated on a different path than the root HOT 3
- Exporting to cscope, ctags seems to crash starscope HOT 2
- Consider adding sym table export to ctags HOT 3
- Consider adding cscope output append feature HOT 4
- Cscope generation conflicts between class defs and reads HOT 5
- C# compatibility HOT 5
- JS/TS support is flaky and unmaintained HOT 2
- add sample .starscope.json for reference HOT 6
- Allow specifying .starscope.json config files on a per-directory basis
- Exclude non-ASCII identifiers when exporting to cscope HOT 7
- Fix CI now that Travis is dead? HOT 1
- Pull in enhancements from other forks? HOT 1
- Fix rubocop in CI HOT 1
- Support abbreviated commands in line mode HOT 1
- Ruby 3.1.1 and version 1.6.0 Non Compliance HOT 4
- Starscope::Lang::Ruby raised "undefined method `line' for nil:NilClass HOT 7
- Missing Methods in .starscope.db HOT 4
- Dropbox Update Throws No Such Directory HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from starscope.