About: Autoloading Cscope Database   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

For ctags, there is a nice trick: with the command :set tags=tags;/ Vim will look for tags file everywhere starting from the current directory up to the root. This tip provides the same "autoloading" functionality for Cscope. Just add the following to your vimrc: function! LoadCscope() let db = findfile("cscope.out", ".;") if (!empty(db)) let path = strpart(db, 0, match(db, "/cscope.out$")) set nocscopeverbose " suppress 'duplicate connection' error exe "cs add " . db . " " . path set cscopeverbose endif endfunction au BufEnter /* call LoadCscope()

AttributesValues
rdfs:label
  • Autoloading Cscope Database
rdfs:comment
  • For ctags, there is a nice trick: with the command :set tags=tags;/ Vim will look for tags file everywhere starting from the current directory up to the root. This tip provides the same "autoloading" functionality for Cscope. Just add the following to your vimrc: function! LoadCscope() let db = findfile("cscope.out", ".;") if (!empty(db)) let path = strpart(db, 0, match(db, "/cscope.out$")) set nocscopeverbose " suppress 'duplicate connection' error exe "cs add " . db . " " . path set cscopeverbose endif endfunction au BufEnter /* call LoadCscope()
Version
  • 7(xsd:integer)
dbkwik:vim/property/wikiPageUsesTemplate
Previous
  • 1667(xsd:integer)
Category
  • Usage
Author
  • Dorserg
Subpage
  • /201102
Complexity
  • basic
Created
  • 2011-02-11(xsd:date)
ID
  • 1668(xsd:integer)
NEXT
  • 1669(xsd:integer)
abstract
  • For ctags, there is a nice trick: with the command :set tags=tags;/ Vim will look for tags file everywhere starting from the current directory up to the root. This tip provides the same "autoloading" functionality for Cscope. Just add the following to your vimrc: function! LoadCscope() let db = findfile("cscope.out", ".;") if (!empty(db)) let path = strpart(db, 0, match(db, "/cscope.out$")) set nocscopeverbose " suppress 'duplicate connection' error exe "cs add " . db . " " . path set cscopeverbose endif endfunction au BufEnter /* call LoadCscope()
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software