sponsor Vim development Vim logo Vim Book Ad

bash-support.vim : Bash IDE -- Insert code snippets, run, check and debug the code and look up help

 script karma  Rating 834/304, Downloaded by 40810  Comments, bugs, improvements  Vim wiki

created by
Fritz Mehner
script type
Write Bash-scripts by inserting comments, statements, tests, variables, built-ins, etc..
Speed up writing new scripts considerably.
Write code und comments with a professional appearance from the beginning.

Some screen shots :  https://wolfgangmehner.github.io/vim-plugins/bashsupport.html

For plug-in managers :  https://github.com/WolfgangMehner/bash-support

The help file online :  https://wolfgangmehner.github.io/vim-plugins/doc/bashsupport.html

The key mappings of this plug-in :  https://wolfgangmehner.github.io/vim-plugins/bashsupport/bash-hotkeys.pdf

The installation explained :  "Make Vim as Your Bash-IDE Using bash-support Plugin"

Plug-in featured in the linux.com article 'Turn Vim into a bash IDE' :  http://www.linux.com/articles/114359

This plug-in comes with a help file (bashsupport.txt). Read it with

    :help bashsupport


Editing actions differ for different modes! There are a lot of features which
can be configured or customized to match your needs.

Bash-Support is on GitHub:


(Please help us keep track of all the issues and name your report/request "Bash-Support: <title>")

install details
Copy the zip archive bash-support.zip to $HOME/.vim/ or $VIM/vimfiles
(on the Windows platforms) and run
    unzip bash-support.zip
If you have already an older version of this plugin and you have modified the
template files you may want to save your templates first or copy the files from
the archive by hand. See also the file README.md within the zip file.

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
bash-support.zip 4.3 2016-08-16 7.3 Fritz Mehner - Add 'g:BASH_CustomTemplateFile'.
- Add template personalization file and setup wizard.
- Change the way lines of code are turned into comments
  (insert no space after the hash).
- Change the map for 'comment -> code' to '\co' for consistency with the other
  plug-ins. The old map '\cu' still works, however.
- Minor corrections and improvements.
bash-support.zip 4.2.1 2014-04-21 7.0 Fritz Mehner - Bugfix: Setup of local templates in case of global installation.
- Help: Bash and utility manuals wrapped on window width.
- Bugfix: \hm and \hh work wrong in insert mode.
- Bugfix: Better compatibility with custom mappings
  (use "normal!" and "noremap" consistently).
- Added 'Bash_SetMapLeader' and 'Bash_ResetMapLeader'.
- Minor corrections and improvements.
bash-support.zip 4.2 2014-01-04 7.0 Fritz Mehner - Default shell can be set in ~/.vimrc via g:BASH_Executable.
- Errors can be parsed for bash, dash, ksh, zsh.
- Bugfix: QuickFix list doesn't work properly (thanks to @PengZheng)
- 'Run -> make script executable' (\re) is now a toggle.
- Minor corrections and improvements.
bash-support.zip 4.1 2013-12-09 7.0 Fritz Mehner - Filetype plugin added.
- Bugfix: Setup of local templates in case of global installation.
- Adjusting end-of-line comments improved.
- Submenu 'Regexp' renamed to 'PatternMatching'. Appropriate hotkeys renamed.
- Minor bugfixes.
- Documentation updated.
bash-support.zip 4.0 2013-07-24 7.0 Fritz Mehner ++  The plug-in version 4.0 is a rewriting of version 3.12.1 .
++  The template syntax has changed!

- New template system (many thanks to Wolfgang Mehner)
- A few new hotkeys and menu item.
- A few hotkeys and menu items renamed.
bash-support.zip 3.12.1 2013-02-17 7.0 Fritz Mehner - Minor additions and bugfixes in 2 menus.
- Test -v added.
bash-support.zip 3.12 2013-01-05 7.0 Fritz Mehner - New global variable g:BASH_InsertFileHeader (suppress file description comment for new files)
- New menu item 'view code snippet' (\nv).
- New ex command BASH_ScriptCmdLineArguments.
- 3 ex commands renamed.
- Minor internal improvements.
bash-support.zip 3.11 2012-12-04 7.0 Fritz Mehner - Rendering of manuals (\hm) and Bash help (\hh).
- Bugfix: \hb, \hm, \hh not working.
- Minor internal improvements.
bash-support.zip 3.10 2012-06-01 7.0 Fritz Mehner - Resolve $HOME for linked home directories.
- Wrong insertion for parameter substitution "match beginning; del longest
  part" (thanks to John Orr).
- Other minor bugs fixed.
bash-support.zip 3.9 2011-12-27 7.0 Fritz Mehner - Hotkey renamed: \st -> \su
- New global variable allows loading menus only with filetype 'sh'.
- Comments: echo "<line>" escapes double quotes in original text.
- Other minor bugs fixed.
bash-support.zip 3.8 2011-11-18 7.0 Fritz Mehner - New comment submenu 'script sections'.
- Two new hotkeys \css, \ckc for commenting.
- Two new plugin tags: LICENSE,ORGANIZATION
- Run menu: new item 'Bash cmd. line arg.' (\rba).  
- I/O-Redir-menu: additional item'>&2'
- System-wide installation: minimal Template file for a user will automatically
  be added.
- Hotkey renamed: \t -> \t1
- A few code snippets for debugging added.
- Bugfix: \cl did not work in insert mode.
- Other minor bugs fixed.
bash-support.zip 3.7 2011-10-18 7.0 Fritz Mehner - The three hotkeys \cl, \cj, \cc allow a range, e.g. '3\cl' (see help text and
- Plugin loads faster: loading the templates is delayed until the first use.
- Plugin now works with pathogen.vim.
- Menus will always be generated (for the use with :emenu).
- Bugfix: no local templates available with a system-wide installation (thanks to Iain Arnell).
- Several improvements.
bash-support.zip 3.6 2011-07-02 7.0 Fritz Mehner - New hotkey \ssa and menu entry for the selection of a subarray.
- Bugfix: detection of a system-wide installation can fail.
- Minor improvements.
bash-support.zip 3.5 2011-02-26 7.0 Fritz Mehner - Bugfix: detection of a system-wide installation can fail.
- Minor improvements.
bash-support.zip 3.4 2010-12-08 7.0 Fritz Mehner - 2 new hotkeys: \t, \t2 (empty tests)
- Windows: user and system installation.
- Syntax check under Windows.
- Several minor bugs fixed.
bash-support.zip 3.3 2010-11-05 7.0 Fritz Mehner - 3 hotkeys renamed: \sl -> \sei (elif), \sas -> \saa ( ${.[@]} ) , \hp -> \hbs.
- 3 new hotkeys: \sa1 ( ${.[*]} ), \san ( ${#.[@]} ), \sai ( ${!.[@]} ).
- 1 new menu entry (Tests)
- Minor improvements.
bash-support.zip 3.2 2010-08-08 7.0 Fritz Mehner - New hotkey and menu entry for [[ =~ ]]
- New for Bash 4.1: shopt 'compat40', variables '$BASHOPTS', '$BASH_XTRACEFD'.
- Bugfixes: local installation looks like a system-wide installation in seldom cases.
- Bugfixes: typo in 4 menu entries.
bash-support.zip 3.1.1 2010-02-13 7.0 Fritz Mehner - Bugfixes: code snippets will not be found if plugin not installed beyond '$HOME/.vim'.
- Bugfixes: undocumented global variable used in above non-standard installation.
bash-support.zip 3.1 2010-02-01 7.0 Fritz Mehner - The plugin now handles different template styles without editing and reloading the main template file.
- New hotkey and ex-command to switch template styles.
- New global List/Dictionnary g:BASH_AlsoBash: add filename pattern (and styles) for files not named *.sh .
- Minor improvements.
- Bugfixes: missing redraws in some cases.
bash-support.zip 3.0.1 2009-12-17 7.0 Fritz Mehner - New global variable g:BASH_Errorformat: adapt the error format used to parse
  runtime messages to your locale setting.
- Bugfix (Windows only): missing internal variable prevents proper initialization.
bash-support.zip 3.0 2009-11-29 7.0 Fritz Mehner + Completely new template system. User can change templates on the fly.
+ Additional mapping Ctrl-j : jump behind parenthesis or strings in the current line.
+ A few Posix character classes have better shortcuts.
+ Bugfix: insert mode for Posix character classes.
bash-support.zip 2.14 2009-09-17 7.0 Fritz Mehner + Debugging: ddd always called with bashdb(1)  (may cause trouble otherwise).
+ More complete adaption to Bash 4.0: options, builtins, environment variables.
+ Bugfix: running and starting the debugger causes error if working directory is not
  the directory of the current file.
+ Minor improvements.
bash-support.zip 2.13 2009-07-24 7.0 Fritz Mehner + New menu item 'array element'.
+ New hotkeys \sa, \sas.
+ New submenu 'Snippets'.
+ Hotkeys for the POSIX character classes.
+ Hardcopy (run menu) can print any buffer.
+ Bugfix: 'Run->save + run script' (\rr, <C-F9>) : visual mode broken.
+ Minor improvements.
bash-support.zip 2.12 2009-07-01 7.0 Fritz Mehner + Hotkeys are shown in the menus.
+ New menu item and hotkey \hb : open the Bash manual.
+ New hotkey \rco : syntax check options.
+ File browser for code snippets choosable (new global variable).
+ Bugfix: wrapper script for use of a xterm could not handle parameters containing blanks.
+ Minor improvements.
bash-support.zip 2.11 2009-05-18 7.0 Fritz Mehner + Additions for Bash version 4.0.
+ Comments menu (\cj): adjustment of end-of-line comments improved.
+ Two submenus rearranged.
bash-support.zip 2.10 2009-01-30 7.0 Fritz Mehner - new item in the Statements-menu: 'for ((...)) do done'.
- new item in the Statements-menu: 'printf "%s"'.
- new item in the Statements-menu: indirect parameter expansion ${!name}
- Bugfix: unnecessary submenu beyond 'Environ'.
- Bugfix: shopt menu had no insert mode.
bash-support.zip 2.9.1 2009-01-08 7.0 Fritz Mehner - Map leader for hotkeys now user definable: new global variable g:BASH_MapLeader.
- Bugfix: 'Statements->no. of elem.s' inserts wrong text.
bash-support.zip 2.9 2008-11-03 7.0 Fritz Mehner + Can now be used under Windows, e.g. with win-bash (few restrictions).
+ Name completion when entering a builtin name.
+ Bugfix: help shows no selection when just 2 manuals are available.
bash-support.zip 2.8 2008-10-21 7.0 Fritz Mehner + New help menu: help reorganized, 3 new help hotkeys.
+ The help hotkeys now also work when Vim is run on the console.
bash-support.zip 2.7.1 2008-10-03 7.0 Fritz Mehner + Minor bugfix in the I/O-Redir-menu.
+ I/O-Redir-menu shows redirectors (sort of help).
+ I/O-Redir-menu: here-document item has a vmode.
+ File name expansion for the first command line argument entered with <S-F9>.
bash-support.zip 2.7 2008-08-14 7.0 Fritz Mehner + When a Bash script is started from the Vim command line errors and warnings (if any)
  are caught in an error window allowing quickfix commands to be used.
+ Scripts which are not set executable can be run under Vim.
+ One new hotkey.
bash-support.zip 2.6 2008-07-24 7.0 Fritz Mehner + Superfluous control characters for mode switching (menus, hotkeys) removed. Caused beeps.
+ Most hotkeys now work in insert mode.
bash-support.zip 2.5 2008-05-29 7.0 Fritz Mehner + Menu item 'toggle comment' replaces 'code->comment' and 'comment->code'
+ Hotkey \co removed,  \cc is now a toggle.
+ Bugfix. Adjusting comments (\cj): # in '$#' and '${#...}' is no longer
  regarded as a start of a comment.
+ Bugfix. \cl in insert mode called function for visual mode.
bash-support.zip 2.4 2008-01-17 7.0 Fritz Mehner + Format for the macros |DATE|, |TIME|, and |YEAR| can be defined by the user.
+ Option 'nocasematch' added.
+ Additional menu entries: 1 parameter substitution, 1 special variable, array index list.
+ Help text improved.
bash-support.zip 2.3 2007-08-25 6.0 Fritz Mehner + Changes to allow a system-wide installation (please see the help file 'doc/bashsupport.txt').
bash-support.zip 2.2 2007-06-25 6.0 Fritz Mehner + Snippets can now be managed in the console mode.
+ Three new key mappings for snippet handling.
+ Three items from the statements menu removed (quoting; but see file customization.vimrc).
bash-support.zip 2.1 2007-05-23 6.0 Fritz Mehner + New menu item and key mapping to adjust end-of-line comments.
+ New insert mode mappings.
+ A few mappings have been renamed (to bring them into line with my C/C++ and Perl plugin).
bash-support.zip 2.0.1 2007-03-12 6.0 Fritz Mehner + Bugfix: missing hotkey \ch added (Thanks to Ian Tegebo).
+ File wrapper.sh moved to the new directory 'bash-support/scripts'.
bash-support.zip 2.0 2007-01-23 6.0 Fritz Mehner + PLUGIN DIRECTORIES REARRANGED.
+ One new mapping (\cs).
+ Statement menu extended.
+ Bash keyword help (S-F1) improved.
+ Bugfix: empty new file after removing the header template can't be closed.
+ Bugfix : Tools entry missing when root menu not shown from the start.
bash-support.zip 1.15 2006-12-13 6.0 Fritz Mehner + Inserting a function can be used in visual mode (+ new key mapping).
+ Bugfix: cursor misplaced after some visual mode operations.
+ Needs Vim version 7.0+.
bash-support.zip 1.14 2006-08-02 6.0 Fritz Mehner + Setting the column for the start of line-end comments improved.
+ Mac OS X : circumvent a Vim bug which caused a crash when loading plugin version 1.13.
bash-support.zip 1.13 2006-04-24 6.0 Fritz Mehner + The hotkeys F9 and \rd now also starts the debugger if vim is running without GUI.
+ The debugger frontend ddd can be started as preferred debugger.
+ New help entry in the main menu of this plugin (shows the plugin documentation).
+ A hardcopy shows the localized date and time in the header line.
bash-support.zip 1.12 2005-11-14 6.0 Fritz Mehner + Bugfix: hotkey <S-F9> now working again.
+ Syntax check recognizes shopt options.
+ New regex menu: compose regular expressions with a few keystrokes from the menu.
bash-support.zip 1.11 2005-11-01 6.0 Fritz Mehner + Start debugger bashdb with a keystroke.
+ Parameter, environmnent variables, builtins completed.
+ Code <-> comment working in all modes.
+ Insert/remove echo for commenting/uncommenting statements.
+ Script will be made executable before running it (e.g. after a "Save As...").
bash-support.zip 1.10.1 2005-10-03 6.0 Fritz Mehner + Starting an xterm was not possible for some Linux/Unix installations (bugfix).
bash-support.zip 1.10 2005-08-23 6.0 Fritz Mehner + Shopt-menu added.
+ New Bash 3.0 set options added.
+ More builtins.
+ <S-F1> or \h displays help for the Bash builtin command under the cursor.
+ Key mappings for all run menu entries.
+ Line end comments start in a fixed column now (can be set from the menu).
+ Spaces in path names and file names are now possible.
+ Template files and snippet files are no longer kept in the list of alternate files.
bash-support.zip 1.9 2004-12-06 6.0 Fritz Mehner + Running a Bash-script
  (1) The script can be run from the command line as usual.
  (2) The output can be directed into a window with name "Bash-Output".
  (3) The script can be run in a xterm.
+ The new hotkey Shift-F9 or the "cmd. line arg." sets command line arguments for the
  current buffer (that is, each buffer can have its own arguments).
+ A code snippet with the file name extension "ni" or "noindent" will not be
  indented on insertion.
+ 'Line End Comments' ignores blank lines in a marked block.
+ Calling a set-command (submenu "Set") for a marked block will set this option above
  this block and unset it below.
bash-support.zip 1.8 2004-07-09 6.0 Fritz Mehner + Installation simplified.
+ Run syntax check / list errors in an error window.
+ Append aligned comments to all lines of a marked block.
+ The root menu can be removed.
+ The dialog windows (GUI) have been replaced by more flexible command line inputs.
+ The undocumented and unnecessary hot key F12 has been removed.
bash-support.zip 1.7 2003-08-11 6.0 Fritz Mehner + Only one entry in the gVim root menu.
+ 28 key mappings for Vim without GUI. See bash-hot-keys.pdf (reference card).
+ All hotkeys are only defined for bash files.
+ Install script added.
+ Customization improved.
+ Vim doc added (file bashsupport.txt).
+ Documentation improved.
+ Bug fix (template file handling)
bash-support.zip 1.5 2003-05-31 6.0 Fritz Mehner + Tag substitution rewritten (Some characters in a substitution text for a tag  prevented the tag from being substituted).
+ All bash variables can now be inserted from the menus.
+ A marked region can be surrounded by a for-, if, select- while- or until   statement (with indentation).
+ A marked text can be surrounded with quotes.
+ A marked region or a complete line can be surrounded with echo " ".
+ The echo " " can be removed from a line.
bash-support.zip 1.4 2003-04-26 6.0 Fritz Mehner + Block comments are now read as templates or skeletons from files:
    frame Comment,  function description,  file header
+ These templates can contain tags like |FILENAME|, |AUTHOR| etc. which are replaced   after reading.
+ indentation: multiline inserts and code snippets will be indented after insertion.
+ Most menu entries are now also active in normal mode.
+ Reading the templates is done in one function which can be called in an autocmd.
+ Code cleanup: register z no longer used. Most function calls are silent now.
bash-support.vim 1.3 2002-08-07 6.0 Fritz Mehner Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
OSDN.net Logo