init.vimango
init.vimango copied to clipboard
Integrate running python code
Integrate running python inside of vim:
- run an interpreter split window (preferabely ipython) (easy).
- Run whole project and see output while still in vim. utilize :make and set makeprg ?
- Run parts of the code. maybe with a plugin like atom's hydrogen.
coc's commands :CocCommand python.execInTerminal
and :CocCommand python.execSelectionInTerminal
work just like atom's hydrogen, which is bad - doesnt remove indentation when executing parts of a function, Not focused on the window in which the code is ran after the command starts, runs current file and not main.py.
Create your own ways!
-
open ipython in split with <leader>ti (t stands for type, its different for every language).
-
close any terminal and its sub-processes (including ipython) with Q when in a terminal (not python specific feature, but useful for ipython terminals).
-
run main.py and see output with :make. see output in qf list with :copen. Its pretty bad but exists in case i type it coz im used to cpp.
-
Run main.py and keep output in a split window with <c-f5>. Can also receive input.
-
run current file and keep output in a split window with <f5>. Can also receive input.
There is currently no good way to run parts of the code. I'll need to make my own plugin for this. this might be a good and easy first plugin.