Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 928 Bytes

README.md

File metadata and controls

34 lines (24 loc) · 928 Bytes

Automatically insert or delete #includes for C++ code in vim.

vim-cpp-auto-include demo

Note

This plugin is intended to be simple and intended to be used on simple C++ files only.

Installation

Copy plugin/cpp_auto_include.vim to ~/.vim/plugin/.

Alternatively, with Vundle, add Bundle 'quark-zju/vim-cpp-auto-include' in ~/.vimrc and run BundleInstall in vim.

Usage

:w

Configuration

Only C++ files in /tmp are processed by default.

Add following line in your .vimrc to make your C++ code in /some/path/ processed when saving:

autocmd BufWritePre /some/path/**.cpp :ruby CppAutoInclude::process

If you want more control, feel free to edit the source :)