brookhong / cscope.vim Goto Github PK
View Code? Open in Web Editor NEWA vim plugin to help you to create/update cscope database and connect to existing proper database automatically.
A vim plugin to help you to create/update cscope database and connect to existing proper database automatically.
I can't seem to find where the cscope database is located. It was autogenerated. I did make it point to a root directory of my project, but I can't see it. Where does it generate the db?
I press <C-\>d
on line let tagsfile = a:global ? g:easytags_file : xolox#easytags#get_tagsfile()
. But cscope.vim
can not find this function's definition place. (The function definition exists in same file).
The output in command line is:
Can not find xolox#misc#option#get with querytype as i.
(I guess maybe cscope can not find string has #
??)
Hi,
Can we get fix to exclude directories from the project ?
I do not want to include files which are part of specific directories under the project directories
If 2 vims generate cscope at different directories, only the last one will be finally logged.
We should add a lock file as flag to avoid this kinds of parallel processing.
How do I add multiple cscope databases to this plugin? I've manually added several with :cs
add but didn't when I execute :CscopeList
I see only the one that was autogenerated
Vim plugin manager always report error when git pull
has unstaged changes in doc/tags
(the changes it auto generated from ctags related vim plugin like easytags.vim).
I think it would be awesome for your already great plugin to support a stack of a buffer's last visited files, just like ctags lets you come back from a jump with Ctrl + T
ID LOADTIMES PATH
1337668712 3 /works/vim/src
'' means the db has been connected.
ID id of the db.
LOADTIMES how many times this db has ever been used.
PATH which folder the db is for.
I can see cscope db within :CscopeList
, however, the DB was not connected, i.e. \*
not appeared and db not seen in :cs show
.
Would you please update the plugin in Vim.org. It doesn't support exclude directories
feature.
Thanks
my cscope_maps.vim
if has("cscope")
""""""""""""" Standard cscope/vim boilerplate
" use both cscope and ctag for 'ctrl-]', ':ta', and 'vim -t'
set cscopetag
" check cscope for definition of a symbol before checking ctags: set to 1
" if you want the reverse search order.
set csto=0
set cscopequickfix=s-,c-,d-,i-,t-,e-
" add any cscope database in current directory
if filereadable("cscope.out")
cs add cscope.out
" else add the database pointed to by environment variable
elseif $CSCOPE_DB != ""
cs add $CSCOPE_DB
endif
.......
.......
" show msg when any other cscope db added
set cscopeverbose
nmap <C-\>s :cs find s <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>g :cs find g <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>c :cs find c <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>t :cs find t <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>e :cs find e <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>f :cs find f <C-R>=expand("<cfile>")<CR><CR>
nmap <C-\>i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
nmap <C-\>d :cs find d <C-R>=expand("<cword>")<CR><CR>
" Using 'CTRL-spacebar' (intepreted as CTRL-@ by vim) then a search type
" makes the vim window split horizontally, with search result displayed in
" the new window.
"
" (Note: earlier versions of vim may not have the :scs command, but it
" can be simulated roughly via:
" nmap <C-@>s <C-W><C-S> :cs find s <C-R>=expand("<cword>")<CR><CR>
nmap <leader>fs :scs find s <C-R>=expand("<cword>")<CR><CR>
nmap <leader>fg :scs find g <C-R>=expand("<cword>")<CR><CR>
nmap <leader>fc :scs find c <C-R>=expand("<cword>")<CR><CR>
nmap <leader>ft :scs find t <C-R>=expand("<cword>")<CR><CR>
nmap <leader>fe :scs find e <C-R>=expand("<cword>")<CR><CR>
nmap <leader>ff :scs find f <C-R>=expand("<cfile>")<CR><CR>
nmap <leader>fi :scs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
nmap <leader>fd :scs find d <C-R>=expand("<cword>")<CR><CR>
is there something wrong?
hi, can you fix it that when i call cscopeupdatedb(), then all cscope db will get connected, i have to remove the db by using cscope kill commands which provided by cscope itself, so I wonder if you can fix the problem, and may give a interface to remove the db connection instead of using the cs kill cmd. thanks ,best regards.BTW, the plugin is magic!
Why not rebase this upon vim-scripts to preserve history from previous releases?
Hi,
If there is a lot change after executing 'git pull' for specific project, how can I rebuilt this project's cs db? Is there any way to incremental update it in this case? Thanks.
It takes a lot of time in updating database as it updates too often. I want it to update automatically, but more silently, better to support asynchronous update.
using the cscope.vim, the result will be listed in the window below, each line contain a result, how can I jump to the target result line, there seems no shortcut key
I think sometimes its better to configure filetypes you want to add to DB (e.g. *.c *.h) and ignore all other. In big projects there is a loooot different filetypes...
Now it just overwrite each time when running CscopeGen. However, the cscope commmand already support incremental update, why do we need to overwrite it? Thanks.
Would be nice to add interface to define file types, e.g. .c,.h,.cpp...
to generate cscope DB.
Error detected while processing function CscopeFind:
line 15:
E121: Undefined variable: a:word
E15: Invalid expression: 'Can not find '.a:word.' with querytype as '.a:action.'.' | echohl None
Currently the folder is created in the home directory.
It would be useful to have an option that allows me to specify a custom location.
Use unicode symbols to mark current line and breakpoints when avaliable
let id = s:dbs[a:dir]['id']
let cscope_files = s:cscope_vim_dir."/".id."_inc.files"
let cscope_db = s:cscope_vim_dir.'/'.id.'_inc.db'
if ! filereadable(cscope_files) || a:init
let cscope_files = s:cscope_vim_dir."/".id.".files"
let cscope_db = s:cscope_vim_dir.'/'.id.'.db'
if ! filereadable(cscope_files)
let files = <SID>ListFiles(a:dir)
call writefile(files, cscope_files)
endif
endif
So if x.files
exist, the update will based on it, however, in some cases the there will be changes in file names and number of files, and path of files... so, obviously the x.files
needs to be updated also everytime the databse is being updated to reliably update database.
I need to add -C
option to cscope command line when adding cscope db to enable case-insensitive search, is there any way to add this option? e.g.
:cs add cscope.out /some/path/src -C
I meet an issue in Ubuntu 14.04. When I try to jump a function, it can jump and lwindow just have one line. Then I changed the source and jump to it again. lwindow will show two lines for the same jump, the first one is still the old and the second one is correct.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.