Skip to content

Commit 83bf6bd

Browse files
Improve plug-in configuration and set-up
- Remove filetype detection for *.t, should be handled reasonably by Vim's own detection. - Remove adjustment of syntax for *.pod, this can be done by the user. - Remove the template personalization hint. - Move filetype plug-ins. - Update the suggestions for configuration files ".vimrc" and ".gvimrc". - Improve the documentation. Note: Some configuration for `*.t` and `*.pod` files has been removed. See `perl-support/rc/customization.vimrc` for how to add them to your configuration files. Note: The filetype plug-ins have been moved, and are thus not loaded automatically anymore. Copy them from 'perl-support/rc' to 'ftplugin', or add the commands there to your own filetype plug-ins. taken from WolfgangMehner/vim-plugins, revision WolfgangMehner/vim-plugins@cfb82e7
1 parent 4f18248 commit 83bf6bd

23 files changed

+386
-315
lines changed

README.md

+38-35
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The development happens in [WolfgangMehner/vim-plugins](https://github.com/Wolfg
1010

1111
--------------------------------------------------------------------------------
1212

13-
README for perl-support.vim (Version 5.5pre) / October 02 2017
13+
README for perl-support.vim (Version 5.5pre) / April 21 2019
1414
================================================================================
1515

1616
* INSTALLATION
@@ -71,7 +71,12 @@ structure which is needed below the local installation directory `$HOME/.vim/`
7171
This is the minimal content of the file `$HOME/.vimrc`. Create one if there
7272
is none or use the files in `$HOME/.vim/perl-support/rc` as a starting point.
7373

74-
(1.3) Set at least some personal details. Use the map `\ntw` inside a Perl buffer
74+
(1.3) Make the plug-in help accessible by typing the following command on the
75+
Vim command line:
76+
77+
:helptags $HOME/.vim/doc/
78+
79+
(1.4) Set at least some personal details. Use the map `\ntw` inside a Perl buffer
7580
or the menu entry:
7681

7782
Perl -> Snippets -> template setup wizard
@@ -90,11 +95,6 @@ structure which is needed below the local installation directory `$HOME/.vim/`
9095

9196
(Read more about the template system in the plug-in documentation)
9297

93-
(1.4) Make the plug-in help accessible by typing the following command on the
94-
Vim command line:
95-
96-
:helptags $HOME/.vim/doc/
97-
9898
(1.5) Consider additional settings in the file `$HOME/.vimrc`. The files
9999
`customization.vimrc` and `customization.gvimrc` are replacements or
100100
extensions for your `.vimrc` and `.gvimrc`. You may want to use parts of
@@ -128,7 +128,12 @@ structure which is needed below the local installation directory
128128
This is the minimal content of the file `$HOME/_vimrc`. Create one if there
129129
is none or use the files in `$HOME/vimfiles/perl-support/rc` as a starting point.
130130

131-
(2.3) Set at least some personal details. Use the map `\ntw` inside a Perl buffer
131+
(2.3) Make the plug-in help accessible by typing the following command on the
132+
Vim command line:
133+
134+
:helptags $HOME\vimfiles\doc\
135+
136+
(2.4) Set at least some personal details. Use the map `\ntw` inside a Perl buffer
132137
or the menu entry:
133138

134139
Perl -> Snippets -> template setup wizard
@@ -147,11 +152,6 @@ structure which is needed below the local installation directory
147152

148153
(Read more about the template system in the plug-in documentation)
149154

150-
(2.4) Make the plug-in help accessible by typing the following command on the
151-
Vim command line:
152-
153-
:helptags $HOME\vimfiles\doc\
154-
155155
(2.5) Consider additional settings in the file `$HOME/_vimrc`. The files
156156
`customization.vimrc` and `customization.gvimrc` are replacements or
157157
extensions for your `_vimrc` and `_gvimrc`. You may want to use parts of
@@ -175,17 +175,10 @@ There are a lot of features and options which can be used and influenced:
175175
* removing the root menu
176176
* using additional plug-ins
177177

178-
Look at the Perl Support help with:
178+
Actions differ for different modes. Please read the documentation:
179179

180180
:help perlsupport
181181

182-
+-----------------------------------------------+
183-
| +-------------------------------------------+ |
184-
| | ** PLEASE READ THE DOCUMENTATION ** | |
185-
| | Actions differ for different modes! | |
186-
| +-------------------------------------------+ |
187-
+-----------------------------------------------+
188-
189182
Any problems? See the TROUBLESHOOTING section at the end of the help file
190183
`doc/perlsupport.txt`.
191184

@@ -199,12 +192,21 @@ RELEASE NOTES FOR VERSION 5.5pre
199192
----------------------------------------------------------------------
200193
- The templates which are inserted into new files as file skeletons can be
201194
specified in the templates library, via the properties:
202-
Perl::FileSkeleton::Script, Perl::FileSkeleton::Module,
203-
Perl::FileSkeleton::Test, Perl::FileSkeleton::POD
204-
- Add configuration variable and 'g:Perl_Ctrl_d' to control the creation
205-
of the CTRL+D map.
195+
`Perl::FileSkeleton::Script`, `Perl::FileSkeleton::Module`,
196+
`Perl::FileSkeleton::Test`, `Perl::FileSkeleton::POD`
197+
- Add configuration variable `g:Perl_Ctrl_d` to control the creation
198+
of the `CTRL+D` map.
206199
- Minor changes.
207200

201+
Note: The filetype plug-ins have been moved, and are thus not loaded
202+
automatically anymore. Copy them from `perl-support/rc` to `ftplugin`,
203+
or add the commands there to your own filetype plug-ins.
204+
205+
Note: Some configuration for `*.t` and `*.pod` files has been removed.
206+
See `perl-support/rc/customization.vimrc` for how to add them to your
207+
configuration files.
208+
209+
208210
RELEASE NOTES FOR OLDER VERSIONS
209211
----------------------------------------------------------------------
210212
-> see file `perl-support/doc/ChangeLog`
@@ -259,16 +261,6 @@ ___The following files and extensions are for convenience only.___
259261
___perl-support.vim will work without them.___
260262
___The settings are explained in the files themselves.___
261263

262-
ftplugin/make.vim
263-
Access hotkeys for make(1) in makefiles.
264-
ftplugin/perl.vim
265-
A filetype plugin. Define hotkeys, create a local
266-
dictionary for each Perl file.
267-
ftplugin/pod.vim
268-
A filetype plugin. Define hotkeys for filetype 'pod'.
269-
ftplugin/qf.vim
270-
A filetype plugin used by the profilers.
271-
272264
ftdetect/template.vim
273265
ftplugin/template.vim
274266
syntax/template.vim
@@ -295,6 +287,17 @@ ___The settings are explained in the files themselves.___
295287
The file is commented. Append it to your .vimrc if you
296288
like.
297289

290+
perl-support/rc/make.vim
291+
Access hotkeys for make(1) in makefiles.
292+
perl-support/rc/perl.vim
293+
perl-support/rc/pod.vim
294+
Example filetype plug-ins for Perl and POD:
295+
defines additional maps,
296+
set tabs according to Perl Style Guide
297+
expands keyword characters for better support of tokens,
298+
perl-support/rc/qf.vim
299+
Some maps to help with the profilers' output.
300+
298301
perl-support/rc/*.templates
299302
Sample template files for customization. Used by the
300303
template setup wizard.

autoload/mmtoolbox/make.vim

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
" Organization:
1414
" Version: see variable g:Make_Version below
1515
" Created: 06.05.2013
16-
" Revision: 07.10.2016
16+
" Revision: 17.10.2017
1717
" License: Copyright (c) 2013-2015, Wolfgang Mehner
1818
" This program is free software; you can redistribute it and/or
1919
" modify it under the terms of the GNU General Public License as
@@ -367,11 +367,11 @@ function! s:Run ( args )
367367
if s:Makefile == ''
368368
exe 'make '.cmdlinearg
369369
else
370-
exe 'lchdir '.fnameescape( fnamemodify( s:Makefile, ':p:h' ) )
371-
"
370+
exe 'cd '.fnameescape( fnamemodify( s:Makefile, ':p:h' ) )
371+
372372
exe 'make -f '.shellescape( s:Makefile ).' '.cmdlinearg
373-
"
374-
lchdir -
373+
374+
cd -
375375
endif
376376
"
377377
botright cwindow

autoload/perlsupportprofiling.vim

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
" Created: 22.02.2009
1111
" Revision: 27.09.2017
1212
" License: Copyright (c) 2009-2016, Fritz Mehner
13-
" Copyright (c) 2017-2017, Wolfgang Mehner
13+
" Copyright (c) 2017-2019, Wolfgang Mehner
1414
"===============================================================================
1515
"
1616
" Exit quickly when:
@@ -20,7 +20,7 @@
2020
if exists("g:loaded_perlsupportprofiling") || &compatible
2121
finish
2222
endif
23-
let g:loaded_perlsupportregex = "v1.0"
23+
let g:loaded_perlsupportprofiling = "v1.0"
2424
"
2525
let s:MSWIN = has("win16") || has("win32") || has("win64") || has("win95")
2626
let s:UNIX = has("unix") || has("macunix") || has("win32unix")

autoload/perlsupportregex.vim

+2-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
" Created: 16.12.2008
1313
" Revision: 27.09.2017
1414
" License: Copyright (c) 2008-2016, Fritz Mehner
15-
" Copyright (c) 2017-2017, Wolfgang Mehner
15+
" Copyright (c) 2017-2019, Wolfgang Mehner
1616
"===============================================================================
1717
"
1818
" Exit quickly when:
@@ -22,7 +22,7 @@
2222
if exists("g:loaded_perlsupportregex") || &compatible
2323
finish
2424
endif
25-
let g:loaded_perlsupportregex = "v1.0"
25+
let g:loaded_perlsupportregex = "v1.0.1"
2626

2727
let s:MSWIN = has("win16") || has("win32") || has("win64") || has("win95")
2828
"
@@ -717,7 +717,6 @@ endfunction " ---------- end of function perlsupportregex#Perl_RegexMatchSev
717717
"
718718
"-------------------------------------------------------------------------------
719719
" read the substitution characters for \n, \t, ... from the command line
720-
" used in ftplugin/perl.vim
721720
"-------------------------------------------------------------------------------
722721
function! perlsupportregex#Perl_PerlRegexSubstitutions ( string )
723722
let result = a:string

doc/perlsupport.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*perlsupport.txt* Perl Support Oct 02 2017
1+
*perlsupport.txt* Perl Support Apr 21 2019
22

33
Perl Support *perl-support* *perlsupport*
44

@@ -860,8 +860,8 @@ For convenience consider to use maps like
860860
>
861861
noremap <silent> <F5> :copen<CR>
862862
noremap <silent> <F6> :cclose<CR>
863-
noremap <silent> <F7> :cp<CR>
864-
noremap <silent> <F8> :cn<CR>
863+
noremap <silent> <F7> :cprevious<CR>
864+
noremap <silent> <F8> :cnext<CR>
865865
<
866866
in your .vimrc file to jump to the error locations (F7,F8) and to open and
867867
close the error window (F5,F6). This makes navigation a lot easier (see also
@@ -2432,7 +2432,7 @@ was compiled for your platform. Install it and all is done.
24322432

24332433
COMPILE YOUR OWN VERSION (LINUX/UNIX).
24342434
--------------------------------------
2435-
(1) Download the sources from http://vim.sourceforge.net/ and extract the
2435+
(1) Download the sources from https://www.vim.org/ and extract the
24362436
sources from the archive (for patches see|perlsupport-compile-vim-patches|).
24372437

24382438
(2) Inspect the current version again. The section 'Compilation' shows how

doc/templatesupport.txt

+14-14
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ can exist in parallel. This makes it relatively easy to write a plug-in for
3131
the programming language of your choice.
3232

3333
Here is a list of high profile plug-ins which use the template support:
34-
- Bash-Support (www.vim.org/scripts/script.php?script_id=365)
35-
- C-Support (www.vim.org/scripts/script.php?script_id=213)
36-
- Perl-Support (www.vim.org/scripts/script.php?script_id=556)
34+
- Bash-Support (https://www.vim.org/scripts/script.php?script_id=365)
35+
- C-Support (https://www.vim.org/scripts/script.php?script_id=213)
36+
- Perl-Support (https://www.vim.org/scripts/script.php?script_id=556)
3737

3838
==============================================================================
3939
0. TABLE OF CONTENTS *template-support-contents*
@@ -236,7 +236,7 @@ the library, are case sensitive.
236236

237237
A template library can be organized in several files. The command: >
238238
IncludeFile ( "<path>/<file>" )
239-
loads templates from another file (|template-support-IncludeFile|). The path
239+
loads templates from another file (|template-support-IncludeFile()|). The path
240240
is given relative to the including file. The call: >
241241
IncludeFile ( "<path>/<file>", "abs" )
242242
interprets the path as a absolute path instead.
@@ -295,7 +295,7 @@ found in |template-support-menus|.
295295
------------------------------------------------------------------------------
296296

297297
A personalization of the template library can be achieved by using macros. The
298-
command 'SetMacro' (|template-support-SetMacro|) is used to set replacements
298+
command 'SetMacro' (|template-support-SetMacro()|) is used to set replacements
299299
for various macros (my settings as an example):
300300
>
301301
SetMacro( 'AUTHOR', 'Wolfgang Mehner' )
@@ -326,7 +326,7 @@ Then the template for the file description may look as follows:
326326
== ENDTEMPLATE ==
327327
<
328328
The format of the included dates and times can be set in a similar fashion,
329-
using 'SetFormat' (|template-support-SetFormat|):
329+
using 'SetFormat' (|template-support-SetFormat()|):
330330
>
331331
SetFormat( 'DATE', '%D' )
332332
SetFormat( 'TIME', '%H:%M' )
@@ -478,7 +478,7 @@ Except for using flags, the user has no further influence on the replacements
478478
of these macros, they can not be set via SetMacro().
479479

480480
Dates and timestamps are inserted analogously. Their format can be set via
481-
SetFormat (see |template-support-SetFormat|).
481+
SetFormat (see |template-support-SetFormat()|).
482482

483483
*|TIME|* : the current time
484484
*|DATE|* : the current date
@@ -1154,7 +1154,7 @@ Templates inside nested statements are only associated with the styles
11541154
listed in the innermost "USE STYLES" statement.
11551155

11561156
When files are included inside a "USE STYLES" statement (see
1157-
|template-support-IncludeFile|), the templates inside the file are associated
1157+
|template-support-IncludeFile()|), the templates inside the file are associated
11581158
with the style, as they would if they appeared in the including file itself.
11591159
The rules for nested "USE STYLES" statements also hold across included files.
11601160

@@ -1168,7 +1168,7 @@ directory, such the include mechanism of the C preprocessor or LaTeX's
11681168
support offers so-called file pickers.
11691169

11701170
File pickers are templates which use the command PickFile( <prompt>, <path> )
1171-
(|template-support-PickFile|), which asks the user to interactively select a
1171+
(|template-support-PickFile()|), which asks the user to interactively select a
11721172
file:
11731173
>
11741174
SetPath( 'global_include', '/usr/include/' )
@@ -1187,10 +1187,10 @@ beforehand, such as "global_include". After the user selects a file, several
11871187
macros are created which can be used in the template. *|PICK|* is the path and
11881188
name of the file, relative to the path given as the second argument.
11891189
*|FILENAME|* is only the name of the file. For a list of all macros, see
1190-
|template-support-PickFile|.
1190+
|template-support-PickFile()|.
11911191

11921192
Names for paths are created using the function SetPath( <name>, <path> )
1193-
(see |template-support-SetPath|), which is a lot like SetMacro.
1193+
(see |template-support-SetPath()|), which is a lot like SetMacro.
11941194

11951195
For example, if the user picks "/usr/include/GL/gl.h", the first template
11961196
would result in the line >
@@ -1217,7 +1217,7 @@ directory.
12171217

12181218
The template support automatically creates menus for every template. The user
12191219
has a measure of influence on the result. Some of these options were already
1220-
explained in |templates-support-templ-maps|, this chapter will introduce further
1220+
explained in |template-support-templ-maps|, this chapter will introduce further
12211221
capabilities.
12221222

12231223
The menu entries appear in the order the templates have been read. Including a
@@ -1326,7 +1326,7 @@ flag is 'W', the |WORD| under the cursor is picked up: >
13261326
|Word('W')|
13271327
Otherwise the |word| under the cursor is picked: >
13281328
|Word('')|
1329-
Lastly, the word can be picked using a regular expression (see |regex|): >
1329+
Lastly, the word can be picked using a regular expression (see |regexp|): >
13301330
|Pattern( '[\\@]\w\+' )|
13311331
This call picks a word prefix by "\" or "@", which in a C comment could be a
13321332
Doxygen command.
@@ -3208,7 +3208,7 @@ Fritz Mehner (vim.org user name: mehner):
32083208
Jeremy Cantrell (jmcantrell):
32093209
- the solution for getting the visual area is take from his plug-in
32103210
"opener.vim", which is distributed under the same licence as Vim itself
3211-
( http://www.vim.org/scripts/script.php?script_id=3543 )
3211+
( https://www.vim.org/scripts/script.php?script_id=3543 )
32123212

32133213
Andrew L:
32143214
- suggested to insert a breakpoint into the undo sequence before inserting

doc/toolbox.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ exist in parallel. This makes it easy to integrate a toolbox into your
2020
plug-in.
2121

2222
Here is a list of high profile plug-ins which use the toolbox support:
23-
- C-Support (www.vim.org/scripts/script.php?script_id=213)
24-
- Perl-Support (www.vim.org/scripts/script.php?script_id=556)
23+
- C-Support (https://www.vim.org/scripts/script.php?script_id=213)
24+
- Perl-Support (https://www.vim.org/scripts/script.php?script_id=556)
2525

2626
==============================================================================
2727
0. TABLE OF CONTENTS *toolbox-support-contents*

doc/toolboxmake.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*toolboxmake.txt* Make Tool Oct 07 2016
1+
*toolboxmake.txt* Make Tool Oct 16 2017
22

33
Make Tool *toolbox-make*
44

@@ -178,6 +178,8 @@ A. CHANGE LOG *toolbox-make-change-log*
178178

179179
- Change: If make is not executable, still provide the functionality for
180180
finding targets in a Makefile.
181+
- Change: Do not use :lchdir internally, switch to :cd, which has less
182+
side-effects.
181183

182184
------------------------------------------------------------------------------
183185
RELEASE NOTES FOR VERSION 1.1

0 commit comments

Comments
 (0)