diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-11-28 22:40:12 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-11-28 22:40:12 +1300 |
commit | e7d0a3e53b848d6a74bf74125fc9c291626652d6 (patch) | |
tree | c5b3d028212c56a85c51dec2633a2758dde8c795 | |
parent | Merge branch 'hotfix/v1.0.2' (diff) | |
parent | Bump VERSION (diff) | |
download | vim-make-target-1.1.0.tar.gz (sig) vim-make-target-1.1.0.zip |
Merge branch 'release/v1.1.0'v1.1.0
* release/v1.1.0:
Refine key binding example
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | doc/make_target.txt | 20 |
2 files changed, 5 insertions, 17 deletions
@@ -1 +1 @@ -1.0.2 +1.1.0 diff --git a/doc/make_target.txt b/doc/make_target.txt index bc8157e..b57b836 100644 --- a/doc/make_target.txt +++ b/doc/make_target.txt @@ -19,23 +19,11 @@ The |map-local| mapping `<Plug>(MakeTarget)` attempts to identify the target or targets for the recipe under the cursor, and runs `make!` in sequence on each of those targets. -There is no default key binding; you could do this in your `.vimrc` to bind -`_m`, for example: +There is no default key binding; to bind `<LocalLeader>m`, you could add this +to `after/ftplugin/make.vim`: > - autocmd FileType make - \ nmap <buffer> _m <Plug>(MakeTarget) -< -A cleaner and more complete implementation that correctly clears the group on -reload and the mapping on filetype switch might be: -> - let g:maplocalleader = '_' - augroup vimrc_filemap - autocmd! - autocmd FileType * - \ silent! nmapclear <buffer> <LocalLeader>m - autocmd FileType make - \ nmap <buffer> <LocalLeader>m <Plug>(MakeTarget) - augroup END + nmap <buffer> <LocalLeader>m <Plug>(MakeTarget) + let b:undo_ftplugin .= '|nunmap <buffer> _m' < FUNCTIONS *make_target-functions* |