From cbae273b64205ff592d85310fd75a15d089e880f Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 12 May 2019 16:09:51 +1200 Subject: Switch to two-spacing --- README.md | 2 +- doc/make_target.txt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c870b16..2fdcb29 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ function `make#target#Make()` and buffer-local mapping `(MakeTarget)` to 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/doc/make_target.txt b/doc/make_target.txt index b57b836..8338e34 100644 --- a/doc/make_target.txt +++ b/doc/make_target.txt @@ -8,8 +8,8 @@ function `make#target#Make()` and buffer-local mapping `(MakeTarget)` to REQUIREMENTS *make_target-requirements* -This plugin is only available if 'compatible' is not set. It requires Vim 7.0 -or newer. It won't load at all if you have `g:no_plugin_maps` or +This plugin is only available if 'compatible' is not set. It requires Vim 7.0 +or newer. It won't load at all if you have `g:no_plugin_maps` or `g:no_make_maps` set. MAPPINGS *make_target-mappings* @@ -29,7 +29,7 @@ FUNCTIONS *make_target-functions* *make#target#Make()* The |autoload| function used by |(MakeTarget)| is accessible as -`make#target#Make()` if wanted. It's hardcoded to look for the target under +`make#target#Make()` if wanted. It's hardcoded to look for the target under the cursor. AUTHOR *make_target-author* -- cgit v1.2.3 From fe6b99bd378b00db11975a95c525f19a5645e88a Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 12 May 2019 16:11:32 +1200 Subject: Remove unneeded variable scoping --- after/ftplugin/make/target.vim | 2 +- autoload/make/target.vim | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/after/ftplugin/make/target.vim b/after/ftplugin/make/target.vim index 57c23d2..b3015a7 100644 --- a/after/ftplugin/make/target.vim +++ b/after/ftplugin/make/target.vim @@ -12,7 +12,7 @@ if exists('b:did_ftplugin_make_target') endif " Stop here if the user doesn't want ftplugin mappings -if exists('g:no_plugin_maps') || exists('g:no_make_maps') +if exists('no_plugin_maps') || exists('no_make_maps') finish endif diff --git a/autoload/make/target.vim b/autoload/make/target.vim index 1f16801..87d926a 100644 --- a/autoload/make/target.vim +++ b/autoload/make/target.vim @@ -2,34 +2,34 @@ function! make#target#Make() abort " Declare list of targets to build - let l:targets = [] + let targets = [] " Iterate back through the file starting at the current line looking for the " line with the target - for l:li in reverse(range(1, line('.'))) - let l:line = getline(l:li) + for li in reverse(range(1, line('.'))) + let line = getline(li) " If it matches the target format, we've found our line; split the targets " by space, and break - let l:matchlist = matchlist(l:line, '^\([^:= \t][^:=]*\):') - if len(l:matchlist) - let l:targets = split(l:matchlist[1], '\s\+') + let matchlist = matchlist(line, '^\([^:= \t][^:=]*\):') + if len(matchlist) + let targets = split(matchlist[1], '\s\+') break " If it wasn't the target line and doesn't have leading tabs, we're not in " a recipe block; break with an unset target - elseif strpart(l:line, 0, 1) !=# "\t" + elseif strpart(line, 0, 1) !=# "\t" break endif endfor " If we found targets, :make them; escape them if we can - for l:target in l:targets + for target in targets if exists('*shellescape') - let l:target = shellescape(l:target) + let target = shellescape(target) endif - execute 'make! -C %:p:h '.l:target + execute 'make! -C %:p:h '.target endfor endfunction -- cgit v1.2.3 From af146211bb7d577d7133791f00c4a3dabd12ecf0 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 12 May 2019 16:12:02 +1200 Subject: Bump VERSION --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 26aaba0..f0bb29e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.0 +1.3.0 -- cgit v1.2.3