sponsor Vim development Vim logo Vim Book Ad

make_target.vim : Make target for Makefile recipe under cursor

 script karma  Rating 6/5, Downloaded by 631  Comments, bugs, improvements  Vim wiki

created by
Tom Ryder
script type
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.

install details
Put autoload/make/target.vim in ~/.vim/autoload/make/target.vim. The ftplugin itself should probably be saved as ~/.vim/after/ftplugin/make/target.vim (per the distribution layout) or ~/.vim/after/ftplugin/make_target.vim (if you prefer), so that it definitely loads *after* the primary make.vim plugin; or, just use your favourite Vim plugin manager.

There is no default key binding; to bind <LocalLeader>m, you could add this to after/ftplugin/make.vim:                                                        

        nmap <buffer> <LocalLeader>m <Plug>(MakeTarget)
        let b:undo_ftplugin .= '|nunmap <buffer> _m'

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-make-target-1.1.0.tar.gz 1.1.0 2018-11-28 7.0 Tom Ryder Correct documentation
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.