Vim Plug-Ins  –  What's new?

Run scripts in terminal windows

Jan 2018

The preview versions of Bash-Support and Lua-Support can now run code asynchronously inside the editor, using a terminal window. This relies on Vim's new +terminal feature, or Neovim's terminal integration.

Set the output method using:

:BashOutputMethod terminal
:LuaOutputMethod terminal
Then the script will be run inside a terminal window. The interpreter can be started the usual way, using the map \rr, the menu entry Bash/Lua -> Run -> run, the ex-command :Bash, or :Lua.

Once the script execution finished, the map \qf can be used inside the terminal window to load its contents into quickfix. The map \qj loads quickfix and immediately jumps to the first error.

See WolfgangMehner/bash-support and WolfgangMehner/lua-support for the preview versions which already include this feature. Up to now, a new window is opened every time, which will still need to be improved.


Customizable file skeletons

Jul 2017

The mechanism which inserts file headers into new files was been extended for various plug-ins. The default behavior remains the same, but you can now automatically insert more than one templates.

The list of templates to be inserted is defined via so-called properties, directly inside the template library. Use the set-up wizard to create a template customization file. The wizard is accessible via the menu entry *ROOT MENU* -> Snippets-> template setup wizard.

In the template file, set the corresponding property, e.g.:

SetProperty ( 'Bash::FileSkeleton::Script', 'Comments.shebang;Comments.file header; ;Skeleton.script-set' )
The property is a semicolon-separated list of templates to be inserted. The above example will insert a shebang, a file description comment, and the default set commands from the template "Skeleton.script-set". If a space appears as an entry in the list, an empty line is inserted ( '...; ;...' ).

You will find short examples in the template customization files delivered with the plug-ins, see *-support/rc/custom.templates. Help is available for each property:

:help Bash::FileSkeleton::Script
For scripting languages, the following are supported:
Awk::FileSkeleton::Script Bash::FileSkeleton::Script Lua::FileSkeleton::Script
For C-Support, the list of templates can be different for headers and source files, as well as for C and C++ files:
C::FileSkeleton::Header Cpp::FileSkeleton::Header C::FileSkeleton::Source Cpp::FileSkeleton::Source

See WolfgangMehner/awk-support, WolfgangMehner/bash-support, WolfgangMehner/c-support, and WolfgangMehner/lua-support for the preview versions which already include this feature.


Lua and Perl Incorporated in SpaceVim

Jan 2017

Lua-Support and Perl-Support have been added to SpaceVim/SpaceVim. Go and have a look!


Run the LaTeX Typesetter in the Background

Sep 2016

A new version of LaTeX-Support is in the works. It uses the new +job feature of Vim to run external processes in the background.

Call the new ex-command :LatexProcessing background to switch to background processing. Now the typesetter is run asynchronously, you can continue to edit the document at the same time. In case of errors, a warning message will be displayed after the external process finished. Use :LatexErrors to load the error messages into quickfix.

See WolfgangMehner/latex-support for the preview version.


Read Lua's Reference Manuals Inside Vim

Aug 2016

Lua's reference manuals are included in Vim's help format in the new version of the plug-in (Lua-Support v1.0). This way the documentation of Lua's standard library is accessible without switching to another application.

With the cursor on the name of a Lua function (or variable) from the standard library, hit the map \h3 to jump to the corresponding entry in the Lua 5.3 reference manual. Likewise, \h1 and \h2 get you to Lua 5.1 and Lua 5.2, respectively. Don't forget to create the helptags first, via :helptags <dir>.


New Plug-in Versions Released

Jul/Aug 2016

New plug-in versions (C/C++ v6.2, Perl v5.4, Bash v4.3, ...) have been released. The updates focus on better configurability of the template library. The new releases include improved templates, the highlights are much better looking menus for Bash, Perl, and LaTeX. The make and CMake tools now include tab-completion for make targets.

The template libraries can now be extended and configured much easier. All plug-ins come with a set-up wizard, accessible via the menu entry *ROOT MENU* -> Snippets-> template setup wizard. You can use it to create a personalization file which will be loaded by all plug-ins. This is a central place to set your name, mail, and your preferred date and time format.

Furthermore, every template library can be extended independently from the stock templates using template customization files. They can also be created using the wizard. Since they are located outside the plug-in directories, they will not be overwritten by future updates.

The Make Tool now comes with tab-completion for make targets. After the Makefile has been set using :MakeFile, you can complete the targets while typing a :Make <target> command. Similarly, :CMake supports the completion after setting :CMakeBuildLocation <dir>. Then, you can also use :CMakeCache to display your cached variables. Also try :CMakeCurses and :CMakeGui



Page updated: January 30 2018   /   Mail to: Wolfgang Mehner