gogoprog / vim-makefile-manager

Vim plugin that provides commands to switch between different Makefiles.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vim-makefile-manager

Vim plugin that provides commands to switch between different Makefiles.

Demo

Image

Introduction

I made this plugin because of the following reasons:

  • I work with projects containing several Makefiles
  • I do no want to configure Vim for each project
  • I want the quickfix list to be functional after make has been called

vim-makefile-manager offers an efficient way to select a Makefile using fzf. Then this Makefile will be called using a relative path: :Make -C <path/to/selected/makefile>. This way of calling the Makefile ensures the Vim quickfix list will be functional. I always keep the project root directory as the current working directory.

Finally I like to set keyboard shortcuts in my .vimrc to use this plugin: F7 to build and Shift-F7 to select the Makefile.

Requirements

Installation

Vundle

Add the following line to .vimrc

Plugin 'gogoprog/vim-makefile-manager'

Commands

Name Description
:MMInteractiveSelect Select the Makefile using fzf
:MMSelect [file] Select the Makefile
:MMMake Execute :Make for the selected Makefile
:MMSave Save the current state in a local .vimrc file

License

Copyright (c) Gauthier Billot. Distributed under the same terms as Vim itself. See :help license.

About

Vim plugin that provides commands to switch between different Makefiles.


Languages

Language:Vim Script 100.0%