Many people enjoy reading and writing in plain text because it is available
in
every enviroment. Think about thousands of RFC documents being created in
plain
text format.

If only these documents had tags -- Especially when the document are very
long, for example rfc3261 has more than 200 pages.-- If only these document
could be browsed easily.

Have you remembered the Vim's help document? They are plain text with tags
or
indexes and some highlight. You could jump to where something is defined. It
seems we can indeed browse plain text efficiently in vim.

I will introduce another way to implement the jump function different from
the
Vim's help document that need additional control chars(add symbol "*" in the
front and after the word to define the tags, and use symbol "|" in front and
after the words to define the index.). People may feel strange when they see
such symbols.

How to do? The only thing is to install the "Plain Text Browser" plugin. I'd
like to give some preview.

http://www.vim.org/scripts/script.php?script_id=2899

Preview

The "Plain Text Browser" plugin give Vim the ability to show the document
structure and highlight in plain text.

After install, Open a plain text document with vim and you will see the
syntax
highlight: The chapter title, URLs, Keywords(such error, todo, etc)... will
be
highlighted. After install, please open the document "txt.txt" directly with
vim to read how this syntax is defined and to preview what it looks
like.(You
can also use "help txt.txt" command to open txt.txt in any other file, but
must run one more command "set ft=txt" to preview how the file looks like)
You
could also refer to the following link to have a snapshop.

Meanwhile use the ":Tlist" command to open the taglist window. You will find
the table of the content is listed in the taglist window along with the
table
and figure list. You can jump to the corresponding chapter by clicking the
tag, just like browsing C code with "taglist" plugin. 

http://guoyoooping.blog.163.com/album/edit/#p1
http://old.nabble.com/file/p27095084/snapshot.jpg 

-- 
View this message in context: 
http://old.nabble.com/How-to-show-plain-text-document%27s-structure-and-syntax-highlight-tp27095084p27095084.html
Sent from the Vim - General mailing list archive at Nabble.com.

-- 
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Reply via email to