About: Temporarily replace grep with a custom program   Sponge Permalink

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

So, I have in my vimrc: fu! Mycscope(func) let tmp1=&grepprg let tmp2=&grepformat set grepformat=%f\ %*[a-zA-Z_0-9]\ %l\ %m set grepprg=cscope\ -R\ -L\ -3 exe "grep ".a:func exe "set grepprg=".escape(tmp1,' ') exe "set grepformat=".escape(tmp2, ' ') endf command -nargs=* CScope :silent call Mycscope("") This will create the command CScope, that does a cscope's "find functions calling this function" with quickfix. Another example: lid Bug: Sometimes Vim is unable to come back from the command, and you have to hit CTRL+C. I have no idea why.

AttributesValues
rdfs:label
  • Temporarily replace grep with a custom program
rdfs:comment
  • So, I have in my vimrc: fu! Mycscope(func) let tmp1=&grepprg let tmp2=&grepformat set grepformat=%f\ %*[a-zA-Z_0-9]\ %l\ %m set grepprg=cscope\ -R\ -L\ -3 exe "grep ".a:func exe "set grepprg=".escape(tmp1,' ') exe "set grepformat=".escape(tmp2, ' ') endf command -nargs=* CScope :silent call Mycscope("") This will create the command CScope, that does a cscope's "find functions calling this function" with quickfix. Another example: lid Bug: Sometimes Vim is unable to come back from the command, and you have to hit CTRL+C. I have no idea why.
Version
  • 6(xsd:integer)
dbkwik:vim/property/wikiPageUsesTemplate
Previous
  • 687(xsd:integer)
Author
  • lpen
Complexity
  • intermediate
Created
  • 2004-03-28(xsd:date)
ID
  • 688(xsd:integer)
NEXT
  • 689(xsd:integer)
Rating
  • 7(xsd:integer)
abstract
  • So, I have in my vimrc: fu! Mycscope(func) let tmp1=&grepprg let tmp2=&grepformat set grepformat=%f\ %*[a-zA-Z_0-9]\ %l\ %m set grepprg=cscope\ -R\ -L\ -3 exe "grep ".a:func exe "set grepprg=".escape(tmp1,' ') exe "set grepformat=".escape(tmp2, ' ') endf command -nargs=* CScope :silent call Mycscope("") This will create the command CScope, that does a cscope's "find functions calling this function" with quickfix. Another example: lid fu! Mylid(arg) let tmp1=&grepprg set grepprg=lid\ -Rgrep\ -s\ $* exe "grep ".a:arg exe "set grepprg=".escape(tmp1," ") endf command -nargs=* Lid :silent call Mylid("") Bug: Sometimes Vim is unable to come back from the command, and you have to hit CTRL+C. I have no idea why.
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