Every time I edit my python script, I have to type :wand then :!./myscript.py(run the current script).
:w
:!./myscript.py
Is it possible to combine these two teams?
Write this in your .vimrc:
.vimrc
function! SaveAndRun() w !%:p endfunction nmap <F2> :call SaveAndRun()<cr>
and it will execute the current file when you press f2 in normal mode.
Define a function in .vimrc, and then define a command to call it.
function DoMyStuff() :w :!./myscript.py endfunction command W exec DoMyStuff()
Then you can call it with :W.
:W
, , !! . .
!!
:w | !!
Yes, you can use the pipe symbol between the commands:
: w |! ./ myscript.py
Source: https://habr.com/ru/post/1541205/More articles:How to backup and restore (over time) for etcd? - recoveryActiveAdmin custom index page - ruby-on-railsGroup by several columns linq count nested row - c #rails server cannot work - ruby | fooobar.comHow to start a line chart with 0 X-Axis - c #Laravel 4: Getter and Setter Methods - phpRails app does not serve asset in production mode with user assets folder - ruby-on-railshttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1541208/using-gson-how-to-add-variable-name-as-top-level-parameter-for-json-of-a-rest-call&usg=ALkJrhjUmMLSBhh_cUMSzMRZIy3dUrSeRAUnable to drag search button in scrollview - androidIs it possible to set the gradient color for the border-bottom property? - htmlAll Articles