diff options
-rw-r--r-- | doc/make_target.txt | 20 |
1 files changed, 4 insertions, 16 deletions
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* |