Txtbrowser is a Vim plug-in designed to provide a better TXT browsing experience. Main functions: automatically generate a directory tree sidebar (taglist window) for plain text, syntax highlighting, and multiple extension functions (execute URL, search for the current word on the network, etc ). Developed by ypguo, a Chinese user, txtbrowser has been updated and is active recently.Solved the problem that the taglist. Vim plug-in cannot process Chinese file paths..
I. txtbrowser function display
The following is a function introduction. For more information, see the author's introduction and the txtbrowser. CNX file in the official download package.
The directory tree function is displayed. For more screenshots, see here.
1. directory tree sidebar
Open a pure catalog file (.txt or: se Ft = txt) with vim, type A command (: tlist) or press the corresponding hotkey (customizable, for example, below) to generate the sidebar of the directory tree (that is, the taglist window ). Click the corresponding tab in the directory bar and the body will jump accordingly.
The contents in the directory column include both the text directory, the image directory, and the table Directory, which can be further customized.
After the body is updated, enter the command (: tlistupdate) or press the corresponding hotkey (customizable, as shown in the following example) to refresh the directory bar.
: NMAP <silent> <F8> <ESC>: tlist <return>
: Noremap <silent> <F5> <ESC>: tlistupdate <return>
2. syntax highlighting
Plain text can also be "colorful "! Txtbrowser can highlight key words, highlight titles, keywords, and list items. It can improve efficiency and improve the mood. You can use the colorscheme colorname command to try different coloring schemes.
3. Other extended functions
* Place the cursor on the URL and execute: txtbrowserurl (or ← leader → G) to open the URL where it is located, including the URL, various files (including PDF, MP3, etc.), and email address.
* Place the cursor on the word and execute txtbrowserword (or ← leader → F) to open the Network Dictionary to query the word.
* Place the cursor over the word and execute txtbrowsersearch (or ← leader → S) to open Google search.
Ii. txtbrowser comments and comparison with voof 1. Evaluation of txtbrowser
In my opinion, txtbrowser is a Vim extension worthy of attention and support. We recommend users who need it to try it out and use it. The reasons are as follows:
* Txtbrowser is determined to be an integrated solution for vim txt. It is helpful for programmers to view technical documents and not to take notes.
* The author ypguo is a Chinese netizen who sincerely listens to his opinions and actively updates the program.
* It is rare that the author has less than two years (VIA) Since using vim and writing this extension ). Perhaps, this proves in turn the strength of vim and the author's development skills.
2. Internal comparison of txtbrowser Functions
The main highlight of the txtbrowser plug-in is the directory sidebar.. This is helpful for reading long technical documents or taking notes on your own.
Syntax highlighting and other extensions have already been implemented in other extensions. You can use txtbrowser as a collection solution of TXT to use these features. You can also customize, modify, or select more powerful specialized extensions.
3. txtbrowser vs voof (updated)
A. From the perspective of the Directory navigation function, there is little difference between the two, but the runtime environment requires taglist and Python respectively.
From the perspective of the Directory navigation function, txtbrowser and voof (home page and introduction) are similar. I think the advantages and disadvantages of the two are relative. You can choose one based on your own needs.
Length: txtbrowser depends on ctags and taglist; voof depends on python.
Txtbrowser wins: the line of the title is defined in the. ctags file. The default format is "number headers, followed by titles". No additional annotations are required. In voof, You need to manually add identifiers such.
Speed and function: it seems that voof python is faster (not strictly tested), and voof can adjust the front and back sections and adjust the level through the directory bar.
Chinese compatibility: If the official taglist. Vim is used, the txtbrowser directory cannot be properly displayed in Windows when the file or path contains Chinese spaces (in Linux ). However, ypguo corrected taglist. Vim to solve this problem.
B. txtbrowser comes with text-assisted functions, while voof provides practical node management functions.
Txtbrowser also provides TXT syntax highlighting, quick URL opening, search, and translation functions. However, these functions are not directly related to the directory functions. You can also split them into two extensions or use other extensions for implementation.
The advantages of voof are embodied in node management,The directory tree of voof not only supports navigation, but also node operations.. For example, it is very useful for database management to move, increase, or decrease the hierarchy of nodes before and after nodes (CTRL + arrow keys by default.
C. The conclusion is that txtbrowser is suitable for reading txt; voof is suitable for managing TXT databases.
From a practical perspective, I think these two extensions are not the same. Txtbrowser is suitable for reading TXT files, especially long texts of others. voof is suitable for creating and managing your own TXT database, which can have many nodes and constantly adjust its structure.
Iii. Installation and Use notes
Important:The following is an xbeta trialAt that timeIn some placesNot applicable to later versions of txtbrowser. For example, the taglist plug-in has a revised version, and the. ctags file is no longer needed ......
Note: programmers are familiar with Tag, ctags, and taglist. But for users like me who are not programming, it is complicated to install and use these things for the first time because of txtbrowser. Record as follows and provide a friendly explanation for beginners.
1. Install ctags (http://ctags.sourceforge.net /)
Ctags is a program (exe) used to generate tag files. The tag file can be understood as an index-a directory item, a keyword ...... The row of the file that appears.
Download source and binary for Windows 98/NT/2000/XP, that is, ctags58.zip. You only need to extract ctags.exe (about KB) to the Windows directory (or other directories in path ).
2. Install taglist (http://www.vim.org/scripts/script.php? Script_id = 273)
Important: the latest version is recommended because the official taglist. Vim has a problem with Chinese support.
Copy the plug-in content to the vim installation directory/vimfiles. Take me as an example to add the following content:
D: \ soft \ Vim \ vimfiles \ plugin \ taglist. Vim
D: \ soft \ Vim \ vimfiles \ doc \ taglist.txt
3. Install txtbrowser (http://www.vim.org/scripts/script.php? Script_id = 2899)
In addition to copying most of the content to the vimfiles directory, be sure to copy the. ctags file to the "$ home" directory. $ Home can be simply understood as c: \ Documents ents and Settings \ User ID \. Take me as an example to add the following content:
D: \ soft \ Vim \ vimfiles \ plugin \ txtbrowser. Vim (plug-ins used to generate directories and extensions)
D: \ soft \ Vim \ vimfiles \ doc \ txtbrowser. CNX (help document)
D: \ soft \ Vim \ vimfiles \ doc \ txtbrowser.txt (help document)
D: \ soft \ Vim \ vimfiles \ syntax \ TXT. Vim (syntax highlight file)
C: \ Documents and Settings \ ZYX \. ctags (important: which texts generate tags in the file)
4. Add the following to the. vimrc file:
Syntax on
Let tlist_txt_settings = 'txt; C: content; F: figures; T: tables'
AU bufread, bufnewfile *. txt setlocal Ft = txt
5. Restart vim, open the http://www.rfc-editor.org/rfc/rfc959.txt, execute the command: tlist, you should be able to see the effect.
Appendix: Document update history
2010-03-25: updated the comparison between txtbrowser and voof. Corrected some outdated statements.
: The problem of updating the Chinese path of taglist.
2010-02-16: first draft.
[Reprinted Please retain] Author: Make good use of soft Source: http://xbeta.info/vim-txtbrowser.htm