mhinz / mhinz/vim-startify

cscope does not work when open a file from startify

Open
#543 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Vim Script
Stars
5.4k
Forks
181
PR merge metrics
No merged PRs in 30d

Description

cscope does not work when open a file from startify, show Error "Type number and (q or empty cancels): 1E429: File "include/linux/mm.h" does not exist"

as follow:
https://raw.githubusercontent.com/zaiqiang-dong/misc/898eedc33cee488ea613b01b12d28c3c160f0989/termtosvg_3w1o_9oc.svg

cscope config in init.vim as follow:
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" cscope setting
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
if has("cscope")
set csto=1
set cst
set nocsverb
" add any database in current directory

set tags=tags;
if filereadable("cscope.out")
cs add cscope.out
else
let cscope_file=findfile("cscope.out",".;")
let cscope_pre=matchstr(cscope_file,".*/")
if !empty(cscope_file)&&filereadable(cscope_file)
exe "cs add" cscope_file cscope_pre
endif
endif
set csverb
endif
let Tlist_Show_One_File=1
let Tlist_Exit_OnlyWindow=1
let Tlist_Ctags_Cmd="/usr/bin/ctags"
let Tlist_Auto_Open=1
"set cscopequickfix=s-,c-,d-,i-,t-,e-

nmap cs :cs find s =expand("")
nmap cg :cs find g =expand("")
nmap cc :cs find c =expand("")
nmap ct :cs find t =expand("")
nmap ce :cs find e =expand("")
nmap cf :cs find f =expand("")
nmap ci :cs find i =expand("")$
nmap cd :cs find d =expand("")

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the cscope configuration in init.vim and reproduce the error by opening a file from startify. Trace how the cscope database path is established before the lookup. Done means cscope lookups opened from startify no longer report that the referenced file does not exist.

Written by the indexing model from the issue text.

Assessment

Tech stack
vim
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.