vim ctags method of store your own information
I want to use vim and ctags for st开发者_StackOverflow社区oring my own information in one folder. Is any way to implement this ?
Example: i want to insert a piece of information about mysql, im creating a file or other new structure which can be parsed by ctags in future.
Yes. You can implement it in two ways as follows
- Create 2 files in a folder tags & toc
- Now add a piece of information (the bit about mysql) in a 3rd file called data , use a pattern such as TOPIC: MySql as the heading for this piece of info
- Now You can write a script to automatically build your toc & tags file, but for this excercise we will do it manually
data file contents
blah
--Lots of other data
blah
TOPIC: MySql nugget
MySql is a cool open-source database.
But Cassandra & NoSql are all the rage today.
tags file contents
MySql data /^TOPIC: MySql$/;"
toc file contents
Table of Contents
MySql
Now load up the toc file place your cursor on M of MySql and hit Ctrl ] it should automatically load up the data file and place your cursor at the begining of TOPIC: MySql
You can create any number of data files, each having any number of TOPIC: strings and you can create any number of patterns (in effect) devise your own language and have ctags automatically create a tags for you.FORMAT
精彩评论