私はしばしば SVN への保存:w
とコミットをsvn commit -m "Ticket 351"
2 つの操作として行います。それらを単一の操作に結合する方法はありますか:⇑</kbd>Enter when the need arises? I don't want to map a key as I will sometimes have to change the commit message.
ありがとう。
私はしばしば SVN への保存:w
とコミットをsvn commit -m "Ticket 351"
2 つの操作として行います。それらを単一の操作に結合する方法はありますか:⇑</kbd>Enter when the need arises? I don't want to map a key as I will sometimes have to change the commit message.
ありがとう。
|
コマンド セパレータとして使用します( を参照:help :bar
)。
:w|!svn commit -m foo
関数を書くこともできます。たとえば、次のようなものです。
function! Commit(msg)
write
let response = system('svn commit -m "' . a:msg . '"')
echo response
endfunction
じゃあ後で:
:call Commit('ticket 1234')
@JoshLeeは文字通りの答えを出します。しかし、キーバインドが受け入れられないのはなぜですか?
nnoremap <Leader>s :w<bar>!svn commit -m<space>
Enter を押す前にコミットメッセージを書くことができます...