Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question is an exact duplicate of:

I am using vi as a note-taking and outlining tool and therefore I thought that this stackexchange site would be appropriate to ask this question. 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 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.


share|improve this question

migrated from stackoverflow.com Sep 15 '11 at 6:50

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Braiam, terdon, slm, Karlson, Ramesh May 16 '14 at 14:50

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

This is off topic for Productivity StackExchange – Soner Gönül Sep 14 '11 at 5:13
This should be closed and reasked on stackoverflow or one of the linux related 'boards.' (Cannnot be merged from beta board) – user606723 Sep 14 '11 at 14:21
I think this is a really cool idea. When you get it working, you should share it! You will likely find much better help on the vim-user mailing list. They field questions like this all of the time. (Sorry for redirecting you a second time.) vim.org/community.php The best mailing list for this is vim@vim.org. – jpaugh Jan 23 '12 at 6:05

You might try vimoutliner, a vim plugin: http://www.vim.org/scripts/script.php?script_id=3515; I haven't used it myself (don't really use an outliner), but it's easy to install and seems to be to use.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.