sponsor Vim development Vim logo Vim Book Ad

cf5-compile.vim : Compile files right from vim.

 script karma  Rating 1/1, Downloaded by 677  Comments, bugs, improvements  Vim wiki

created by
Vahagn Khachatryan
 
script type
utility
 
description
Functions to compile/link and run a single c/cpp/java/..etc
file based programs. It's irreplaceable for small tests or
experiments.

For the most recent version check:
https://github.com/vishap/vim_scripts/blob/master/plugin/cf5-compile.vim
 
install details
" Put this file into vim plugin directory. For linux users should
" be  $HOME/.vim/plugin.
" In your .vimrc file add
"
" map <silent> <C-F5> :call CF5Compile(1)<CR>
" map <silent> <F5> :call CF5Compile(0)<CR>
"
" This will allow Ctrl-F5 to "compile and run" and F5 to only
" "compile" the file. Please, note that "filetype" is used to
" define the compiler/interpreter used.
"
" The value of the following variables are used while compiling
" a file:
" g:argv - command line arguments to pass to program.
" g:pyflags - flags to pass to python interpreter.
" g:cppflags - flags to pass to c++ compiler.
" g:wcppflags - flags to pass to (windows) compiler.
" g:lcppflags - flags to pass to (linux) compiler.
" g:ldflags - flags to pass to linker.
" g:ldlibpath - paths to add to PATH or LD_LIBRARY_PATH.
"
" I personally use this script with let-modeline.vim. The last
" allows to define some of compiler options right in the file. For
" example I have the following header in some of my cpp files:
" /*
" VIM: let g:lcppflags="-std=c++11 -O2 -pthread"
" VIM: let g:wcppflags="/O2 /EHsc /DWIN32"
" VIM: let g:cppflags=g:Iboost.g:Itbb
" VIM: let g:ldflags=g:Lboost.g:Ltbb.g:tbbmalloc.g:tbbmproxy
" VIM: let g:ldlibpath=g:Bboost.g:Btbb
" VIM: let g:argv=""
" */
"
" You might also consider using independence.vim or localvimrc.vim
" in order to configure the plugin for a particular directory.
"
" Enjoy.
 

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
cf5-compile.vim 1.0 2014-12-24 7.0 Vahagn Khachatryan Initial upload
ip used for rating: 216.73.216.158

Questions about Vim should go to the maillist. Help Uganda.     Vim at Github