aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-06-28 10:59:01 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-06-28 10:59:01 +1200
commit186591c1201ffd4f204781a2989e0d7049786d41 (patch)
treecd9173e6be9d539310c53981086be98de7c23dc8 /doc
downloadvim-make-target-186591c1201ffd4f204781a2989e0d7049786d41.tar.gz
vim-make-target-186591c1201ffd4f204781a2989e0d7049786d41.zip
First commitv0.1.0
Diffstat (limited to 'doc')
-rw-r--r--doc/make_target.txt55
1 files changed, 55 insertions, 0 deletions
diff --git a/doc/make_target.txt b/doc/make_target.txt
new file mode 100644
index 0000000..65078ea
--- /dev/null
+++ b/doc/make_target.txt
@@ -0,0 +1,55 @@
+*make_target.txt* For Vim version 7.0 Last change: 2018 June 28
+
+DESCRIPTION *make_target*
+
+This filetype plugin for Makefiles ("make" filetype) provides an autoload
+function `make#target#Make()` and buffer-local mapping `<Plug>MakeTarget` to
+`make!` the target for the recipe under the cursor, if it can be identified.
+
+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
+`g:no_make_maps` set.
+
+MAPPINGS *make_target-mappings*
+
+ *<Plug>MakeTarget*
+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:
+>
+ 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
+<
+FUNCTIONS *make_target-functions*
+
+ *make#target#Make()*
+The |autoload| function used by |<Plug>MakeTarget| is accessible as
+`make#target#Make()` if wanted. It's hardcoded to look for the target under
+the cursor.
+
+AUTHOR *make_target-author*
+
+Written and maintained by Tom Ryder <tom@sanctum.geek.nz>.
+
+LICENSE *make_target-license*
+
+Licensed for distribution under the same terms as Vim itself (see |license|).
+
+ vim:tw=78:ts=8:ft=help:norl: