One I use quite often is:
:!<command>
This will run a shell command, show you the result and then go back to vim, is pretty useful when you need to run a shell command without opening another shell window or closing vim
shell command
Ohh yes and using % will insert your open buffer file. :!black % will run python black on your open file
:!black %
Haha yup! I actually made a note to dig into this. This command alone unlock myriads of possibilities.
Going off topic- something I learned these past 3-4 weeks thought I would share!
:!!
:!
:r
:r !ls
Oh yea always forget !!. I also gotta learn the other special characters I think # means something as well.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
One I use quite often is:
This will run a shell command, show you the result and then go back to vim, is pretty useful when you need to run a
shell command
without opening another shell window or closing vimOhh yes and using % will insert your open buffer file.
:!black %
will run python black on your open fileHaha yup! I actually made a note to dig into this. This command alone unlock myriads of possibilities.
Going off topic- something I learned these past 3-4 weeks thought I would share!
:!!
repeat the last:!
command :):r
prints output into vim -:r !ls
for example, prints the output of ls command - I am sure will come in super handy!Oh yea always forget !!.
I also gotta learn the other special characters I think # means something as well.