In vim in linux, make the tags highlight tag * tag-highlight * www.2cto.com. if you want to highlight all the tags in the file, you can use the following ING. & Lt; F11 & gt; -- Generate the tags. vim file and highlight the tag. & Lt; F12 & gt; -- based only on the existing tags. vim file...
In vim in linux, make the tags highlight tag * tag-highlight * www.2cto.com. if you want to highlight all the tags in the file, you can use the following ING. -- Generate the tags. vim file and highlight the tag.
-- Only highlight tags based on the existing tags. vim file. : Map : Sp tags : % S/^ \ ([^:] * :\) \=\ ([^] * \). */syntax keyword Tag \ 2/ : Wq! Tags. vim /^ : Map : So tags. vim Warning: The longer the tag file, the slower it will be, and the more memory Vim consumes. Only typedef is highlighted here. you can also set union and struct. To do this, you need Exuberant ctags (which can be found in the http://ctags.sf.net ). Put the following lines in your Makefile: # Create a highlighted types file. Exuberant ctags and awk types: types are required. vim types. vim :*. [ch] ctags-I = maid -*. [ch] | \ awk 'In in {printf ("syntax keyword Type \ t") }\{ printf ("% s", $1 )} END {print "} '>@ @ in your. put the following lines in vimrc: "load types. vim highlight file. if it exists, autocmd BufRead and BufNewFile *. [ch] let fname = expand (': p: h '). '/types. vim 'autocmd BufRead, BufNewFile *. [ch] if filereadable (fname) autocmd BufRead, BufNewFile *. [ch] exe 'so '. f Name autocmd BufRead, BufNewFile *. [ch] endif ========================================== ==================== the above F11 can only recognize the internal definition of the function, function name. macro definition cannot be recognized. Change to "generate the highlighted tags. vimmap file based on the tags file. : Sp tags : Set nohls : % S/file/fi le/ : % S/^ \ ([^:] * :\) \=\ ([^] * \). */syntax keyword Tag \ 2/ : Wq! Tags. vim /^ "Map all labels in the highlighted file : So tags. vim You can recognize macros.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service