diff --git a/README.md b/README.md
index a46ccff..700b670 100644
--- a/README.md
+++ b/README.md
@@ -3,31 +3,26 @@
This repository hosts the latest development versions of various Vim plug-ins.
Currently maintained by Wolfgang Mehner:
[GitHub](https://github.com/WolfgangMehner)
-[Vim.org](http://www.vim.org/account/profile.php?user_id=36934)
+[Vim.org](https://www.vim.org/account/profile.php?user_id=36934)
__Support for Various Programming Languages__
-Name | Supports | vim.org | GitHub
---- | --- | --- | ---
-AWK-Support | AWK | [vim.org](http://www.vim.org/scripts/script.php?script_id=4415) | [GitHub](https://github.com/WolfgangMehner/awk-support)
-Bash-Support | Bash | [vim.org](http://www.vim.org/scripts/script.php?script_id=365) | [GitHub](https://github.com/WolfgangMehner/bash-support)
-C-Support | C/C++ & Doxygen | [vim.org](http://www.vim.org/scripts/script.php?script_id=213) | [GitHub](https://github.com/WolfgangMehner/c-support)
-LaTeX-Support | LaTeX/LuaTeX/BibTeX | [vim.org](http://www.vim.org/scripts/script.php?script_id=4405) | [GitHub](https://github.com/WolfgangMehner/latex-support)
-Lua-Support | Lua & C-API | [vim.org](http://www.vim.org/scripts/script.php?script_id=4950) | [GitHub](https://github.com/WolfgangMehner/lua-support)
-Matlab-Support | Matlab | - | [GitHub](https://github.com/WolfgangMehner/matlab-support)
-Perl-Support | Perl & POD | [vim.org](http://www.vim.org/scripts/script.php?script_id=556) | [GitHub](https://github.com/WolfgangMehner/perl-support)
-Vim-Support | Vim-Script | [vim.org](http://www.vim.org/scripts/script.php?script_id=3931) | [GitHub](https://github.com/WolfgangMehner/vim-support)
+Name | Supports | vim.org | GitHub | Screenshots
+--- | --- | --- | --- | ---
+AWK-Support | AWK | [vim.org](https://www.vim.org/scripts/script.php?script_id=4415) | [GitHub](https://github.com/WolfgangMehner/awk-support) | [here](https://wolfgangmehner.github.io/vim-plugins/awksupport)
+Bash-Support | Bash | [vim.org](https://www.vim.org/scripts/script.php?script_id=365) | [GitHub](https://github.com/WolfgangMehner/bash-support) | [here](https://wolfgangmehner.github.io/vim-plugins/bashsupport)
+C-Support | C/C++ & Doxygen | [vim.org](https://www.vim.org/scripts/script.php?script_id=213) | [GitHub](https://github.com/WolfgangMehner/c-support) | [here](https://wolfgangmehner.github.io/vim-plugins/csupport)
+LaTeX-Support | LaTeX/LuaTeX/BibTeX | [vim.org](https://www.vim.org/scripts/script.php?script_id=4405) | [GitHub](https://github.com/WolfgangMehner/latex-support) | [here](https://wolfgangmehner.github.io/vim-plugins/latexsupport)
+Lua-Support | Lua & C-API | [vim.org](https://www.vim.org/scripts/script.php?script_id=4950) | [GitHub](https://github.com/WolfgangMehner/lua-support) | [here](https://wolfgangmehner.github.io/vim-plugins/luasupport)
+Perl-Support | Perl & POD | [vim.org](https://www.vim.org/scripts/script.php?script_id=556) | [GitHub](https://github.com/WolfgangMehner/perl-support) | [here](https://wolfgangmehner.github.io/vim-plugins/perlsupport)
+Vim-Support | Vim-Script | [vim.org](https://www.vim.org/scripts/script.php?script_id=3931) | [GitHub](https://github.com/WolfgangMehner/vim-support) | [here](https://wolfgangmehner.github.io/vim-plugins/vimsupport)
__Other Tools__
-Name | Description | vim.org | GitHub
---- | --- | --- | ---
-Git-Support | Manage Git repos from within Vim | [vim.org](http://www.vim.org/scripts/script.php?script_id=4497) | [GitHub](https://github.com/WolfgangMehner/git-support)
-Verilog-Support | SystemVerilog & UVM by [jmcneal](https://github.com/jmcneal) | - | [GitHub](https://github.com/jmcneal/verilog-support)
-
-Most of the plug-ins were originally developed by Fritz Mehner:
-[GitHub](https://github.com/FritzMehner)
-[Vim.org](http://www.vim.org/account/profile.php?user_id=169)
+Name | Description | vim.org | GitHub | Screenshots
+--- | --- | --- | --- | ---
+Git-Support | Manage Git repos from within Vim | [vim.org](https://www.vim.org/scripts/script.php?script_id=4497) | [GitHub](https://github.com/WolfgangMehner/git-support) | [here](https://wolfgangmehner.github.io/vim-plugins/gitsupport)
+Verilog-Support | SystemVerilog & UVM by [jmcneal](https://github.com/jmcneal) | - | [GitHub](https://github.com/jmcneal/verilog-support) | -
# Installation
@@ -35,7 +30,9 @@ We recommend downloading the latest official versions published on vim.org (see
Or try the development snapshots in the individual GitHub repositories (see above).
The versions available here might be buggy.
-If you really want to use the versions from the repository, [consult this](https://github.com/WolfgangMehner/vim-plugins/wiki/Installation).
+You can use this repository, as well as the ones linked above, with any plug-in manager.
+
+For more information, please [consult this](https://github.com/WolfgangMehner/vim-plugins/wiki/Installation).
# Documentation
@@ -43,17 +40,19 @@ Each plug-in comes with its own readme as well as an extensive documentation uti
:help c-support
- :help git-support
+ :help lua-support
+
+# Get Involved
-# Mailing List
+You are welcome to use the issue tracker to post questions, suggestions, and bug reports.
-You can subscribe to the vim-plugins-list mailing list to post your questions or suggestions for improvement or to report bugs.
-The list will also be used to announce new releases.
-Visit the following page for subscribing to the mailing list:
+Please help us keep track of all the issues and name your report/request appropriately:
-[http://lug.fh-swf.de/cgi-bin/mailman/listinfo/vim-plugins-list](http://lug.fh-swf.de/cgi-bin/mailman/listinfo/vim-plugins-list)
+ "Bash-Support:
"
-The vim-plugins-list list is very low on traffic.
+ "C-Support: "
+
+ "...-Support: ..."
# Contributing
@@ -67,3 +66,9 @@ Please have a look [here](https://github.com/WolfgangMehner/vim-plugins/wiki/Con
# License
Published under the [GNU General Public License, Version 2](http://www.gnu.de/documents/gpl-2.0.en.html).
+
+# Credits
+
+Most of the plug-ins were originally developed by Fritz Mehner:
+[GitHub](https://github.com/FritzMehner)
+[Vim.org](https://www.vim.org/account/profile.php?user_id=169)
diff --git a/autoload/mmtemplates/core.vim b/autoload/mmtemplates/core.vim
index f466465..f941869 100644
--- a/autoload/mmtemplates/core.vim
+++ b/autoload/mmtemplates/core.vim
@@ -11,8 +11,8 @@
" Organization:
" Version: see variable g:Templates_Version below
" Created: 30.08.2011
-" Revision: 14.04.2017
-" License: Copyright (c) 2012-2016, Wolfgang Mehner
+" Revision: 06.08.2020
+" License: Copyright (c) 2012-2020, Wolfgang Mehner
" This program is free software; you can redistribute it and/or
" modify it under the terms of the GNU General Public License as
" published by the Free Software Foundation, version 2 of the
@@ -23,11 +23,11 @@
" PURPOSE.
" See the GNU General Public License version 2 for more details.
"===============================================================================
-"
+
"-------------------------------------------------------------------------------
" === Basic Checks === {{{1
"-------------------------------------------------------------------------------
-"
+
" need at least 7.0
if v:version < 700
echohl WarningMsg
@@ -35,15 +35,15 @@ if v:version < 700
echohl None
finish
endif
-"
+
" prevent duplicate loading
" need compatible
if &cp || ( exists('g:Templates_Version') && g:Templates_Version != 'searching' && ! exists('g:Templates_DevelopmentOverwrite') )
finish
endif
-"
-let s:Templates_Version = '1.1alpha' " version number of this script; do not change
-"
+
+let s:Templates_Version = '1.1beta' " version number of this script; do not change
+
"----------------------------------------------------------------------
" --- Find Newest Version --- {{{2
"----------------------------------------------------------------------
@@ -133,13 +133,13 @@ else
endif
" }}}2
"-------------------------------------------------------------------------------
-"
+
let g:Templates_Version = s:Templates_Version " version number of this script; do not change
-"
+
"----------------------------------------------------------------------
" === Modul Setup === {{{1
"----------------------------------------------------------------------
-"
+
"-------------------------------------------------------------------------------
" s:ApplyDefaultSetting : Write default setting to a global variable. {{{2
"
@@ -152,13 +152,13 @@ let g:Templates_Version = s:Templates_Version " version number of this scrip
" If g: does not exists, assign:
" g: = value
"-------------------------------------------------------------------------------
-"
+
function! s:ApplyDefaultSetting ( varname, value )
- if ! exists ( 'g:'.a:varname )
- let { 'g:'.a:varname } = a:value
+ if ! exists( 'g:'.a:varname )
+ let {'g:'.a:varname} = a:value
endif
-endfunction " ---------- end of function s:ApplyDefaultSetting ----------
-"
+endfunction
+
"-------------------------------------------------------------------------------
" s:GetGlobalSetting : Get a setting from a global variable. {{{2
"
@@ -175,20 +175,20 @@ endfunction " ---------- end of function s:ApplyDefaultSetting ----------
" g: == 0 -> s: = "no"
" otherwise -> s: = "yes"
"-------------------------------------------------------------------------------
-"
+
function! s:GetGlobalSetting ( varname, ... )
- if a:0 > 0 && a:1 == 'bin' && exists ( 'g:'.a:varname ) && type ( 0 ) == type ( { 'g:'.a:varname } )
- let { 's:'.a:varname } = { 'g:'.a:varname } == 0 ? 'no' : 'yes'
- elseif exists ( 'g:'.a:varname )
- let { 's:'.a:varname } = { 'g:'.a:varname }
+ if a:0 > 0 && a:1 == 'bin' && exists( 'g:'.a:varname ) && type( 0 ) == type( {'g:'.a:varname} )
+ let {'s:'.a:varname} = {'g:'.a:varname} == 0 ? 'no' : 'yes'
+ elseif exists( 'g:'.a:varname )
+ let {'s:'.a:varname} = {'g:'.a:varname}
endif
- "
- let s:Templates_AllSettings[ a:varname ] = { 's:'.a:varname }
-endfunction " ---------- end of function s:GetGlobalSetting ----------
-"
+
+ let s:Templates_AllSettings[ a:varname ] = {'s:'.a:varname}
+endfunction
+
" }}}2
"-------------------------------------------------------------------------------
-"
+
" platform specifics
let s:MSWIN = has("win16") || has("win32") || has("win64") || has("win95")
let s:UNIX = has("unix") || has("macunix") || has("win32unix")
diff --git a/autoload/mmtoolbox/bash/bashdb.vim b/autoload/mmtoolbox/bash/bashdb.vim
new file mode 100644
index 0000000..2470a65
--- /dev/null
+++ b/autoload/mmtoolbox/bash/bashdb.vim
@@ -0,0 +1,895 @@
+"===============================================================================
+"
+" File: bashdb.vim
+"
+" Description: Part of the Bash-Support toolbox.
+"
+" Vim/gVim integration of BashDB.
+"
+" See help file bashdbintegration.txt .
+"
+" VIM Version: 7.3+
+" Author: Wolfgang Mehner, wolfgang-mehner@web.de
+" Organization:
+" Version: see variable g:BashDB_Version below
+" Created: 28.09.2017
+" Revision: 19.04.2019
+" License: Copyright (c) 2017-2019, Wolfgang Mehner
+" This program is free software; you can redistribute it and/or
+" modify it under the terms of the GNU General Public License as
+" published by the Free Software Foundation, version 2 of the
+" License.
+" This program is distributed in the hope that it will be
+" useful, but WITHOUT ANY WARRANTY; without even the implied
+" warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+" PURPOSE.
+" See the GNU General Public License version 2 for more details.
+"===============================================================================
+
+"-------------------------------------------------------------------------------
+" === Basic checks === {{{1
+"-------------------------------------------------------------------------------
+
+" need at least 7.3
+if v:version < 703
+ echohl WarningMsg
+ echo 'The plugin mmtoolbox/bashdb.vim needs Vim version >= 7.3.'
+ echohl None
+ finish
+endif
+
+" prevent duplicate loading
+" need compatible
+if &cp || ( exists('g:BashDB_Version') && ! exists('g:BashDB_DevelopmentOverwrite') )
+ finish
+endif
+
+let g:BashDB_Version= '0.5' " version number of this script; do not change
+
+"-------------------------------------------------------------------------------
+" === Auxiliary functions === {{{1
+"-------------------------------------------------------------------------------
+
+"-------------------------------------------------------------------------------
+" s:ApplyDefaultSetting : Write default setting to a global variable. {{{2
+"
+" Parameters:
+" varname - name of the variable (string)
+" value - default value (string)
+" Returns:
+" -
+"
+" If g: does not exists, assign:
+" g: = value
+"-------------------------------------------------------------------------------
+
+function! s:ApplyDefaultSetting ( varname, value )
+ if ! exists ( 'g:'.a:varname )
+ let { 'g:'.a:varname } = a:value
+ endif
+endfunction " ---------- end of function s:ApplyDefaultSetting ----------
+
+"-------------------------------------------------------------------------------
+" s:ErrorMsg : Print an error message. {{{2
+"
+" Parameters:
+" line1 - a line (string)
+" line2 - a line (string)
+" ... - ...
+" Returns:
+" -
+"-------------------------------------------------------------------------------
+
+function! s:ErrorMsg ( ... )
+ echohl WarningMsg
+ for line in a:000
+ echomsg line
+ endfor
+ echohl None
+endfunction " ---------- end of function s:ErrorMsg ----------
+
+"-------------------------------------------------------------------------------
+" s:GetGlobalSetting : Get a setting from a global variable. {{{2
+"
+" Parameters:
+" varname - name of the variable (string)
+" glbname - name of the global variable (string, optional)
+" Returns:
+" -
+"
+" If 'glbname' is given, it is used as the name of the global variable.
+" Otherwise the global variable will also be named 'varname'.
+"
+" If g: exists, assign:
+" s: = g:
+"-------------------------------------------------------------------------------
+
+function! s:GetGlobalSetting ( varname, ... )
+ let lname = a:varname
+ let gname = a:0 >= 1 ? a:1 : lname
+ if exists ( 'g:'.gname )
+ let { 's:'.lname } = { 'g:'.gname }
+ endif
+endfunction " ---------- end of function s:GetGlobalSetting ----------
+
+"-------------------------------------------------------------------------------
+" s:ImportantMsg : Print an important message. {{{2
+"
+" Parameters:
+" line1 - a line (string)
+" line2 - a line (string)
+" ... - ...
+" Returns:
+" -
+"-------------------------------------------------------------------------------
+
+function! s:ImportantMsg ( ... )
+ echohl Search
+ echo join ( a:000, "\n" )
+ echohl None
+endfunction " ---------- end of function s:ImportantMsg ----------
+
+"-------------------------------------------------------------------------------
+" s:Question : Ask the user a question. {{{2
+"
+" Parameters:
+" prompt - prompt, shown to the user (string)
+" highlight - "normal" or "warning" (string, default "normal")
+" Returns:
+" retval - the user input (integer)
+"
+" The possible values of 'retval' are:
+" 1 - answer was yes ("y")
+" 0 - answer was no ("n")
+" -1 - user aborted ("ESC" or "CTRL-C")
+"-------------------------------------------------------------------------------
+
+function! s:Question ( prompt, ... )
+
+ let ret = -2
+
+ " highlight prompt
+ if a:0 == 0 || a:1 == 'normal'
+ echohl Search
+ elseif a:1 == 'warning'
+ echohl Error
+ else
+ echoerr 'Unknown option : "'.a:1.'"'
+ return
+ end
+
+ " question
+ echo a:prompt.' [y/n]: '
+
+ " answer: "y", "n", "ESC" or "CTRL-C"
+ while ret == -2
+ let c = nr2char( getchar() )
+
+ if c == "y"
+ let ret = 1
+ elseif c == "n"
+ let ret = 0
+ elseif c == "\" || c == "\"
+ let ret = -1
+ endif
+ endwhile
+
+ " reset highlighting
+ echohl None
+
+ return ret
+endfunction " ---------- end of function s:Question ----------
+
+"-------------------------------------------------------------------------------
+" s:Redraw : Redraw depending on whether a GUI is running. {{{2
+"
+" Example:
+" call s:Redraw ( 'r!', '' )
+" Clear the screen and redraw in a terminal, do nothing when a GUI is running.
+"
+" Parameters:
+" cmd_term - redraw command in terminal mode (string)
+" cmd_gui - redraw command in GUI mode (string)
+" Returns:
+" -
+"-------------------------------------------------------------------------------
+
+function! s:Redraw ( cmd_term, cmd_gui )
+ if has('gui_running')
+ let cmd = a:cmd_gui
+ else
+ let cmd = a:cmd_term
+ endif
+
+ let cmd = substitute ( cmd, 'r\%[edraw]', 'redraw', '' )
+ if cmd != ''
+ silent exe cmd
+ endif
+endfunction " ---------- end of function s:Redraw ----------
+
+"-------------------------------------------------------------------------------
+" s:ShellParseArgs : Turn cmd.-line arguments into a list. {{{2
+"
+" Parameters:
+" line - the command-line arguments to parse (string)
+" Returns:
+" list - the arguments as a list (list)
+"-------------------------------------------------------------------------------
+
+function! s:ShellParseArgs ( line )
+
+ let list = []
+ let curr = ''
+
+ let line = a:line
+
+ while line != ''
+
+ if match ( line, '^\s' ) != -1
+ " non-escaped space -> finishes current argument
+ let line = matchstr ( line, '^\s\+\zs.*' )
+ if curr != ''
+ call add ( list, curr )
+ let curr = ''
+ endif
+ elseif match ( line, "^'" ) != -1
+ " start of a single-quoted string, parse past next single quote
+ let mlist = matchlist ( line, "^'\\([^']*\\)'\\(.*\\)" )
+ if empty ( mlist )
+ throw "ShellParseArgs:Syntax:no matching quote '"
+ endif
+ let curr .= mlist[1]
+ let line = mlist[2]
+ elseif match ( line, '^"' ) != -1
+ " start of a double-quoted string, parse past next double quote
+ let mlist = matchlist ( line, '^"\(\%([^\"]\|\\.\)*\)"\(.*\)' )
+ if empty ( mlist )
+ throw 'ShellParseArgs:Syntax:no matching quote "'
+ endif
+ let curr .= substitute ( mlist[1], '\\\([\"]\)', '\1', 'g' )
+ let line = mlist[2]
+ elseif match ( line, '^\\' ) != -1
+ " escape sequence outside of a string, parse one additional character
+ let mlist = matchlist ( line, '^\\\(.\)\(.*\)' )
+ if empty ( mlist )
+ throw 'ShellParseArgs:Syntax:single backspace \'
+ endif
+ let curr .= mlist[1]
+ let line = mlist[2]
+ else
+ " otherwise parse up to next special char.: space, backslash, quote
+ let mlist = matchlist ( line, '^\([^[:space:]\\''"]\+\)\(.*\)' )
+ let curr .= mlist[1]
+ let line = mlist[2]
+ endif
+ endwhile
+
+ " add last argument
+ if curr != ''
+ call add ( list, curr )
+ endif
+
+ return list
+endfunction " ---------- end of function s:ShellParseArgs ----------
+
+"-------------------------------------------------------------------------------
+" s:SID : Return the . {{{2
+"
+" Parameters:
+" -
+" Returns:
+" SID - the SID of the script (string)
+"-------------------------------------------------------------------------------
+
+function! s:SID ()
+ return matchstr ( expand(''), '\zs\d\+\ze_SID$' )
+endfunction " ---------- end of function s:SID ----------
+
+"-------------------------------------------------------------------------------
+" s:UserInput : Input after a highlighted prompt. {{{2
+"
+" Parameters:
+" prompt - the prompt (string)
+" text - the default input (string)
+" compl - completion (string, optional)
+" clist - list, if 'compl' is "customlist" (list, optional)
+" Returns:
+" input - the user input, an empty sting if the user hit (string)
+"-------------------------------------------------------------------------------
+
+function! s:UserInput ( prompt, text, ... )
+
+ echohl Search " highlight prompt
+ call inputsave() " preserve typeahead
+ if a:0 == 0 || a:1 == ''
+ let retval = input( a:prompt, a:text )
+ elseif a:1 == 'customlist'
+ let s:UserInputList = a:2
+ let retval = input( a:prompt, a:text, 'customlist,'.s:SID().'_UserInputEx' )
+ let s:UserInputList = []
+ else
+ let retval = input( a:prompt, a:text, a:1 )
+ endif
+ call inputrestore() " restore typeahead
+ echohl None " reset highlighting
+
+ let retval = substitute( retval, '^\s\+', "", "" ) " remove leading whitespaces
+ let retval = substitute( retval, '\s\+$', "", "" ) " remove trailing whitespaces
+
+ return retval
+
+endfunction " ---------- end of function s:UserInput ----------
+
+"-------------------------------------------------------------------------------
+" s:UserInputEx : ex-command for s:UserInput. {{{3
+"-------------------------------------------------------------------------------
+function! s:UserInputEx ( ArgLead, CmdLine, CursorPos )
+ if empty( a:ArgLead )
+ return copy( s:UserInputList )
+ endif
+ return filter( copy( s:UserInputList ), 'v:val =~ ''\V\<'.escape(a:ArgLead,'\').'\w\*''' )
+endfunction " ---------- end of function s:UserInputEx ----------
+" }}}3
+"-------------------------------------------------------------------------------
+
+"-------------------------------------------------------------------------------
+" s:WarningMsg : Print a warning/error message. {{{2
+"
+" Parameters:
+" line1 - a line (string)
+" line2 - a line (string)
+" ... - ...
+" Returns:
+" -
+"-------------------------------------------------------------------------------
+
+function! s:WarningMsg ( ... )
+ echohl WarningMsg
+ echo join ( a:000, "\n" )
+ echohl None
+endfunction " ---------- end of function s:WarningMsg ----------
+
+" }}}2
+"-------------------------------------------------------------------------------
+
+"-------------------------------------------------------------------------------
+" === Module setup === {{{1
+"-------------------------------------------------------------------------------
+
+"-------------------------------------------------------------------------------
+" == Platform specific items == {{{2
+"-------------------------------------------------------------------------------
+
+let s:MSWIN = has("win16") || has("win32") || has("win64") || has("win95")
+let s:UNIX = has("unix") || has("macunix") || has("win32unix")
+
+let s:installation = 'standalone'
+if exists ( 'g:Toolbox_Version' )
+ let s:installation = 'toolbox'
+endif
+
+if s:MSWIN
+ " MS Windows
+
+ let s:plugin_dir = substitute( expand(':p:h:h:h:h'), '\\', '/', 'g' )
+else
+ " Linux/Unix
+
+ let s:plugin_dir = expand(':p:h:h:h:h')
+endif
+
+"-------------------------------------------------------------------------------
+" == Various settings == {{{2
+"-------------------------------------------------------------------------------
+
+let s:BashDB_DDD_Exec = 'ddd'
+let s:BashDB_Executable = 'bashdb'
+
+call s:GetGlobalSetting ( 'BashDB_DDD_Exec' )
+call s:GetGlobalSetting ( 'BashDB_Executable', 'BASH_bashdb' )
+call s:GetGlobalSetting ( 'BashDB_Executable' )
+
+let s:BashDB_Debugger = 'xterm' " one of s:BashDB_DebuggerList
+let s:BashDB_DebuggerList = [ 'xterm' ]
+if executable ( s:BashDB_DDD_Exec )
+ let s:BashDB_DebuggerList += [ 'ddd' ]
+endif
+if has ( 'terminal' )
+ let s:BashDB_DebuggerList += [ 'terminal', 'integrated' ]
+endif
+call sort ( s:BashDB_DebuggerList )
+
+call s:GetGlobalSetting ( 'BashDB_Debugger', 'BASH_Debugger' )
+call s:GetGlobalSetting ( 'BashDB_Debugger' )
+
+if s:BashDB_Debugger == 'term'
+ let s:BashDB_Debugger = 'xterm' " downwards compatibility with Bash-Support
+endif
+
+let s:Xterm_Executable = 'xterm'
+
+call s:GetGlobalSetting ( 'Xterm_Executable' )
+call s:ApplyDefaultSetting ( 'Xterm_Options', '-fa courier -fs 12 -geometry 80x24' )
+
+"-------------------------------------------------------------------------------
+" == Checks == {{{2
+"-------------------------------------------------------------------------------
+
+let s:Enabled = 1
+
+if s:MSWIN || ! executable( s:BashDB_Executable )
+ let s:Enabled = 0
+endif
+
+"-------------------------------------------------------------------------------
+" == Custom commands == {{{2
+"-------------------------------------------------------------------------------
+
+" Cmd.-line completion {{{3
+
+"-------------------------------------------------------------------------------
+" s:GetDebuggerList : For cmd.-line completion.
+"-------------------------------------------------------------------------------
+function! s:DebuggerList (...)
+ return join ( s:BashDB_DebuggerList, "\n" )
+endfunction " ---------- end of function s:DebuggerList ----------
+
+" }}}3
+
+if s:Enabled == 1
+ command! -nargs=* -complete=file BashDB :call Run()
+ command! -nargs=* BashDBCommand :call SendCmd()
+ command! -bang -nargs=? -complete=custom,DebuggerList BashDBDebugger :call mmtoolbox#bash#bashdb#Property(''=='!'?'echo':'set','debugger',)
+ command! -bang -nargs=? -complete=shellcmd BashDBExecutable :call mmtoolbox#bash#bashdb#Property(''=='!'?'echo':'set','executable',)
+
+ command! -nargs=0 BashDBHelp :call HelpPlugin()
+ command! -bang -nargs=? BashDBSettings :call Settings((''=='!')+str2nr())
+else
+
+ " s:Disabled : Print why the script is disabled. {{{3
+ function! s:Disabled ()
+ let txt = "BashDB tool not working:\n"
+ if s:MSWIN
+ let txt .= "BashDB currently not supported under Windows"
+ elseif ! executable( s:BashDB_Executable )
+ let txt .= "BashDB not executable"
+ else
+ let txt .= "unknown reason\n"
+ let txt .= "see :help toolbox-bashdb"
+ endif
+ call s:ImportantMsg ( txt )
+ return
+ endfunction " ---------- end of function s:Disabled ----------
+ " }}}3
+
+ command! -bang -nargs=* BashDB :call Disabled()
+ command! -nargs=0 BashDBHelp :call HelpPlugin()
+ command! -bang -nargs=? BashDBSettings :call Settings((''=='!')+str2nr())
+
+endif
+" }}}2
+"-------------------------------------------------------------------------------
+
+"-------------------------------------------------------------------------------
+" GetInfo : Initialize the script. {{{1
+"-------------------------------------------------------------------------------
+function! mmtoolbox#bash#bashdb#GetInfo ()
+ if s:Enabled
+ return [ 'BashDB', g:BashDB_Version ]
+ else
+ return [ 'BashDB', g:BashDB_Version, 'disabled' ]
+ endif
+endfunction " ---------- end of function mmtoolbox#bash#bashdb#GetInfo ----------
+"
+"-------------------------------------------------------------------------------
+" AddMaps : Add maps. {{{1
+"-------------------------------------------------------------------------------
+function! mmtoolbox#bash#bashdb#AddMaps ()
+endfunction " ---------- end of function mmtoolbox#bash#bashdb#AddMaps ----------
+"
+"-------------------------------------------------------------------------------
+" AddMenu : Add menus. {{{1
+"-------------------------------------------------------------------------------
+function! mmtoolbox#bash#bashdb#AddMenu ( root, esc_mapl )
+
+ exe 'amenu '.a:root.'.&run\ debugger:BashDB :BashDB'
+
+ exe 'amenu '.a:root.'.-Sep01- '
+
+ exe 'amenu '.a:root.'.set\ &debugger:BashDBDebugger :BashDBDebugger '
+ exe 'amenu '.a:root.'.set\ &executable:BashDBExecutable :BashDBExecutable '
+
+ exe 'amenu '.a:root.'.-Sep02- '
+
+ exe 'amenu '.a:root.'.&settings:BashDBSettings :BashDBSettings'
+ exe 'amenu '.a:root.'.tool\ &help:BashDBHelp :BashDBHelp'
+
+endfunction " ---------- end of function mmtoolbox#bash#bashdb#AddMenu ----------
+"
+"-------------------------------------------------------------------------------
+" Property : Various settings. {{{1
+"-------------------------------------------------------------------------------
+function! mmtoolbox#bash#bashdb#Property ( mode, key, ... )
+
+ " check the mode
+ if a:mode !~ 'echo\|get\|set'
+ return s:ErrorMsg ( 'BashDB : Unknown mode: '.a:mode )
+ endif
+
+ " check 3rd argument for 'set'
+ if a:mode == 'set'
+ if a:0 == 0
+ return s:ErrorMsg ( 'BashDB : Not enough arguments for mode "set".' )
+ endif
+ let val = a:1
+ endif
+
+ " check the key
+ if a:key == 'enabled'
+ let var = 's:Enabled'
+ elseif a:key == 'debugger'
+ let var = 's:BashDB_Debugger'
+ elseif a:key == 'executable'
+ let var = 's:BashDB_Executable'
+ else
+ return s:ErrorMsg ( 'BashDB : Unknown option: '.a:key )
+ endif
+
+ " perform the action
+ if a:mode == 'echo'
+ echo {var}
+ return
+ elseif a:mode == 'get'
+ return {var}
+ elseif a:key == 'debugger'
+ " check against the list of debuggers
+ if index ( s:BashDB_DebuggerList, val ) > -1
+ let s:BashDB_Debugger = val
+ else
+ return s:ErrorMsg ( 'BashDB : Debugger unknown or not not enabled: '.val )
+ endif
+ elseif a:key == 'executable'
+ " check against the list of debuggers
+ if executable ( val )
+ let s:BashDB_Executable = val
+ else
+ return s:ErrorMsg ( 'BashDB : Not executable: '.val )
+ endif
+ else
+ " action is 'set', but key is non of the above
+ return s:ErrorMsg ( 'BashDB : Option is read-only, can not set: '.a:key )
+ endif
+
+endfunction " ---------- end of function mmtoolbox#bash#bashdb#Property ----------
+"
+"-------------------------------------------------------------------------------
+" s:HelpPlugin : Plugin help. {{{1
+"-------------------------------------------------------------------------------
+function! s:HelpPlugin ()
+ try
+ help bashdb-integration
+ catch
+ exe 'helptags '.s:plugin_dir.'/doc'
+ help bashdb-integration
+ endtry
+endfunction " ---------- end of function s:HelpPlugin ----------
+"
+"-------------------------------------------------------------------------------
+" s:Settings : Plugin settings. {{{1
+"-------------------------------------------------------------------------------
+function! s:Settings ( verbose )
+
+ if s:MSWIN | let sys_name = 'Windows'
+ elseif s:UNIX | let sys_name = 'UNIX'
+ else | let sys_name = 'unknown' | endif
+
+ let bashdb_status = executable( s:BashDB_Executable ) ? '' : ' (not executable)'
+ let ddd_status = executable( s:BashDB_DDD_Exec ) ? '' : ' (not executable)'
+
+ let txt = " BashDB-Tool settings\n\n"
+ \ .' plug-in installation : '.s:installation.' on '.sys_name."\n"
+ \ .' BashDB executable : '.s:BashDB_Executable.bashdb_status."\n"
+ if a:verbose
+ let txt .=
+ \ ' DDD executable : '.s:BashDB_DDD_Exec.ddd_status."\n"
+ endif
+ if s:installation == 'toolbox'
+ let txt .=
+ \ ' using toolbox : version '.g:Toolbox_Version."\n"
+ endif
+ if a:verbose
+ let txt .= "\n"
+ \ .' debugger : '.s:BashDB_Debugger."\n"
+ endif
+ let txt .=
+ \ "________________________________________________________________________________\n"
+ \ ." BashDB-Tool, Version ".g:BashDB_Version." / Wolfgang Mehner / wolfgang-mehner@web.de\n\n"
+
+ if a:verbose == 2
+ split BashDB_Settings.txt
+ put = txt
+ else
+ echo txt
+ endif
+endfunction " ---------- end of function s:Settings ----------
+
+"-------------------------------------------------------------------------------
+" s:Run : Run the debugger. {{{1
+"-------------------------------------------------------------------------------
+function! s:Run ( args )
+
+ if &filetype == 'sh' || &filetype == 'bash'
+ silent exe 'update'
+ endif
+
+ let script_name = shellescape( expand('%:p') )
+
+ if a:args != ''
+ let script_args = ' '.a:args
+ elseif exists( 'b:BASH_ScriptCmdLineArgs' )
+ let script_args = ' '.b:BASH_ScriptCmdLineArgs
+ else
+ let script_args = ''
+ endif
+
+ if s:BashDB_Debugger == 'xterm'
+ " debugger is 'bashdb' in xterm
+ if ! executable( s:BashDB_Executable )
+ return s:WarningMsg ( s:BashDB_Executable.' is not executable or not installed! ' )
+ endif
+
+ silent exe '!xterm '.g:Xterm_Options
+ \ .' -title '.shellescape( 'BashDB - '.expand('%:t') )
+ \ .' -e '.s:BashDB_Executable.' -- '.script_name.script_args.' &'
+ elseif s:BashDB_Debugger == 'ddd'
+ " debugger is 'ddd'
+ if ! executable( s:BashDB_DDD_Exec )
+ return s:WarningMsg ( s:BashDB_DDD_Exec.' is not executable or not installed! ' )
+ endif
+
+ silent exe '!ddd --debugger '.s:BashDB_Executable.' '.script_name.script_args.' &'
+ elseif s:BashDB_Debugger == 'terminal'
+ call s:ImportantMsg ( 'not implemented yet' )
+ elseif s:BashDB_Debugger == 'integrated'
+ call s:StartInternal ( script_name.script_args )
+ endif
+endfunction " ---------- end of function s:Run ----------
+
+"-------------------------------------------------------------------------------
+" === Internal BashDB execution === {{{1
+"-------------------------------------------------------------------------------
+
+"-------------------------------------------------------------------------------
+" == Debugger state == {{{2
+"
+" State of the internal debugger:
+"-------------------------------------------------------------------------------
+
+let s:debug_status = ''
+let s:debug_buf_ctrl = -1
+let s:debug_win_ctrl = -1
+let s:debug_buf_io = -1
+let s:debug_win_io = -1
+
+let s:debug_buf_script = -1
+let s:debug_win_script = -1
+
+"-------------------------------------------------------------------------------
+" s:StartInternal : Start the internal debugger. {{{2
+"
+" Parameters:
+" args - cmd.-line arguments, script and its arguments (string)
+" Returns:
+" -
+"-------------------------------------------------------------------------------
+function! s:StartInternal ( args )
+
+ if s:debug_status != ''
+ return s:WarningMsg ( 'debugger already running' )
+ endif
+
+ " bashdb: uses --tty the other way around
+ let is_bashdb = 0
+ let name_pty = 'BashDB - I/O'
+ let name_job = 'BashDB - CTRL'
+ if s:BashDB_Executable =~? '\cbashdb'
+ let is_bashdb = 1
+ let name_pty = 'BashDB - CTRL'
+ let name_job = 'BashDB - I/O'
+ endif
+
+ " script buffer/window
+ let s:debug_buf_script = bufnr( '%' )
+ let s:debug_win_script = win_getid( winnr() )
+
+ " only the script I/O appears here
+ let s:debug_buf_io = term_start ( 'NONE', {
+ \ 'term_name' : name_pty,
+ \ } )
+ let s:debug_win_io = win_getid( winnr() )
+
+ let tty = term_gettty ( s:debug_buf_io )
+
+ " start in another terminal, the control commands are run through this terminal
+ let arg_list = [ s:BashDB_Executable ]
+ let arg_list += [ '--tty', tty, '-x', tty ]
+ let arg_list += s:ShellParseArgs ( a:args )
+
+ " bashdb: switch order of windows (also see 'curwin' below)
+ if is_bashdb
+ belowright new
+ endif
+
+ let s:debug_buf_ctrl = term_start ( arg_list, {
+ \ 'term_name' : name_job,
+ \ 'curwin' : is_bashdb,
+ \ 'exit_cb' : function ( 's:EndInternal' ),
+ \ } )
+ let s:debug_win_ctrl = win_getid( winnr() )
+
+ " bashdb: switch the buffers
+ if is_bashdb
+ let [ s:debug_buf_io, s:debug_buf_ctrl ] = [ s:debug_buf_ctrl, s:debug_buf_io ]
+ let [ s:debug_win_io, s:debug_win_ctrl ] = [ s:debug_win_ctrl, s:debug_win_io ]
+ endif
+
+ " now we're cooking
+ let s:debug_status = 'running'
+
+ " set up script buffer
+ call win_gotoid( s:debug_win_script )
+
+ command! -buffer -nargs=0 Continue :call SendCmd('continue')
+ command! -buffer -nargs=0 Step :call SendCmd('step')
+
+ command! -buffer -bang -nargs=0 Break :call Breakpoint(''=='!')
+ command! -buffer -nargs=0 Display :call DisplayVariable()
+
+ if has( 'menu' )
+ anoremenu WinBar.Run :BashDBCommand run
+ anoremenu WinBar.Cont :Continue
+ anoremenu WinBar.Step :Step
+ anoremenu WinBar.Quit :BashDBCommand quit
+
+ anoremenu WinBar.Breakpoint :Break
+ anoremenu WinBar.Break\ Once :Break!
+ anoremenu WinBar.Display :Display
+ endif
+endfunction " ---------- end of function s:StartInternal ----------
+
+"-------------------------------------------------------------------------------
+" s:EndInternal : Callback for BashDB exiting. {{{2
+"
+" Parameters:
+" job - the job (job)
+" status - the status (number)
+" Returns:
+" -
+"-------------------------------------------------------------------------------
+function! s:EndInternal ( job, status )
+
+ " remove the debugger buffers
+ exe 'bwipe! '.s:debug_buf_io
+ if a:status == 0
+ exe 'bwipe! '.s:debug_buf_ctrl
+ endif
+
+ let s:debug_status = ''
+
+ call win_gotoid( s:debug_win_script )
+
+ " remove the menus and commands
+ if has( 'menu' )
+ aunmenu WinBar.Run
+ aunmenu WinBar.Cont
+ aunmenu WinBar.Step
+ aunmenu WinBar.Quit
+
+ aunmenu WinBar.Breakpoint
+ aunmenu WinBar.Break\ Once
+ aunmenu WinBar.Display
+ endif
+
+ delcommand Continue
+ delcommand Step
+
+ delcommand Break
+ delcommand Display
+
+ call s:Redraw ( 'r!', 'r' )
+
+ if a:status == 0
+ call s:ImportantMsg ( s:BashDB_Executable.' done' )
+ else
+ call s:ImportantMsg ( s:BashDB_Executable.' returned with error code '.a:status, ' use :bwipe! in the debugger buffer to properly close it' )
+ endif
+
+endfunction " ---------- end of function s:EndInternal ----------
+
+"-------------------------------------------------------------------------------
+" s:SendCmd : Send a command to the debugger. {{{2
+"
+" Parameters:
+" cmd - the command (string)
+" Returns:
+" -
+"-------------------------------------------------------------------------------
+function! s:SendCmd ( cmd )
+ if s:debug_status == ''
+ return s:WarningMsg ( 'debugger not running' )
+ endif
+
+ call term_sendkeys ( s:debug_buf_ctrl, a:cmd."\r" )
+endfunction " ---------- end of function s:SendCmd ----------
+
+"-------------------------------------------------------------------------------
+" s:Breakpoint : Send a break commands {{{2
+"
+" Send a 'break' or 'tbreak' command.
+"
+" Parameters:
+" once - if true, send tbreak, otherwise send break (integer)
+" Returns:
+" -
+"-------------------------------------------------------------------------------
+function! s:Breakpoint ( once )
+
+ let filename = expand ( '%:p' )
+ let fileline = line ( '.' )
+
+ if a:once
+ call s:SendCmd ( 'tbreak '.filename.':'.fileline )
+ else
+ call s:SendCmd ( 'break '.filename.':'.fileline )
+ endif
+endfunction " ---------- end of function s:Breakpoint ----------
+
+"-------------------------------------------------------------------------------
+" s:DisplayVariable : Send a display command. {{{2
+"
+" Send a 'display' command for the variable under the cursor.
+"
+" Parameters:
+" -
+" Returns:
+" -
+"-------------------------------------------------------------------------------
+function! s:DisplayVariable ()
+
+ let buf_line = getline('.')
+ let buf_pos = col('.') - 1
+ let pattern = '$\?\k\+\|${.}\|$.'
+ let cnt = 1
+ let pick = ''
+
+ while 1
+ let m_end = matchend ( buf_line, pattern, 0, cnt ) - 1
+ if m_end < 0
+ let pick = ''
+ break
+ elseif m_end >= buf_pos
+ let m_start = match ( buf_line, pattern, 0, cnt )
+ if m_start <= buf_pos | let pick = buf_line[ m_start : m_end ]
+ else | let pick = '' | endif
+ break
+ endif
+ let cnt += 1
+ endwhile
+
+ if pick == ''
+ return s:ImportantMsg ( 'no variable under the cursor' )
+ endif
+
+ let pick = substitute ( pick, '^[^$]', '$&', '' )
+
+ call s:SendCmd ( 'display '.pick )
+endfunction " ---------- end of function s:DisplayVariable ----------
+
+" }}}2
+"-------------------------------------------------------------------------------
+
+" }}}1
+"-------------------------------------------------------------------------------
+
+" =====================================================================================
+" vim: foldmethod=marker shiftwidth=2 tabstop=2
diff --git a/autoload/mmtoolbox/cmake.vim b/autoload/mmtoolbox/cmake.vim
index d61667c..d986757 100644
--- a/autoload/mmtoolbox/cmake.vim
+++ b/autoload/mmtoolbox/cmake.vim
@@ -43,7 +43,7 @@ endif
if &cp || ( exists('g:CMake_Version') && ! exists('g:CMake_DevelopmentOverwrite') )
finish
endif
-let g:CMake_Version= '0.9.2' " version number of this script; do not change
+let g:CMake_Version= '0.9.3' " version number of this script; do not change
"
"-------------------------------------------------------------------------------
" Auxiliary functions {{{1
@@ -291,7 +291,7 @@ let s:ErrorFormat_MakeAdditions =
"
" policy list {{{2
"
-let s:Policies_Version = '2.8.12'
+let s:Policies_Version = '3.10'
let s:Policies_List = [
\ [ 'CMP0000', 'A minimum required CMake version must be specified.', '2.6.0' ],
\ [ 'CMP0001', 'CMAKE_BACKWARDS_COMPATIBILITY should no longer be used.', '2.6.0' ],
@@ -309,7 +309,7 @@ let s:Policies_List = [
\ [ 'CMP0013', 'Duplicate binary directories are not allowed.', '2.8.0' ],
\ [ 'CMP0014', 'Input directories must have CMakeLists.txt.', '2.8.0' ],
\ [ 'CMP0015', 'link_directories() treats paths relative to the source dir.', '2.8.1' ],
- \ [ 'CMP0016', 'target_link_libraries() reports error if only argument is not a target.', '2.8.3' ],
+ \ [ 'CMP0016', 'target_link_libraries() reports error if its only argument is not a target.', '2.8.3' ],
\ [ 'CMP0017', 'Prefer files from the CMake module directory when including from there.', '2.8.4' ],
\ [ 'CMP0018', 'Ignore CMAKE_SHARED_LIBRARY__FLAGS variable.', '2.8.9' ],
\ [ 'CMP0019', 'Do not re-expand variables in include and link information.', '2.8.11' ],
@@ -317,6 +317,54 @@ let s:Policies_List = [
\ [ 'CMP0021', 'Fatal error on relative paths in INCLUDE_DIRECTORIES target property.', '2.8.12' ],
\ [ 'CMP0022', 'INTERFACE_LINK_LIBRARIES defines the link interface.', '2.8.12' ],
\ [ 'CMP0023', 'Plain and keyword target_link_libraries signatures cannot be mixed.', '2.8.12' ],
+ \ [ 'CMP0024', 'Disallow include export result.', '3.0' ],
+ \ [ 'CMP0025', 'Compiler id for Apple Clang is now AppleClang.', '3.0' ],
+ \ [ 'CMP0026', 'Disallow use of the LOCATION property for build targets.', '3.0' ],
+ \ [ 'CMP0027', 'Conditionally linked imported targets with missing include directories.', '3.0' ],
+ \ [ 'CMP0028', 'Double colon in target name means ALIAS or IMPORTED target.', '3.0' ],
+ \ [ 'CMP0029', 'The subdir_depends() command should not be called.', '3.0.' ],
+ \ [ 'CMP0030', 'The use_mangled_mesa() command should not be called.', '3.0' ],
+ \ [ 'CMP0031', 'The load_command() command should not be called.', '3.0' ],
+ \ [ 'CMP0032', 'The output_required_files() command should not be called.', '3.0' ],
+ \ [ 'CMP0033', 'The export_library_dependencies()command should not be called.', '3.0' ],
+ \ [ 'CMP0034', 'The utility_source() command should not be called.', '3.0' ],
+ \ [ 'CMP0035', 'The variable_requires() command should not be called.', '3.0' ],
+ \ [ 'CMP0036', 'The build_name() command should not be called.', '3.0' ],
+ \ [ 'CMP0037', 'Target names should not be reserved and should match a validity pattern.', '3.0' ],
+ \ [ 'CMP0038', 'Targets may not link directly to themselves.', '3.0' ],
+ \ [ 'CMP0039', 'Utility targets may not have link dependencies.', '3.0' ],
+ \ [ 'CMP0040', 'The target in the TARGET signature of add_custom_command() must exist and must be defined in current directory.', '3.0' ],
+ \ [ 'CMP0041', 'Error on relative include with generator expression.', '3.0' ],
+ \ [ 'CMP0042', 'MACOSX_RPATH is enabled by default.', '3.0' ],
+ \ [ 'CMP0043', 'Ignore COMPILE_DEFINITIONS_ properties', '3.0' ],
+ \ [ 'CMP0044', 'Case sensitive _COMPILER_ID generator expressions', '3.0' ],
+ \ [ 'CMP0045', 'Error on non-existent target in get_target_property.', '3.0' ],
+ \ [ 'CMP0046', 'Error on non-existent dependency in add_dependencies.', '3.0' ],
+ \ [ 'CMP0047', 'Use QCC compiler id for the qcc drivers on QNX.', '3.0' ],
+ \ [ 'CMP0048', 'The project() command manages VERSION variables.', '3.0' ],
+ \ [ 'CMP0049', 'Do not expand variables in target source entries.', '3.0' ],
+ \ [ 'CMP0050', 'Disallow add_custom_command SOURCE signatures.', '3.0' ],
+ \ [ 'CMP0051', 'List TARGET_OBJECTS in SOURCES target property.', '3.1' ],
+ \ [ 'CMP0052', 'Reject source and build dirs in installed INTERFACE_INCLUDE_DIRECTORIES.', '3.1' ],
+ \ [ 'CMP0053', 'Simplify variable reference and escape sequence evaluation.', '3.1' ],
+ \ [ 'CMP0054', 'Only interpret if() arguments as variables or keywords when unquoted.', '3.1' ],
+ \ [ 'CMP0055', 'Strict checking for the break() command.', '3.2' ],
+ \ [ 'CMP0056', 'Honor link flags in try_compile() source-file signature.', '3.2' ],
+ \ [ 'CMP0057', 'Support new if() IN_LIST operator.', '3.3' ],
+ \ [ 'CMP0058', 'Ninja requires custom command byproducts to be explicit.', '3.3' ],
+ \ [ 'CMP0059', 'Do not treat DEFINITIONS as a built-in directory property.', '3.3' ],
+ \ [ 'CMP0060', 'Link libraries by full path even in implicit directories.', '3.3' ],
+ \ [ 'CMP0061', 'CTest does not by default tell make to ignore errors (-i).', '3.3' ],
+ \ [ 'CMP0062', 'Disallow install() of export() result.', '3.3' ],
+ \ [ 'CMP0063', 'Honor visibility properties for all target types.', '3.3' ],
+ \ [ 'CMP0064', 'Recognize TEST as a operator for the if() command.', '3.4' ],
+ \ [ 'CMP0065', 'Do not add flags to export symbols from executables without the ENABLE_EXPORTS target property.', '3.4' ],
+ \ [ 'CMP0066', 'Honor per-config flags in try_compile() source-file signature.', '3.7' ],
+ \ [ 'CMP0067', 'Honor language standard in try_compile() source-file signature.', '3.8' ],
+ \ [ 'CMP0068', 'RPATH settings on macOS do not affect install_name.', '3.9' ],
+ \ [ 'CMP0069', 'INTERPROCEDURAL_OPTIMIZATION is enforced when enabled.', '3.9' ],
+ \ [ 'CMP0070', 'Define file(GENERATE) behavior for relative paths.', '3.10' ],
+ \ [ 'CMP0071', 'Let AUTOMOC and AUTOUIC process GENERATED files.', '3.10' ],
\ [ 'CMP????', 'There might be more policies not mentioned here, since this list is not maintained automatically.', '?.?.?' ],
\ ]
"
@@ -605,9 +653,9 @@ function! s:Run ( args, cmake_only )
"
silent exe 'update' | " write source file if necessary
cclose
- "
- exe 'lchdir '.fnameescape( s:BuildLocation )
- "
+
+ exe 'cd '.fnameescape( s:BuildLocation )
+
if a:cmake_only == 1
"
let g:CMakeDebugStr .= 'CMake only, ' " debug
@@ -636,7 +684,9 @@ function! s:Run ( args, cmake_only )
let &g:errorformat = errorf_saved
"
let g:CMakeDebugStr .= 'success: '.( v:shell_error == 0 ).', ' " debug
- "
+
+ cd -
+
" errors occurred?
if v:shell_error != 0
botright cwindow
@@ -644,7 +694,6 @@ function! s:Run ( args, cmake_only )
redraw " redraw after cclose, before echoing
call s:ImportantMsg ( 'CMake : CMake finished successfully.' )
endif
- "
else
"
let g:CMakeDebugStr .= 'CMake & make, ' " debug
@@ -705,7 +754,9 @@ function! s:Run ( args, cmake_only )
endif
"
let g:CMakeDebugStr .= 'success: '.( v:shell_error == 0 ).', ' " debug
- "
+
+ cd -
+
" errors occurred?
if v:shell_error != 0
botright cwindow
@@ -727,13 +778,10 @@ function! s:Run ( args, cmake_only )
call s:ImportantMsg ( 'CMake : make finished successfully.' )
endif
endif
- "
endif
- "
- lchdir -
- "
+
let g:CMakeDebugStr .= 'done' " debug
- "
+
endfunction " ---------- end of function s:Run ----------
"
"-------------------------------------------------------------------------------
@@ -766,11 +814,41 @@ endfunction " ---------- end of function s:PolicyListText ----------
"-------------------------------------------------------------------------------
" s:OpenBuffer : Open a scratch buffer. {{{1
+"
+" If a buffer called 'buf_name' already exists, jump to that buffer. Otherwise,
+" open a buffer of the given name an set it up as a scratch buffer. It is
+" deleted after the window is closed.
+"
+" Options:
+" - showdir: the directory will be shown in the buffer list (set buf=nowrite)
+"
+" Settings:
+" - buftype=nofile/nowrite (depending on the option 'showdir')
+" - bufhidden=wipe
+" - swapfile=0
+" - tabstop=8
+"
+" Parameters:
+" buf_name - name of the buffer (string)
+" ... - options (string)
+" Returns:
+" opened - true, if a new buffer was opened (integer)
"-------------------------------------------------------------------------------
-function! s:OpenBuffer ( buf_name )
+function! s:OpenBuffer ( buf_name, ... )
- " a buffer like this already existing?
- if bufnr ( a:buf_name ) != -1
+ " options
+ let btype = 'nofile'
+
+ for val in a:000
+ if val == 'showdir'
+ let btype = 'nowrite' " like 'nofile', but the directory is shown in the buffer list
+ else
+ call s:ErrorMsg ( 'CMake : Unknown buffer option: '.val )
+ endif
+ endfor
+
+ " a buffer like this already opened on the current tab page?
+ if bufwinnr ( a:buf_name ) != -1
" yes -> go to the window containing the buffer
exe bufwinnr( a:buf_name ).'wincmd w'
return 0
@@ -781,22 +859,44 @@ function! s:OpenBuffer ( buf_name )
" buffer exists elsewhere?
if bufnr ( a:buf_name ) != -1
- " yes -> settings of the new buffer
+ " yes -> reuse it
silent exe 'edit #'.bufnr( a:buf_name )
return 0
else
" no -> settings of the new buffer
- silent exe 'file '.escape( a:buf_name, ' ' )
- setlocal noswapfile
- setlocal bufhidden=wipe
- setlocal tabstop=8
+ let &l:buftype = btype
+ let &l:bufhidden = 'wipe'
+ let &l:swapfile = 0
+ let &l:tabstop = 8
+ call s:RenameBuffer( a:buf_name )
endif
return 1
endfunction " ---------- end of function s:OpenBuffer ----------
+"-------------------------------------------------------------------------------
+" s:RenameBuffer : Rename a scratch buffer. {{{1
+"
+" Parameters:
+" name - the new name (string)
+" Returns:
+" -
+"-------------------------------------------------------------------------------
+function! s:RenameBuffer ( name )
+
+ silent exe 'keepalt file '.fnameescape( a:name )
+
+endfunction " ---------- end of function s:RenameBuffer ----------
+
"-------------------------------------------------------------------------------
" s:UpdateBuffer : Update a scratch buffer. {{{1
+"
+" Replace the text in the buffer with 'text'.
+"
+" Parameters:
+" text - the text to place in the buffer (string)
+" Returns:
+" -
"-------------------------------------------------------------------------------
function! s:UpdateBuffer ( text )
@@ -956,23 +1056,28 @@ function! s:ShowCache ( args )
return
endif
+ if s:OpenBuffer ( 'CMake - cache', 'showdir' )
+ silent exe 'nmap q :close'
+ endif
+
" get the cache
- exe 'lchdir '.fnameescape( s:BuildLocation )
+ exe 'cd '.fnameescape( s:BuildLocation )
let [ success, text ] = s:TextFromSystem ( shellescape( s:CMake_Executable ).' -N '.args )
+ let location = fnamemodify ( s:BuildLocation, ':p' )
- lchdir -
+ cd -
if success == 0
+ close
+ redraw " redraw after cclose, before echoing
call s:WarningMsg ( 'CMake : Could not obtain the cache.' )
return
endif
- if s:OpenBuffer ( 'CMake - cache' )
- silent exe 'nmap q :close'
- endif
-
+ call s:RenameBuffer ( location.'/CMake - cache' )
call s:UpdateBuffer ( text )
+
endfunction " ---------- end of function s:ShowCache ----------
"-------------------------------------------------------------------------------
diff --git a/autoload/mmtoolbox/doxygen.vim b/autoload/mmtoolbox/doxygen.vim
index 3287c82..d9dffee 100644
--- a/autoload/mmtoolbox/doxygen.vim
+++ b/autoload/mmtoolbox/doxygen.vim
@@ -13,7 +13,7 @@
" Organization:
" Version: see variable g:Doxygen_Version below
" Created: 10.06.2012
-" Revision: 30.06.2014
+" Revision: 17.10.2017
" License: Copyright (c) 2012-2016, Wolfgang Mehner
" This program is free software; you can redistribute it and/or
" modify it under the terms of the GNU General Public License as
@@ -29,7 +29,7 @@
"-------------------------------------------------------------------------------
" Basic checks. {{{1
"-------------------------------------------------------------------------------
-"
+
" need at least 7.0
if v:version < 700
echohl WarningMsg
@@ -37,14 +37,14 @@ if v:version < 700
echohl None
finish
endif
-"
+
" prevent duplicate loading
" need compatible
if &cp || ( exists('g:Doxygen_Version') && ! exists('g:Doxygen_DevelopmentOverwrite') )
finish
endif
-let g:Doxygen_Version= '0.9.2' " version number of this script; do not change
-"
+let g:Doxygen_Version= '0.9.3' " version number of this script; do not change
+
"-------------------------------------------------------------------------------
" Auxiliary functions. {{{1
"-------------------------------------------------------------------------------
@@ -274,9 +274,9 @@ if s:Enabled == 1
command! -bang -nargs=? -complete=file DoxygenLogFile :call mmtoolbox#doxygen#Property(''=='!'?'echo':'set','log-file',)
command! -bang -nargs=? -complete=file DoxygenWarningFile :call mmtoolbox#doxygen#Property(''=='!'?'echo':'set','warning-file',)
command! -nargs=* -complete=file Doxygen :call Run()
- command! -nargs=0 -complete=file DoxygenGenerateConfig :call GenerateConfig()
- command! -nargs=0 -complete=file DoxygenEditConfig :call EditConfig()
- command! -nargs=0 -complete=file DoxygenViewLog :call ViewLog()
+ command! -nargs=0 DoxygenGenerateConfig :call GenerateConfig()
+ command! -nargs=0 DoxygenEditConfig :call EditConfig()
+ command! -nargs=0 DoxygenViewLog :call ViewLog()
command! -nargs=0 DoxygenWarnings :call Warnings()
command! -nargs=0 DoxygenHelp :call Help()
command! -bang -nargs=? DoxygenSettings :call Settings((''=='!')+str2nr())
@@ -509,9 +509,9 @@ function! s:Run ( args )
let cmdlinearg = a:args
endif
" :TODO:27.10.2013 19:28:WM: 'cmdlinearg' is not correctly escaped for use under Windows
- "
- exe 'lchdir '.fnameescape( fnamemodify( s:ConfigFile, ':p:h' ) )
- "
+
+ exe 'cd '.fnameescape( fnamemodify( s:ConfigFile, ':p:h' ) )
+
let warn_log_file_configured = ''
"
if ! filereadable( s:ConfigFile )
@@ -535,12 +535,12 @@ function! s:Run ( args )
" write both the log and the warning file
silent exe ':!'.shellescape( s:Doxygen_Executable ).' '.cmdlinearg.' 1> '.shellescape( s:LogFile ).' 2> '.shellescape( s:WarningFile )
endif
- "
- lchdir -
- "
+
+ cd -
+
" process the warnings
call s:Warnings ()
- "
+
endfunction " ---------- end of function s:Run ----------
"
"-------------------------------------------------------------------------------
@@ -589,18 +589,18 @@ endfunction " ---------- end of function s:EditConfig ----------
" s:ViewLog : Edit the Doxygen configuration file. {{{1
"-------------------------------------------------------------------------------
function! s:ViewLog ()
- "
+
" go to the directory of 's:ConfigFile', so that the standard for 's:LogFile' works
- exe 'lchdir '.fnameescape( fnamemodify( s:ConfigFile, ':p:h' ) )
- "
- if ! filereadable ( s:LogFile )
- return s:ErrorMsg ( 'Doxygen : File not readable: '.s:LogFile )
- endif
- "
+ exe 'cd '.fnameescape( fnamemodify( s:ConfigFile, ':p:h' ) )
+
let logfile = fnamemodify( s:LogFile, ":p" )
- "
- lchdir -
- "
+
+ cd -
+
+ if ! filereadable ( logfile )
+ return s:ErrorMsg ( 'Doxygen : File not readable: '.logfile )
+ endif
+
exe 'sview '.fnameescape( logfile )
endfunction " ---------- end of function s:ViewLog ----------
"
@@ -608,15 +608,19 @@ endfunction " ---------- end of function s:ViewLog ----------
" s:Warnings : Send the warning file through QuickFix. {{{1
"-------------------------------------------------------------------------------
function! s:Warnings ()
- "
+
silent exe 'update' | " write source file if necessary
cclose
- "
+
" go to the directory of 's:ConfigFile', so that the standard for " 's:WarningFile' works
- exe 'lchdir '.fnameescape( fnamemodify( s:ConfigFile, ':p:h' ) )
- "
+ exe 'cd '.fnameescape( fnamemodify( s:ConfigFile, ':p:h' ) )
+
+ let warnfile = fnamemodify( s:WarningFile, ":p" )
+
+ cd -
+
" any errors?
- if getfsize( s:WarningFile ) > 0
+ if getfsize( warnfile ) > 0
"
" save the current settings
let errorf_saved = &l:errorformat
@@ -624,7 +628,7 @@ function! s:Warnings ()
" read the file and process the errors
let &l:errorformat = s:ErrorFormat
"
- exe 'cgetfile '.fnameescape( s:WarningFile )
+ exe 'cgetfile '.fnameescape( warnfile )
"
" restore the old settings
let &l:errorformat = errorf_saved
@@ -634,9 +638,7 @@ function! s:Warnings ()
redraw " redraw after cclose, before echoing
call s:ImportantMsg ( "Doxygen : no warnings/errors" )
endif
- "
- lchdir -
- "
+
endfunction " ---------- end of function s:Warnings ----------
"-------------------------------------------------------------------------------
diff --git a/autoload/mmtoolbox/make.vim b/autoload/mmtoolbox/make.vim
index 09e92dc..200a47b 100644
--- a/autoload/mmtoolbox/make.vim
+++ b/autoload/mmtoolbox/make.vim
@@ -13,7 +13,7 @@
" Organization:
" Version: see variable g:Make_Version below
" Created: 06.05.2013
-" Revision: 07.10.2016
+" Revision: 17.10.2017
" License: Copyright (c) 2013-2015, Wolfgang Mehner
" This program is free software; you can redistribute it and/or
" modify it under the terms of the GNU General Public License as
@@ -367,11 +367,11 @@ function! s:Run ( args )
if s:Makefile == ''
exe 'make '.cmdlinearg
else
- exe 'lchdir '.fnameescape( fnamemodify( s:Makefile, ':p:h' ) )
- "
+ exe 'cd '.fnameescape( fnamemodify( s:Makefile, ':p:h' ) )
+
exe 'make -f '.shellescape( s:Makefile ).' '.cmdlinearg
- "
- lchdir -
+
+ cd -
endif
"
botright cwindow
diff --git a/autoload/mmtoolbox/tools.vim b/autoload/mmtoolbox/tools.vim
index 7d05309..295681f 100644
--- a/autoload/mmtoolbox/tools.vim
+++ b/autoload/mmtoolbox/tools.vim
@@ -11,7 +11,7 @@
" Organization:
" Version: see variable g:Toolbox_Version below
" Created: 29.12.2012
-" Revision: 23.10.2014
+" Revision: 30.09.2017
" License: Copyright (c) 2012-2015, Wolfgang Mehner
" This program is free software; you can redistribute it and/or
" modify it under the terms of the GNU General Public License as
@@ -42,7 +42,7 @@ if &cp || ( exists('g:Toolbox_Version') && g:Toolbox_Version != 'searching' && !
finish
endif
"
-let s:Toolbox_Version= '1.2' " version number of this script; do not change
+let s:Toolbox_Version = '1.3' " version number of this script; do not change
"
"----------------------------------------------------------------------
" --- Find Newest Version --- {{{2
@@ -265,24 +265,27 @@ endfunction " ---------- end of function mmtoolbox#tools#NewToolbox -------
"
" Parameters:
" toolbox - the toolbox (dict)
-" name - the name of the tool (string)
+" name_full - the full name of the tool (string)
+" name - the short name of the tool (string)
" file - the script (string)
" Returns:
" success - tool loaded without errors, but might still be disabled (integer)
"-------------------------------------------------------------------------------
-function! s:LoadTool ( toolbox, name, file )
- "
- let toolbox = a:toolbox
- let name = a:name
- "
+function! s:LoadTool ( toolbox, name_full, name, file )
+
+ let toolbox = a:toolbox
+ let name_full = a:name_full
+ let name = a:name
+
" try to load and initialize
try
"
" get tool information
- let retlist = mmtoolbox#{name}#GetInfo()
+ let retlist = {name_full}#GetInfo()
"
" assemble the entry
let entry = {
+ \ "name_full" : a:name_full,
\ "name" : name,
\ "prettyname" : retlist[0],
\ "version" : retlist[1],
@@ -326,17 +329,19 @@ endfunction " ---------- end of function s:LoadTool ----------
"
" Parameters:
" toolbox - the toolbox (dict)
-" name - the name of the tool (string)
+" name_full - the full name of the tool (string)
+" name - the short name of the tool (string)
" file - the script (string)
" Returns:
" -
"-------------------------------------------------------------------------------
-function! s:RegisterTool ( toolbox, name, file )
+function! s:RegisterTool ( toolbox, name_full, name, file )
"
" assemble the entry
" - also record which tools was loaded later on, to keep creating correct
" menus
let entry = {
+ \ "name_full" : a:name_full,
\ "name" : a:name,
\ "filename" : a:file,
\ "loaded" : 0,
@@ -370,10 +375,16 @@ function! mmtoolbox#tools#Load ( toolbox, directories )
"
" go through all dir/*.vim
for file in split( glob (dir.'/*.vim'), '\n' )
- "
- " the name is the basename of the file
- let name = fnamemodify( file, ':t:r' )
- "
+
+ if file =~ 'autoload[/\\]\(.\{-}\)[/\\]\{1,2}\([^/\\]\+\)\.vim$'
+ let mlist = matchlist( file, 'autoload[/\\]\(.\{-}\)[/\\]\{1,2}\([^/\\]\+\)\.vim$' )
+ let name_full = substitute( mlist[1], '[/\\]', '#', 'g' ).'#'.mlist[2]
+ let name = mlist[2]
+ else
+ " invalid name
+ continue
+ endif
+
" do not process 'tools.vim' (this script)
if name == 'tools'
continue
@@ -386,9 +397,9 @@ function! mmtoolbox#tools#Load ( toolbox, directories )
"
" check whether to use the tool
if s:GetToolConfig ( a:toolbox.plugin, name ) == 'yes'
- call s:LoadTool ( a:toolbox, name, file )
+ call s:LoadTool ( a:toolbox, name_full, name, file )
else
- call s:RegisterTool ( a:toolbox, name, file )
+ call s:RegisterTool ( a:toolbox, name_full, name, file )
endif
"
endfor
@@ -434,7 +445,7 @@ function! s:LoadAdditionalTool ( toolbox_name, name )
"
" load the tool
let toolbox.unused[name].loaded = 1
- let success = s:LoadTool ( toolbox, name, toolbox.unused[name].filename )
+ let success = s:LoadTool ( toolbox, toolbox.unused[name].name_full, name, toolbox.unused[name].filename )
"
" create the menu entry
if success
@@ -463,15 +474,16 @@ function! mmtoolbox#tools#ToolEnabled ( toolbox, name )
if ! has_key ( a:toolbox.tools, a:name )
return 0
endif
- "
+
+ let entry = a:toolbox.tools[ a:name ]
let enabled = 0
- "
+
try
- let enabled = mmtoolbox#{a:name}#Property('get','enabled')
+ let enabled = {entry.name_full}#Property('get','enabled')
catch /.*/
" fail quietly
endtry
- "
+
return enabled
endfunction " ---------- end of function mmtoolbox#tools#ToolEnabled ----------
"
@@ -585,7 +597,7 @@ function! mmtoolbox#tools#AddMaps ( toolbox )
"
try
" try to create the maps
- call mmtoolbox#{entry.name}#AddMaps()
+ call {entry.name_full}#AddMaps()
catch /.*/
" could not load the plugin: ?
call s:ErrorMsg ( "Could not create maps for the tool \"".name."\" (".v:exception.")",
@@ -626,7 +638,7 @@ function! s:CreateToolMenu ( toolbox, name, root, mleader )
"
try
" try to create the menu
- call mmtoolbox#{entry.name}#AddMenu( menu_root, a:mleader )
+ call {entry.name_full}#AddMenu( menu_root, a:mleader )
catch /.*/
" could not load the plugin: ?
call s:ErrorMsg ( "Could not create menus for the tool \"".a:name."\" (".v:exception.")",
diff --git a/autoload/perlsupportprofiling.vim b/autoload/perlsupportprofiling.vim
index d33023d..f88c91e 100644
--- a/autoload/perlsupportprofiling.vim
+++ b/autoload/perlsupportprofiling.vim
@@ -5,11 +5,12 @@
" Description: Plugin perl-support: Profiler support
"
" VIM Version: 7.0+
-" Author: Dr. Fritz Mehner (fgm), mehner.fritz@web.de
+" Author: Fritz Mehner
" Version: 1.0
" Created: 22.02.2009
-" Revision: ---
-" License: Copyright (c) 2009-2014, Dr. Fritz Mehner
+" Revision: 27.09.2017
+" License: Copyright (c) 2009-2016, Fritz Mehner
+" Copyright (c) 2017-2019, Wolfgang Mehner
"===============================================================================
"
" Exit quickly when:
@@ -19,7 +20,7 @@
if exists("g:loaded_perlsupportprofiling") || &compatible
finish
endif
-let g:loaded_perlsupportregex = "v1.0"
+let g:loaded_perlsupportprofiling = "v1.0"
"
let s:MSWIN = has("win16") || has("win32") || has("win64") || has("win95")
let s:UNIX = has("unix") || has("macunix") || has("win32unix")
diff --git a/autoload/perlsupportregex.vim b/autoload/perlsupportregex.vim
index ca7210d..cd72652 100644
--- a/autoload/perlsupportregex.vim
+++ b/autoload/perlsupportregex.vim
@@ -6,10 +6,13 @@
" Regular expression explanation and visualization.
"
" VIM Version: 7.0+
-" Author: Dr. Fritz Mehner (fgm), mehner.fritz@web.de
+" Author: Wolfgang Mehner
+" Fritz Mehner
" Version: 1.0
-" Created: 16.12.2008 18:16:55
-" License: Copyright 2008-2014, Dr. Fritz Mehner
+" Created: 16.12.2008
+" Revision: 27.09.2017
+" License: Copyright (c) 2008-2016, Fritz Mehner
+" Copyright (c) 2017-2019, Wolfgang Mehner
"===============================================================================
"
" Exit quickly when:
@@ -19,7 +22,7 @@
if exists("g:loaded_perlsupportregex") || &compatible
finish
endif
-let g:loaded_perlsupportregex = "v1.0"
+let g:loaded_perlsupportregex = "v1.0.1"
let s:MSWIN = has("win16") || has("win32") || has("win64") || has("win95")
"
@@ -34,6 +37,65 @@ let s:Perl_PerlRegexVisualizeFlag = ''
let s:Perl_PerlRegexPrematch = ''
let s:Perl_PerlRegexMatch = ''
"
+"-------------------------------------------------------------------------------
+" s:UserInput : Input after a highlighted prompt. {{{1
+"
+" Parameters:
+" prompt - the prompt (string)
+" text - the default input (string)
+" compl - completion (string, optional)
+" clist - list, if 'compl' is "customlist" (list, optional)
+" Returns:
+" input - the user input, an empty sting if the user hit (string)
+"-------------------------------------------------------------------------------
+
+function! s:UserInput ( prompt, text, ... )
+
+ echohl Search " highlight prompt
+ call inputsave() " preserve typeahead
+ if a:0 == 0 || a:1 == ''
+ let retval = input( a:prompt, a:text )
+ elseif a:1 == 'customlist'
+ let s:UserInputList = a:2
+ let retval = input( a:prompt, a:text, 'customlist,'.s:SID().'_UserInputEx' )
+ let s:UserInputList = []
+ else
+ let retval = input( a:prompt, a:text, a:1 )
+ endif
+ call inputrestore() " restore typeahead
+ echohl None " reset highlighting
+
+ let retval = substitute( retval, '^\s\+', "", "" ) " remove leading whitespaces
+ let retval = substitute( retval, '\s\+$', "", "" ) " remove trailing whitespaces
+
+ return retval
+
+endfunction " ---------- end of function s:UserInput ----------
+
+"-------------------------------------------------------------------------------
+" s:SID : Return the . {{{2
+"
+" Parameters:
+" -
+" Returns:
+" SID - the SID of the script (string)
+"-------------------------------------------------------------------------------
+function! s:SID ()
+ return matchstr ( expand(''), '\zs\d\+\ze_SID$' )
+endfunction " ---------- end of function s:SID ----------
+
+"-------------------------------------------------------------------------------
+" s:UserInputEx : ex-command for s:UserInput. {{{2
+"-------------------------------------------------------------------------------
+function! s:UserInputEx ( ArgLead, CmdLine, CursorPos )
+ if empty( a:ArgLead )
+ return copy( s:UserInputList )
+ endif
+ return filter( copy( s:UserInputList ), 'v:val =~ ''\V\<'.escape(a:ArgLead,'\').'\w\*''' )
+endfunction " ---------- end of function s:UserInputEx ----------
+" }}}2
+"-------------------------------------------------------------------------------
+
"------------------------------------------------------------------------------
" run the regular expression analyzer YAPE::Regex::Explain {{{1
"------------------------------------------------------------------------------
@@ -177,10 +239,10 @@ function! perlsupportregex#Perl_RegexPickFlag ( mode )
normal gvy
let s:Perl_PerlRegexVisualizeFlag = eval('@"')
else
- let s:Perl_PerlRegexVisualizeFlag = Perl_Input("regex modifier(s) [imsxg] : ", s:Perl_PerlRegexVisualizeFlag , '')
+ let s:Perl_PerlRegexVisualizeFlag = s:UserInput("regex modifier(s) [imsxg] : ", s:Perl_PerlRegexVisualizeFlag , '')
endif
let s:Perl_PerlRegexVisualizeFlag=substitute(s:Perl_PerlRegexVisualizeFlag, '[^imsxg]', '', 'g')
- echomsg "regex modifier(s) : '".s:Perl_PerlRegexVisualizeFlag."'"
+ echomsg " regex modifier(s) : '".s:Perl_PerlRegexVisualizeFlag."'"
endfunction " ---------- end of function perlsupportregex#Perl_RegexPickFlag ----------
"
"------------------------------------------------------------------------------
@@ -655,7 +717,6 @@ endfunction " ---------- end of function perlsupportregex#Perl_RegexMatchSev
"
"-------------------------------------------------------------------------------
" read the substitution characters for \n, \t, ... from the command line
-" used in ftplugin/perl.vim
"-------------------------------------------------------------------------------
function! perlsupportregex#Perl_PerlRegexSubstitutions ( string )
let result = a:string
diff --git a/awk-support/README.md b/awk-support/README.md
index 59af873..cdb56cd 100644
--- a/awk-support/README.md
+++ b/awk-support/README.md
@@ -1,4 +1,4 @@
-README for awk-support.vim (Version 1.4pre) / June 28 2017
+README for awk-support.vim (Version 1.4pre) / April 19 2019
================================================================================
* INSTALLATION
@@ -56,7 +56,12 @@ structure which is needed below the local installation directory `$HOME/.vim/`
This is the minimal content of the file `$HOME/.vimrc`. Create one if there
is none or use the files in `$HOME/.vim/awk-support/rc` as a starting point.
-(1.3) Set at least some personal details. Use the map `\ntw` inside a Awk buffer
+(1.3) Make the plug-in help accessible by typing the following command on the
+ Vim command line:
+
+ :helptags $HOME/.vim/doc/
+
+(1.4) Set at least some personal details. Use the map `\ntw` inside a Awk buffer
or the menu entry:
Awk -> Snippets -> template setup wizard
@@ -75,11 +80,6 @@ structure which is needed below the local installation directory `$HOME/.vim/`
(Read more about the template system in the plug-in documentation.)
-(1.4) Make the plug-in help accessible by typing the following command on the
- Vim command line:
-
- :helptags $HOME/.vim/doc/
-
(1.5) Consider additional settings in the file `$HOME/.vimrc`. The files
`customization.vimrc` and `customization.gvimrc` are replacements or extensions
for your `.vimrc` and `.gvimrc`. You may want to use parts of them. The files
@@ -113,7 +113,12 @@ structure which is needed below the local installation directory
This is the minimal content of the file `$HOME/_vimrc`. Create one if there
is none or use the files in `$HOME/vimfiles/awk-support/rc` as a starting point.
-(2.3) Set at least some personal details. Use the map `\ntw` inside a Awk buffer
+(2.3) Make the plug-in help accessible by typing the following command on the
+ Vim command line:
+
+ :helptags $HOME\vimfiles\doc\
+
+(2.4) Set at least some personal details. Use the map `\ntw` inside a Awk buffer
or the menu entry:
Awk -> Snippets -> template setup wizard
@@ -132,11 +137,6 @@ structure which is needed below the local installation directory
(Read more about the template system in the plug-in documentation.)
-(2.4) Make the plug-in help accessible by typing the following command on the
- Vim command line:
-
- :helptags $HOME\vimfiles\doc\
-
(2.5) Consider additional settings in the file `$HOME/_vimrc`. The files
`customization.vimrc` and `customization.gvimrc` are replacements or extensions
for your `_vimrc` and `_gvimrc`. You may want to use parts of them. The files
@@ -176,14 +176,18 @@ RELEASE NOTES FOR VERSION 1.4pre
----------------------------------------------------------------------
- The templates which are inserted into new files as file skeletons can be
specified in the templates library, via the property:
- Awk::FileSkeleton::Script
-- Add configuration variables 'g:Awk_Ctrl_j' and 'g:Awk_Ctrl_d' to control the
- creation of the CTRL+J and CTRL+D maps.
-- Rename setting 'g:Awk_Awk' into 'g:Awk_Executable'.
- ('g:Awk_Awk' still works for backwards compatibility.)
+ `Awk::FileSkeleton::Script`
+- Use `g:Xterm_Executable`.
+- Use `g:Xterm_Options` instead of `g:Awk_XtermDefaults`. The setting
+ `g:Awk_XtermDefaults` still works for backwards compatibility.
+- Add configuration variables `g:Awk_Ctrl_j` and `g:Awk_Ctrl_d` to control the
+ creation of the `CTRL+J` and `CTRL+D` maps.
+- Rename setting `g:Awk_Awk` into `g:Awk_Executable`.
+ (`g:Awk_Awk` still works for backwards compatibility.)
- New and reworked templates.
- Minor corrections and improvements.
+
RELEASE NOTES FOR OLDER VERSIONS
----------------------------------------------------------------------
-> see file `awk-support/doc/ChangeLog`
diff --git a/awk-support/README.standalone.md b/awk-support/README.standalone.md
index fb54a6c..cf7d039 100644
--- a/awk-support/README.standalone.md
+++ b/awk-support/README.standalone.md
@@ -3,8 +3,9 @@ Preface
This repository is mainly for the use with plug-in managers.
-The development happens here:
-[WolfgangMehner/vim-plugins](https://github.com/WolfgangMehner/vim-plugins)
+Have a look at the [Screenshot Page](https://wolfgangmehner.github.io/vim-plugins/awksupport.html).
+
+The development happens in [WolfgangMehner/vim-plugins](https://github.com/WolfgangMehner/vim-plugins).
--------------------------------------------------------------------------------
diff --git a/awk-support/codesnippets/rule-file-not-found b/awk-support/codesnippets/rule-file-not-found
new file mode 100644
index 0000000..0e9ef51
--- /dev/null
+++ b/awk-support/codesnippets/rule-file-not-found
@@ -0,0 +1,6 @@
+BEGINFILE {
+ if ( ERRNO != "" ) {
+ printf "file not found: %s", FILENAME
+ nextfile
+ }
+} # ----- end BEGINFILE -----
diff --git a/awk-support/doc/awk-hotkeys.tex b/awk-support/doc/awk-hotkeys.tex
index d91cf23..16d6e91 100644
--- a/awk-support/doc/awk-hotkeys.tex
+++ b/awk-support/doc/awk-hotkeys.tex
@@ -78,7 +78,7 @@
\textbf{\textsc{\Huge{Hot keys}}}\\
\vspace{1mm}%
Key mappings for Vim and gVim.\\
-{\tiny \texttt{http://www.vim.org}\hspace{1.5mm}---\hspace{1.5mm}\textbf{Wolfgang Mehner}, \texttt{wolfgang-mehner@web.de}}\\
+{\tiny \texttt{https://www.vim.org}\hspace{1.5mm}---\hspace{1.5mm}\textbf{Wolfgang Mehner}, \texttt{wolfgang-mehner@web.de}}\\
\vspace{1.0mm}
{\normalsize (i)} insert mode, {\normalsize (n)} normal mode, {\normalsize (v)} visual mode\\
\vspace{1.0mm}
diff --git a/awk-support/rc/customization.gvimrc b/awk-support/rc/customization.gvimrc
index 5ec7dbd..73ff4d7 100644
--- a/awk-support/rc/customization.gvimrc
+++ b/awk-support/rc/customization.gvimrc
@@ -1,14 +1,21 @@
-"===================================================================================
-" FILE: .gvimrc
-" DESCRIPTION: suggestion for a personal configuration file ~/.gvimrc
-" AUTHOR: Dr.-Ing. Fritz Mehner
-" VERSION: 1.0
-" CREATED: 19.12.2012
-"===================================================================================
+"===============================================================================
"
-"===================================================================================
+" File: customization.gvimrc
+"
+" Description: suggestion for a personal configuration file ~/.vimrc
+"
+" VIM Version: 7.0+
+" Author: Wolfgang Mehner, wolfgang-mehner@web.de
+" Dr. Fritz Mehner (fgm), mehner.fritz@web.de
+" Revision: 16.04.2019
+" License: Copyright (c) 2009-2018, Dr. Fritz Mehner
+" Copyright (c) 2019, Wolfgang Mehner
+"===============================================================================
+
+"===============================================================================
" GENERAL SETTINGS
-"===================================================================================
+"===============================================================================
+
set cmdheight=2 " Make command line two lines high
set mousehide " Hide the mouse when typing text
@@ -18,39 +25,38 @@ highlight lCursor guibg=Cyan guifg=NONE
highlight NonText guibg=grey80
highlight Constant gui=NONE guibg=grey95
highlight Special gui=NONE guibg=grey95
-"
+
let c_comment_strings=1 " highlight strings inside C comments
-"
+
"-------------------------------------------------------------------------------
" Moving cursor to other windows
-"
-" shift down : change window focus to lower one (cyclic)
-" shift up : change window focus to upper one (cyclic)
-" shift left : change window focus to one on left
-" shift right : change window focus to one on right
+"
+" shift-down : change window focus to lower one (cyclic)
+" shift-up : change window focus to upper one (cyclic)
+" shift-left : change window focus to one on left
+" shift-right : change window focus to one on right
"-------------------------------------------------------------------------------
nnoremap w
nnoremap W
nnoremap h
nnoremap l
-"
-"-------------------------------------------------------------------------------
-" some additional hot keys
+
"-------------------------------------------------------------------------------
-" S-F3 - call gvim file browser
+" Some additional hot keys
+"
+" shift-F3 : call gvim file browser
"-------------------------------------------------------------------------------
noremap :silent browse confirm e
inoremap :silent browse confirm e
-"
+
"-------------------------------------------------------------------------------
-" toggle insert mode <--> 'normal mode with the -key
+" toggle insert mode <--> normal mode with the -key
"-------------------------------------------------------------------------------
-"
-nnoremap
-inoremap
-"
+
+nnoremap
+inoremap
+
"-------------------------------------------------------------------------------
-" use font with clearly distinguishable brackets : ()[]{}
+" use font with clearly distinguishable brackets: ()[]{}
"-------------------------------------------------------------------------------
"set guifont=Luxi\ Mono\ 14
-"
diff --git a/awk-support/rc/customization.vimrc b/awk-support/rc/customization.vimrc
index d18c5a8..ff9f55b 100644
--- a/awk-support/rc/customization.vimrc
+++ b/awk-support/rc/customization.vimrc
@@ -1,51 +1,59 @@
-"===================================================================================
-" FILE: .vimrc
-" DESCRIPTION: suggestion for a personal configuration file ~/.vimrc
-" AUTHOR: Dr.-Ing. Fritz Mehner
-" CREATED: 19.12.2012
-"===================================================================================
+"===============================================================================
"
-"===================================================================================
+" File: customization.vimrc
+"
+" Description: suggestion for a personal configuration file ~/.vimrc
+"
+" VIM Version: 7.0+
+" Author: Wolfgang Mehner, wolfgang-mehner@web.de
+" Dr. Fritz Mehner (fgm), mehner.fritz@web.de
+" Revision: 15.04.2019
+" License: Copyright (c) 2009-2018, Dr. Fritz Mehner
+" Copyright (c) 2019, Wolfgang Mehner
+"===============================================================================
+
+"===============================================================================
" GENERAL SETTINGS
-"===================================================================================
+"===============================================================================
"-------------------------------------------------------------------------------
" Use Vim settings, rather then Vi settings.
" This must be first, because it changes other options as a side effect.
"-------------------------------------------------------------------------------
set nocompatible
-"
+
"-------------------------------------------------------------------------------
" Enable file type detection. Use the default filetype settings.
" Also load indent files, to automatically do language-dependent indenting.
"-------------------------------------------------------------------------------
filetype plugin on
filetype indent on
-"
+
"-------------------------------------------------------------------------------
" Switch syntax highlighting on.
"-------------------------------------------------------------------------------
-syntax on
-"
+syntax on
+
+"-------------------------------------------------------------------------------
" Platform specific items:
" - central backup directory (has to be created)
" - default dictionary
-" Uncomment your choice.
-if has("win16") || has("win32") || has("win64") ||
+" Uncomment your choice.
+"
+" Using a backupdir under UNIX/Linux: you may want to include a line similar to:
+" find $HOME/.vim.backupdir -name "*" -type f -mtime +60 -exec rm -f {} \;
+" in one of your shell startup files (e.g. $HOME/.profile).
+"-------------------------------------------------------------------------------
+if has("win16") || has("win32") || has("win64") ||
\ has("win95") || has("win32unix")
- "
-" runtime mswin.vim
-" set backupdir =$VIM\vimfiles\backupdir
-" set dictionary=$VIM\vimfiles\wordlists/german.list
+" runtime mswin.vim
+" set backupdir =$VIM\vimfiles\backupdir
+" set dictionary=$VIM\vimfiles\wordlists/german.list
else
-" set backupdir =$HOME/.vim.backupdir
-" set dictionary=$HOME/.vim/wordlists/german.list
+" set backupdir =$HOME/.vim.backupdir
+" set dictionary=$HOME/.vim/wordlists/german.list,$HOME/.vim/wordlists/english.list
endif
-"
-" Using a backupdir under UNIX/Linux: you may want to include a line similar to
-" find $HOME/.vim.backupdir -name "*" -type f -mtime +60 -exec rm -f {} \;
-" in one of your shell startup files (e.g. $HOME/.profile)
-"
+
"-------------------------------------------------------------------------------
" Various settings
"-------------------------------------------------------------------------------
@@ -56,12 +64,12 @@ set backspace=indent,eol,start " backspacing over everything in insert mode
set backup " keep a backup file
set browsedir=current " which directory to use for the file browser
set complete+=k " scan the files given with the 'dictionary' option
+set formatoptions+=j " remove comment leader when joining lines
set history=50 " keep 50 lines of command line history
set hlsearch " highlight the last used search pattern
set incsearch " do incremental searching
set listchars=tab:>.,eol:\$ " strings to use in 'list' mode
set mouse=a " enable the use of the mouse
-set nowrap " do not wrap lines
set popt=left:8pc,right:3pc " print options
set ruler " show the cursor position all the time
set shiftwidth=2 " number of spaces to use for each step of indent
@@ -71,145 +79,149 @@ set tabstop=2 " number of spaces that a counts for
set visualbell " visual bell instead of beeping
set wildignore=*.bak,*.o,*.e,*~ " wildmenu: ignore these extensions
set wildmenu " command-line completion in an enhanced mode
-"
-"===================================================================================
+set nowrap " do not wrap lines
+
+"-------------------------------------------------------------------------------
+" Highlight paired brackets
+"-------------------------------------------------------------------------------
+"highlight MatchParen ctermbg=blue guibg=lightyellow
+
+"===============================================================================
" BUFFERS, WINDOWS
-"===================================================================================
-"
+"===============================================================================
+
"-------------------------------------------------------------------------------
-" The current directory is the directory of the file in the current window.
+" When editing a file, always jump to the last known cursor position.
+" Don't do it when the position is invalid or when inside an event handler
+" (happens when dropping a file on gvim).
"-------------------------------------------------------------------------------
if has("autocmd")
- autocmd BufEnter * :lchdir %:p:h
+ augroup MyResetCursor
+ autocmd BufReadPost *
+ \ if line("'\"") > 0 && line("'\"") <= line("$") |
+ \ exe "normal! g`\"" |
+ \ endif
+ augroup END
endif
-"
+
"-------------------------------------------------------------------------------
-" close window (conflicts with the KDE setting for calling the process manager)
+" Change the working directory to the directory containing the current file
"-------------------------------------------------------------------------------
- noremap :close
-inoremap :close
-"
+if has("autocmd")
+ augroup MySetLocalDir
+ autocmd BufEnter * :lchdir %:p:h
+ augroup END
+endif
+
"-------------------------------------------------------------------------------
" Fast switching between buffers
" The current buffer will be saved before switching to the next one.
" Choose :bprevious or :bnext
"-------------------------------------------------------------------------------
- noremap :if &modifiable && !&readonly &&
- \ &modified :write :endif:bprevious
-inoremap :if &modifiable && !&readonly &&
- \ &modified :write :endif:bprevious
-"
+"nnoremap :if !&readonly && &modifiable && &modified
+" \ :write :endif :bprevious
+"inoremap :if !&readonly && &modifiable && &modified
+" \ :write :endif :bprevious
+
"-------------------------------------------------------------------------------
-" Leave the editor with Ctrl-q (KDE): Write all changed buffers and exit Vim
+" Leave the editor with Ctrl-q: Write all changed buffers and exit Vim
"-------------------------------------------------------------------------------
nnoremap :wqall
-"
-"-------------------------------------------------------------------------------
-" When editing a file, always jump to the last known cursor position.
-" Don't do it when the position is invalid or when inside an event handler
-" (happens when dropping a file on gvim).
+
"-------------------------------------------------------------------------------
-if has("autocmd")
- autocmd BufReadPost *
- \ if line("'\"") > 0 && line("'\"") <= line("$") |
- \ exe "normal! g`\"" |
- \ endif
-endif " has("autocmd")
+" Some additional hot keys
"
-"-------------------------------------------------------------------------------
-" some additional hot keys
-"-------------------------------------------------------------------------------
" F2 - write file without confirmation
" F3 - call file explorer Ex
-" F4 - show tag under curser in the preview window (tagfile must exist!)
+" F4 - show tag under cursor in the preview window (tagfile must exist!)
" F5 - open quickfix error window
" F6 - close quickfix error window
" F7 - display previous error
-" F8 - display next error
-"-------------------------------------------------------------------------------
-"
-noremap :write
-noremap :Explore
-nnoremap :exe ":ptag ".expand("")
-noremap :copen
-noremap :cclose
-noremap :cp
-noremap :cn
-"
-inoremap :write
-inoremap :Explore
-inoremap :exe ":ptag ".expand("")
-inoremap :copen
-inoremap :cclose
-inoremap :cp
-inoremap :cn
-"
-"-------------------------------------------------------------------------------
-" Fast switching between buffers
-" The current buffer will be saved before switching to the next one.
-" Choose :bprevious or :bnext
+" F8 - display next error
+" F12 - list buffers and prompt for a buffer name
"-------------------------------------------------------------------------------
-"
- noremap :if &modifiable && !&readonly &&
- \ &modified :write :endif:bprevious
-inoremap :if &modifiable && !&readonly &&
- \ &modified :write :endif:bprevious
-"
-"-------------------------------------------------------------------------------
-" Leave the editor with Ctrl-q : Write all changed buffers and exit Vim
-"-------------------------------------------------------------------------------
-nnoremap :wqa
-"
-"-------------------------------------------------------------------------------
-" comma always followed by a space
-"-------------------------------------------------------------------------------
-inorenoremap , ,
-"
+
+noremap :write
+noremap :Explore
+nnoremap :execute ":ptag ".expand("")
+noremap :copen
+noremap :cclose
+noremap :cprevious
+noremap :cnext