Vim - execute the file I'm editing
Hello,
how can i execute the file, that I'm editing at the moment in vim. I don't mean something like this: :!scriptname I need a command that will save the file, in some buffer or temporary file, then will make it executable and run it. At the end I wish to map it to F1 for example. |
Hi kofucci,
Have a look at macros, basic process is: q then key_to_bind perform actions q maybe something along the lines of: qx :w /tmp/test.sh :! chmod u+x /tmp/test.sh :! /tmp/test.sh :! rm -f /tmp/test.sh q access by using '@x' ( I gave it a test, seems to work ok ) cheers |
All times are GMT -5. The time now is 04:31 AM. |