06/08/2021 23:47 | Category: vim

Tags: vimscriptsterminal

execute simple scripts from vim

I've been running into a few scenarios where I want to be able to execute the script I'm working on without having to change to another tmux pane.

It looks like this is a solved problem with:

:w !bash
:w | !bash % " this does the same, writing the entire file to the buffer
:w !sh
:w !python
" etc.

Stackoverflow question