| Vim Support Vim Plug-In | |||||||||
|
|
| |||||||
![]() root menu | Vim Support - Vim Plug-In( version 2.4 )View the ReadmeRead the Vim Support Help File The key mappings of this plugin (PDF) What's new? New Plug-in Versions Released Jul/Aug 2016 |
|
| Features |
|---|
Speed-up the development of Vim scripts:
|
| Menus | Explanation | ||
|---|---|---|---|
| Menu Comments : insert commentsA lot of the menu entries are defined in a so-called template library. The library defines the menu entries, maps and the inserted text. The personal information can also be configured there. A file header can be inserted into each new file: "=============================================================================== " " File: somescript.vim " " Description: " " VIM Version: 7.0+ " Author: Wolfgang Mehner (WM), <thisguy@doggymail.de> " Organization: " Version: 1.0 " Created: 29.02.2015 " Revision: --- " License: Copyright (c) 2015, Wolfgang Mehner "=============================================================================== This prolog is generated from the template shown below. This template file can easily be changed by the user. Tags (like == Comments.file description == start, map:ch == "=============================================================================== " " File: |FILENAME| " " Description: <CURSOR> " " VIM Version: 7.0+ " Author: |AUTHOR| (|AUTHORREF|), |EMAIL| " Organization: |ORGANIZATION| " Version: 1.0 " Created: |DATE| " Revision: --- " License: |COPYRIGHT| "=============================================================================== == ENDTEMPLATE == Automatically generate a comment documenting a function. The name and parameters are read from the buffer. Place the cursor on the function header and hit \ca: "=== FUNCTION ================================================================ " NAME: compare " DESCRIPTION: <+DESC+> " PARAMETERS: thee - <+DESCRIPTION+> " summers_day - <+DESCRIPTION+> " RETURNS: "=============================================================================== function! compare ( thee, summers_day ) " something endfunction " ---------- end of function compare ---------- The entry keyword comments ➞ todo generates a special end-of-line comment. These comments are easily locatable by their keywords (e.g. :TODO:). Date and author reference name are inserted by the editor. " :TODO:29.02.2015 12:34:WM: These comments are not for the final version of a script, of course. | ||
| Menu Statements : insert statementsInsert statements with jump tags for convenient editing, using the entry if, else or via the map \sie: if | <-IF_PART-> else <+ELSE_PART+> endif The cursor is positioned after the "if". Use CTRL+J to jump to the tags and start editing. A lot of menu entires have a special behavior in visual mode. Select some lines in visual mode ... let x = sqrt ( y ) echo x then use the entry if, else. The text is inserted around the selected lines and they are indented: if | let x = sqrt ( y ) else <+ELSE_PART+> endif echo x | ||
|
| ||
|
| ||
| Menu Snippets : insert code snippets and manage templatesThe plug-in comes with a facility to extract, manage and insert often used code snippets. Visually select a few lines and use the menu entry write code snippet to write these lines into a file. The code snippet can then be edited and inserted again using read code snippet. (See :help vimsupport-snippets) The templates which define the behavior of most of the menu entries are also manage here. Use templates setup wizard to create a personalization file with your personal details for the comments. The templates support different coding styles. Use the entry choose style to switch between them. | ||
| Menu Help : call helpHelp is quickly accessible through the Help menu. Place the cursor on the name of a Vim command, function, option, ... autocmd FileType *.vim exe something then use the entry or the map :help autocmd You can jump to the help for The same works for any word in the English language. Placing the cursor on a word and hitting \he opens a dictionary for the word. |
Page updated: October 23 2018 / Mail to: Wolfgang Mehner