NOTE: This is very much a work-in-progress! It was mostly just a way to familiarize myself with Vimscript syntax, but I've
found it somewhat useful for quickly executing code. I am continually updating it as I think of additional features or notice any bugs. For anyone who tries it out, I'd appreciate any comments, suggestions, bug information, etc.
This plugin provides commands for running Python and C++ files from Vim.
Use of this plugin requires...
- Python installed on your machine.
- A C++ compiler installed on your machine (so far, this plugin is only set up for the
g++
compiler, which should come with most Debian-based Linux distros). - The Gnome Terminal Emulator. This can be installed on Debian-based Linux systems using
sudo apt install gnome-terminal
.
If your plugin manager is vim-plug...
- Clone this repository into your
~/.vim
plugin folder.
'git clone https://github.com/pipparichter/vim-autorun.git' - Add the following line to your .vimrc file, before
call plug#end()
and after the vim-plug setup.
Plug 'pipparichter/vim-autorun'
NOTE: Make sure to use single quotes!
- Clone this repository into your .vim plugin folder.
- Clone this repository into your .vim plugin folder.
:Run
This command is basically just a combined version of:RunPython
and:RunCPP
. It recognizes the filetype of the buffer and calls:RunPython
or:RunCPP
accordingly.
* `:RunPython`
Saves the current buffer and executes it as a Python file.
* `:RunCPP`
:MakeCPPProject {project name}
* `:SetCurrentProject {project name}`