I am using vi as a note-taking and outlining tool. I am constructing the "tags" file by myself. What I would like to do is that when I open my notes or outline file, vi reads the tags present in this file, highlights them and also displays the tag labels in a vertical preview window. I have no experience in vim scripting so I would appreciate some help.
Currently I am using a bash script to generate a tag labels file "taglabels" in $PWD using cut and loading it in a separate vertical window
My script looks like this
#! /bin/bash
cut -f1 $PWD/tags > $PWD/taglabels
vi -c ":30vsp $PWD/taglabels" $1
As is obvious, the script does not highlight the tags present in the file nor does it it show only the tags present in the file. On the contrary it shows all the tags present in $PWD/tags
I looked into ctags and the taglist plugin but they seem to be more suited for code than for free form text.
If anyone has any suggestions on how to improve on this scenario I would be grateful.