About: Highlighting of method names in the definition   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : dbkwik.webdatacommons.org associated with source dataset(s)

I use the following function in my vimrc: " Add highlighting for function definition in C++ function! EnhanceCppSyntax() syn match cppFuncDef "::\~\?\zs\h\w*\ze([^)]*\()\s*\(const\)\?\)\?$" hi def link cppFuncDef Special endfunction I have another line to call this function automatically when editing a C++ file: autocmd Syntax cpp call EnhanceCppSyntax() This doesn't work in all cases (for instance, it doesn't highlight constructors using an initialization list on the same line) but it shouldn't highlight function calls (such as MyClass::MyStaticMethod( int foo ); )

AttributesValues
rdfs:label
  • Highlighting of method names in the definition
rdfs:comment
  • I use the following function in my vimrc: " Add highlighting for function definition in C++ function! EnhanceCppSyntax() syn match cppFuncDef "::\~\?\zs\h\w*\ze([^)]*\()\s*\(const\)\?\)\?$" hi def link cppFuncDef Special endfunction I have another line to call this function automatically when editing a C++ file: autocmd Syntax cpp call EnhanceCppSyntax() This doesn't work in all cases (for instance, it doesn't highlight constructors using an initialization list on the same line) but it shouldn't highlight function calls (such as MyClass::MyStaticMethod( int foo ); )
Version
  • 6(xsd:integer)
dbkwik:vim/property/wikiPageUsesTemplate
Previous
  • 640(xsd:integer)
Category
  • C++
  • Syntax
Author
  • Olivier Teuliere
Complexity
  • basic
Created
  • 2004(xsd:integer)
ID
  • 641(xsd:integer)
NEXT
  • 642(xsd:integer)
Rating
  • 30(xsd:integer)
abstract
  • I use the following function in my vimrc: " Add highlighting for function definition in C++ function! EnhanceCppSyntax() syn match cppFuncDef "::\~\?\zs\h\w*\ze([^)]*\()\s*\(const\)\?\)\?$" hi def link cppFuncDef Special endfunction I have another line to call this function automatically when editing a C++ file: autocmd Syntax cpp call EnhanceCppSyntax() This doesn't work in all cases (for instance, it doesn't highlight constructors using an initialization list on the same line) but it shouldn't highlight function calls (such as MyClass::MyStaticMethod( int foo ); )
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