aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-05-12 16:21:43 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-05-12 16:21:43 +1200
commit39d0f04926925af1df215c1c149ebd6ca8308acb (patch)
tree6cc702fc6f05b6dedc87dbfcb3281e1b28548c9f
parentMerge branch 'release/v1.0.0' (diff)
parentBump VERSION (diff)
downloadvim-perl-version-bump-39d0f04926925af1df215c1c149ebd6ca8308acb.tar.gz
vim-perl-version-bump-39d0f04926925af1df215c1c149ebd6ca8308acb.zip
Merge branch 'release/v1.1.0'v1.1.0
* release/v1.1.0: Remove unneeded variable scoping Switch to two-spacing
-rw-r--r--README.md2
-rw-r--r--VERSION2
-rw-r--r--after/ftplugin/perl/version_bump.vim2
-rw-r--r--autoload/perl/version/bump.vim32
-rw-r--r--doc/perl_version_bump.txt2
5 files changed, 20 insertions, 20 deletions
diff --git a/README.md b/README.md
index ed8c465..7f5f659 100644
--- a/README.md
+++ b/README.md
@@ -23,7 +23,7 @@ There is no support for development versions with underscore prefixes like
License
-------
-Copyright (c) [Tom Ryder][1]. Distributed under the same terms as Vim itself.
+Copyright (c) [Tom Ryder][1]. Distributed under the same terms as Vim itself.
See `:help license`.
[1]: https://sanctum.geek.nz/
diff --git a/VERSION b/VERSION
index 3eefcb9..9084fa2 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.0.0
+1.1.0
diff --git a/after/ftplugin/perl/version_bump.vim b/after/ftplugin/perl/version_bump.vim
index 222f72d..7636f83 100644
--- a/after/ftplugin/perl/version_bump.vim
+++ b/after/ftplugin/perl/version_bump.vim
@@ -11,7 +11,7 @@ if exists('b:did_ftplugin_perl_version_bump')
endif
" Stop here if the user doesn't want ftplugin mappings
-if exists('g:no_plugin_maps') || exists('g:no_perl_maps')
+if exists('no_plugin_maps') || exists('no_perl_maps')
finish
endif
diff --git a/autoload/perl/version/bump.vim b/autoload/perl/version/bump.vim
index 6ab59ea..d452a16 100644
--- a/autoload/perl/version/bump.vim
+++ b/autoload/perl/version/bump.vim
@@ -1,6 +1,6 @@
" Version number specifier format
-if exists('g:perl#version#bump#pattern')
- let s:pattern = g:perl#version#bump#pattern
+if exists('perl#version#bump#pattern')
+ let s:pattern = perl#version#bump#pattern
else
let s:pattern = '\m\C^'
\ . '\(our\s\+\$VERSION\s*=\D*\)'
@@ -15,29 +15,29 @@ endfunction
" Version number bumper
function! s:Bump(major) abort
- let l:view = winsaveview()
- let l:li = search(s:pattern)
- if !l:li
+ let view = winsaveview()
+ let li = search(s:pattern)
+ if !li
echomsg 'No version number declaration found'
return
endif
- let l:matches = matchlist(getline(l:li), s:pattern)
- let [l:lvalue, l:major, l:minor, l:rest]
- \ = matchlist(getline(l:li), s:pattern)[1:4]
+ let matches = matchlist(getline(li), s:pattern)
+ let [lvalue, major, minor, rest]
+ \ = matchlist(getline(li), s:pattern)[1:4]
if a:major
- let l:major = s:Format(l:major, l:major + 1)
- let l:minor = s:Format(l:minor, 0)
+ let major = s:Format(major, major + 1)
+ let minor = s:Format(minor, 0)
else
- let l:minor = s:Format(l:minor, l:minor + 1)
+ let minor = s:Format(minor, minor + 1)
endif
- let l:version = l:major.'.'.l:minor
- call setline(l:li, l:lvalue.l:version.l:rest)
+ let version = major.'.'.minor
+ call setline(li, lvalue.version.rest)
if a:major
- echomsg 'Bumped major $VERSION: '.l:version
+ echomsg 'Bumped major $VERSION: '.version
else
- echomsg 'Bumped minor $VERSION: '.l:version
+ echomsg 'Bumped minor $VERSION: '.version
endif
- call winrestview(l:view)
+ call winrestview(view)
endfunction
" Autoloaded interface functions
diff --git a/doc/perl_version_bump.txt b/doc/perl_version_bump.txt
index 4677077..930bc79 100644
--- a/doc/perl_version_bump.txt
+++ b/doc/perl_version_bump.txt
@@ -23,7 +23,7 @@ There is no support for development versions with underscore prefixes like
REQUIREMENTS *perl_version_bump-requirements*
-This plugin is only available if 'compatible' is not set. It requires Vim 7.0
+This plugin is only available if 'compatible' is not set. It requires Vim 7.0
or newer.
MAPPINGS *perl_version_bump-mappings*