I usually use :!command to run a command real quick from within vim, where I also have access to the current filename and contents.
A classic gem is ":w !diff % -" to see what I've changed since the last save.
A classic gem is ":w !diff % -" to see what I've changed since the last save.
Thanks for the nugget.
# Make Ctrl-z also resume background process
fancy-ctrl-z () {
if [[ $#BUFFER -eq 0 ]]; then
BUFFER="fg"
zle accept-line
else
zleush-input
zle clear-screen
fi
}
zle -N fancy-ctrl-z
bindkey '^Z' fancy-ctrl-z zle flush-input