I often save :w
and commit to SVN svn commit -m "Ticket 351"
as two operations. Is there a way to combine them into a single operation so that I might just :⇑Enter when the need arises? I don't want to map a key as I will sometimes have to change the commit message.
Thanks.
Use |
as a command separator (see :help :bar
):
:w|!svn commit -m foo
You could also write a function. E.g. something like;
function! Commit(msg)
write
let response = system('svn commit -m "' . a:msg . '"')
echo response
endfunction
Then later:
:call Commit('ticket 1234')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With