Recommended Vim excellent scripts

Source: Internet
Author: User
Tags prototype definition egrep

1. taglist: source code structure browsing

Author: yegappan Lakshmanan, website script No.: 273 .:
Http://www.vim.org/scripts/script.php? Script_id = 1, 273

1.1 function description:

This is a very important plug-in. With this plug-in, we can view the letter contained in a file in vim.
Number list, global parameter list, etc. Double-click the name displayed in the taglist window or press ENTER
In the main window on the right will jump to the corresponding definition location. taglist is the most popular plug-in for programmers.
Staff provided great convenience. We recommend that you install it!

He "tag list" plugin is a source CoDe browser plugin for vim and
Provides an overview of the structure of source CoDe files and allows
You to efficiently browse through source CoDe files for different
Programming Languages ages

Use "CTRL-W + (H, J, K, L)" to switch between the main window and the taglist window. In the taglist window, you can
To use the following shortcut keys:

<CR> jump to the position defined by the tag under the cursor. Double-click the tag with the mouse.
O display the tag under the cursor in a new window
<Space> display the prototype definition of the tag under the cursor
U update the tag in the taglist window
S. Change the sorting method and switch between name-based and order-based.
The X taglist window is zoomed in and out to facilitate viewing long tags.
+ Open a fold, same as Zo
-Fold the tag, same as ZC
* Open all folds, same as Zr
= Fold all tags, same as ZM
[[Jump to the previous file
] Jump to the next file
Q: Close the taglist window.
<F1> Show Help

1.2 Installation

1) the exuberant ctags must be installed first. Note that the exuberant ctags must be installed in the $ path. Otherwise
In vimrc, indicate the absolute path of ctags.

2) download the plug-in, decompress it, copy taglist. Vim to the./Vim/plugin/directory, and
Copy taglist.txt to the./Vim/doc/directory and open and execute helptag.

3) Although the taglist uses ctags, the existence of the tags file is not required.

4) The taglist has many functions and many options. You can modify the. vimrc custom options. Common configurations
See Figure 1. For more help information, see ": Help taglist ".

Reference self. vimrc
|
| "If the installation path of the exuberant ctags is not in $ path, it must be specified here.
| "Let tlist_ctags_cmd = '/usr/local/bin/ctags.exe'
| "The taglist window is automatically opened when Vim is started. The default value is 0.
| "Let tlist_auto_open = 1
| "Simplified mode. No blank lines exist between tag categories. Empty lines are used by default.
| Let tlist_compact_format = 1
| "The taglist window is automatically closed when the main window exits. It is disabled by default.
| Let tlist_exit_onLywindow = 1
| "Whether to enable automatic window widening when the taglist window is opened. The default value is allow.
| Let tlist_inc_winwidth = 1
| "Order of tags," order "or" name ". The default value is order, which can be switched by S,

| Let tlist_sort_type = "order"
| "The taglist window of other files is automatically closed. The default value is 0.
| Let tlist_file_fold_auto_close = 1
| "Taglist window width. The default value is 30.
| Let tlist_winwidth = 35
| "Only the tag of this file is displayed. By default, all open file tags are displayed.
| Let tlist_show_onE_file = 1
|
| "F8 (normal mode) brings up the tag list
| NMAP <F8> <ESC>: tlist <return>

Known bugs:

1) In Windows, you cannot use taglist to browse the source files contained in the Chinese path.
Please mark this question as needed
Patch? Name = taglist. Diff & can = 2 & Q = ),
Or directly use the modified
Taglist. Vim (http://code.google.com/p/txtbrowser/downloads/detail? Name = taglist. Vim & can = 2 & Q =)
Replace the original file.

2. txtbrowser: pure text browser plug-in

Author: ypguo, plug-in type: utility .:
Http://www.vim.org/scripts/script.php? Script_id = 1, 2899

2.1 function description:

1) list the document directory tree of a text file and click it to jump to the file body:

2) syntax highlighting: make the text file have syntax, highlight the file title, keywords, file hyperlink, etc.
Syntax element.

3) extended functions:

* Place the cursor on the URL. <leader> G can be used to open the URL, including the URL and various files (including PDF,
MP3), email address.

* Place the cursor on the word and execute or <leader> F open the Network Dictionary to query the word.

* Place the cursor on the word and execute or <leader> S Open google to search for the word.

2.2 Installation

1) install the taglist plug-in first.
(Http://www.vim.org/scripts/script.php? Script_id = 273 ),
I believe that few people playing Vim have not installed this plug-in.

2) download the plug-in and decompress it to the directory $ home/. Vim (or $ home/vimfiles, $ Vim/vimfiles ).
. CTAG, cut to the $ home directory. After installation is complete, your folder should have the following files (please
Note the directory structure ):

* $ Home/. Vim/syntax/TXT. vim-. txt File Syntax highlight file.
* $ Home/. Vim/plugin/txtbrowser. vim-browser tool.
* $ Home/. Vim/doc/txtbrowser.txt-help document in English.
* $ Home/. Vim/doc/txtbrowser. CNX-Chinese help document. (Don't forget to open and execute
": Helptags." generate tags)
* $ Home/. ctags-used to generate title labels.

Because the old plug-in name is used before version 1.1.1, please delete the earlier version of the plug-in before installation (mainly the Help file, the original
Name: txt.txtand txt_cn.txt). Otherwise, the system will prompt that the tag already exists when installing the new help document ..

3) Add the following three lines to your. vimrc file, and then restart your vim:

Syntax on
Let tlist_txt_settings = 'txt; C: content; F: figures; T: tables'
AU bufread, bufnewfile *. txt setlocal Ft = txt

3. cscope_maps.vim: the shortcut key for cs.pdf

Author: cssag website, plug-in type: utility .:
Http://cscope.sourceforge.net/cscope_maps.vim

3.1 function description:

CSWs can be considered as frequently-used ctags, but only a few languages such as C/C ++ are supported. CSWs are often similar to ctags.
However, the difference is that csflood has more search types and options than ctags. For example, you can search and call this function.
And ctags can display the taglist, so the two tools have always been necessary software for programmers.
After cscope, you need to install cscope_maps.vim to map the complicated and huge cscope commands into easy-to-remember
Combination. For specific applications, see <#2.2 Vim program support>.

The main functions of cssag are implemented through the same sub-command "find". The usage of "cscopefind" is as follows:

Csfindc | d | E | f | G | I | S | tname

For ease of use, the cscope_maps.vim plug-in maps these commands:

<C-\> S-> CS find s XXX: Find the C language symbol, that is, find the function name, Macro, and enumeration value.
Location
<C-\> G-> CS find g xxx: location defined by function, Macro, and enumeration, similar to
Provided Functions
<C-\> D-> CS find d xxx: Find the function called by this function
<C-\> C-> CS find c xxx: Find the function that calls this function.
<C-\> T-> CS find t XXX: Find the specified string
<C-\> E-> CS find e XXX: Find the egrep mode, which is equivalent to the egrep function, but the search speed is fast.
More
<C-\> F-> CS find f XXX: Find and open a file, similar to the find function of VIM
<C-\> I-> CS find I XXX: Find the file containing this file

3.2 installation instructions:

1) Save the word_complete.vim file to the $ vimdata/plugin directory or
Copy the content in cscope_maps.vim to. vimrc.

4. bufexplorer: Manage opened Buffer

Author: Jeff lanzarotta, website script No.: 42, plug-in type: utility .:
Http://www.vim.org/scripts/script.php? Script_id = 42

4.1 Function Description

This plug-in makes it easier to edit multiple files. After the plug-in is installed, enter \ be in normal mode to open the buffer.
List, the cursor is placed on a file, press enter to open the file, and the buffer list is automatically closed. below
Is a more detailed command:

'\ Be' (normal open) or
'\ BS' (Force horizontal split open) or
'\ BV' (Force Vertical Split open)

With bufexplorer, you can quickly and easily switch between buffers
Using the onE of the default public interfaces:

4.2 Installation

1) download and decompress the package to put the corresponding file in runtimepath (usually ~ /. Vim,
In Windows, it is usually c: \ vimfiles) Directory plugin and Doc. Then restart
Vim.

2) execute the following command in normal mode (usually remember that the first one is enough ):

5 sketch. VIM: Vim drawing tool

Author: Antony scriven, plug-in type: utility .:
Http://www.vim.org/scripts/script.php? Script_id = 1, 705

5.1 Function Description

It is annoying to draw flowcharts in plain text documents. You need to spend a lot of energy on the alignment of spaces.
The sketch. Vim tool solves this problem and allows you to draw images directly with the mouse. It is very fun, although it is not used
Yes, but once it is used, you will be shocked by its creativity.

Sketch. vim-Line Drawing/painting using the mouse. Based on an idea
By Morris.

The left mouse button is used to draw a free curve. CTRL-the left mouse button can draw a rough curve. Right-click a region and then click
The left button can draw a hollow chart. Shift-when the left mouse button is drawn, use "." instead of "+", Ctrl-left mouse button.
To draw an internship diagram. You can switch between solid and bold strokes with the left-click alt-mouse. You can select ".", ":" and
"#".

This is an example of my casual exercises:

========================================================== ==================================
###########################
##############################
#######################
###########################
###########################
###########################
#########################
##########################
########################
######################
##############################
##########################
#######
========================================================== ==================================
Figure 6: A Sketch

This plug-in is a bit similar to drawit. You don't need it if you use it.

Installation instructions:

1) download and decompress the sketch. Vim file and save it in the $ vimdata/plugin directory, sketch. Tut
For the tutorial, please read it before using it for the first time. You will find that this drawing tool is actually very powerful.

2) run the call togglesketch () command to enable or disable the drawing function. We recommend that you set
Call togglesketch () is mapped to a command to facilitate ": Map <F1>: Call
Togglesketch () <CR>"

6. nerd_tree: directory tree Browser

Author: Marty Grenfell, plug-in type: utility .:
Http://www.vim.org/scripts/script.php? Script_id = 1, 1658

6.1 function description:

The nerd tree allows you to view the files and directories in the system in a tree in the vim editor. It supports shortcut keys and mouse keys.
It is easy to use. The nerd tree can highlight the node type in different colors and contain bookmarks,
Filtering and other practical functions. Combined with the taglist or txtviewer plug-in, the right window shows the files in this folder, the Left window
The document structure in this article will make it easy to manage a project.

The nerd tree allows you to need e your filesystem and to open files
And Directories. It presents the filesystem to you in the form of
Tree which you manipulate with the keyboard and/or mouse. It also
Allows you to perform simple filesystem operations.

6.2 installation instructions:

1. Download nerd_tree.zip, decompress it, and put nerd_tree.vim ~ /. Vim/plugin/directory;
Put nerd_tree.doc IN ~ /. Vim/doc directory and run ": helptags." To install the Help file.

2) run the ": nerdtreetoggle" command in the opened file to open or close the nerdtree.
In the. vimrc file, map this command into a shortcut key "NMAP <F7>
<ESC>: nerdtreetoggle <CR>"

= ~ /. Vimrc ================================================= ==============
"Nerdtree plugin
"The nerdtree window is left or right
Let nerdtreewinpos = "right"
"Nerd tree window size
"Let nerdtreewinsize = 31
"F7 ing F7 is the shortcut key for enabling and disabling nerdtree
NMAP <F7> <ESC>: nerdtreetoggle <return>
========================================================== ==============================
Figure 7: Common nerdtree options

3) In the nerdtree window that is opened, run the "O" command to open a file and use the usual Vim operation to move the light.
Mark.

4) run the ": Help nerd_tree" command to view detailed instructions.


7. About the color plug-in

I personally think that programming (c) is still nice-looking like desert or evening. However, I like to use default when editing text files.
Welcome to recommend other colorscheme plug-ins.

8. Others

There are many other good plug-ins, but I have not tried them, so I only list the names. If I have time, I can try one.
I also hope you will recommend your favorite plug-ins:

Gzip: supports compressed files
Netrw: network file support
Engspchk: English spelling check
Calendar
Cvsmenu: CVs Integration
Doxygen: highlight the document comment syntax
Matrix-style Screen Saver
Visualmark: highlighted bookmarks
Supertab: Accelerate your completion

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.