pgsql.vim
pgsql.vim copied to clipboard
Idea for postgresql extension highlighting
Hello,
I am pgRouting developer, and I would like to add some vim high lighting for the extension. For example, highlight the pgrouting functions names with a color that is not being used for other things in pgsql.vim. Also, we use of some fixed column names that are checked in the pgRouting queries.
SELECT * from pgr_dijkstra($$ SELECT id, foo AS source, bar AS target, cost, reverse_cost
FROM edge_table$$ ,1, 2)
so for example highlight pgr_dijkstra and also highlight source, target, cost, reverse_cost
The idea that comes to my mind is that when installation of the pgRouting extension is done, also have a
make vim
The pgrouting.vim would be auto generated based on the version signatures.
and the command make vim
would add that file to the /path/to/syntax/pgrouting.vim
The requirement would be that /path/to/syntax/pgsql.vim must exist. The cmake would look for the pgsql.vim, and extract the directory from it so pgrouting.vim would be installed in the same directory as pgsql.vim
I don't know if the following is possible I would think that pgsql.vim would check if pgrouting.vim exists and add the additional commands for the high lighting.
This is just an idea, @robe2: Maybe have something similar for postGIS extension.
- its a much bigger project, but the experimenting can be done on the much smaller project that is pgRouting
Also, maybe its something that a GSoC student could develop.
Thoughts?