TxtBrowser : Browse plain text easily(show the title tag and syntax highlight)
| script karma
Downloaded by 4698
Comments, bugs, improvements
script versions (upload new version)
The "TxtBrowser" plugin is a plain text browser plugin for Vim and provides the
following features to allow you to efficiently browse through plain text
files(for example RFCs). Chinese intruction is available at(中文介绍请访问):
1. Title tag list: Show an overview of the structure of plain text and list all
the titles in the taglist windows, you can jump to them just by clicking. Use
":Tlist" command to open the taglist and use ":TlistUpdate" to update the
taglist after modification.
2. Syntax highlight: highlight the key element in your plain text. This include
the title, URLs, keywords you defined(default is TODO, ERROR, etc), Words in
bracket, etc. Syntax hightlight would be auto loaded after install. Snapshot of
feature 1 and 2 are available at:
3. Browser Utilities(use ":help txt-howto" for details):
<Leader>s: Search text under cursor(or selected) through search engine(google).
<Leader>f: Find text under cursor(or selected) through web dictionary(www.dict.cn).
<Leader>g: Goto the URL under cursor(or selected).
<Leader>h: Highlight the word under cursor(or selected), it's easy and
simple, for more powerful highlight, You could refer to
*: Search forward for the word under cursor(or text selected).
#: Search backward for the word under cursor(or text selected).
1) Please make sure taglist(vimscript #273: taglist.vim) has been installed.
[Note]: Taglist has problem in supporting Chinese(CJK: Chinese, Japanese,
Korean) in Windows, It is strongly recommended for CJK users to apply the
patch(http://att.newsmth.net/att.php?s.731.55149.150442.diff) or use the fixed
taglist.vim(http://att.newsmth.net/att.php?p.731.55149.1226.vim) I provided. I
will not provide the patch after taglist fix these bugs.
2) Download the txtbrowser.zip file and unzip the files to the $HOME/.vim or
the $HOME/vimfiles or the $VIM/vimfiles directory. After this step, you should
have the following five files (the directory structure should be preserved):
* $HOME/.vim/syntax/txt.vim - syntax for text/plain.
* $HOME/.vim/ftplugin/txt.vim - language definition for text/plain.
* $HOME/.vim/plugin/txtbrowser.vim - browser tools.
* $HOME/.vim/doc/txtbrowser.txt - help document in English.
* $HOME/.vim/doc/txtbrowser.cnx - help document in Chinese.
Don't forget to open the file and Use ":helptags ." to install help tag.
3) Add the following line into your .vimrc file and restart your vim.
syntax on "syntax highlighting on
filetype plugin on
au BufEnter *.txt setlocal ft=txt
Click on the package to download.
ip used for rating: 18.104.22.168
||1) Since tatlist window could show titles like "digit+space+char", Highlight them;
2) The default dictionary is changed from "www.google.cn/dictionary" to "www.google.com/dictionary".
3) Using maparg() insteading of mapcheck() to check whether the map exist.
4) Add some new features such as "Make the text Bold/Italic/Red/Green/Blue". It is informational and will function in most cases, but still have many problems.
5) support url such as "https://";
6) Allow user to open the url with user defined browser, and the screen will update immediately;
||1. Add all the function to the right click menu. Shall I disable the right click menu by default? I need advice.
2. Fix somes bugs. Thanks to Hong Xu for warm help.
||Use the "#" to search backward insteading of "?", it's default in vim. Thanks to Hong Xu again for warm advice.
||1) Highlight the braces, quotes and square brackets along with the syntax matchs.
2) Only highlight the syntax "txtList" itself, not including the spaces ahead of it.
3) Add New features: ?: Search backward for the word under cursor(or selected).
Thanks to Pengo and Hong Xu for warm advice.
||Add new features:
<Leader>h: Highlight the word under cursor(or selected);
*: Search forward for the word under cursor(or selected).
||Equal to 1.2.9, Compared to version 1.2, there are changes as following:
1)Infrastructure improvement for easy install. Users only need to unzip the file to you $HOME or vimfiles directory.
2)Bug fix: fix many bugs in encodings, Now Chinese in almost every circumstance could be show normally.
3)Bug fix: syntax highligh parse error between two "'s".
4)Other bug fix and feature improvement.
||This version(1.2) equals to version 1.1.8. Minor version upgrade to wait for
new feature added. compared to 1.1, there are changes:
1)Plugin name changed from "txt.zip" to "TxtBrowser"
2)Add utilities to browser url in vim.
3)bug fix for Chinese title couldn't listed(":help txt-faqs" 6.2 for details)
||Same as release 1.0.6(minor change.) Version upgrate to 1.1.x for new features release. Changes since version 1.0:
1) Delete some personal configuration in txt.vim.
2) Add the help document in both English and Chinese.