write commit message with vim like TortoiseHg or another GUI style. viewing diffs and logs simultaneously.
commit message | view of diff |
view of commit logs |
for mercurial
$ hgcommit [commit-files...]
for git
$ gitcommit [commit-files...]
all files
$ hgcommit
specified files.
$ hgcommit readme.md
all files.
$ gitcommit -a
specified files.
$ git add readme.md
$ gitcommit
finish to edit.
:x " save commit comment buffer.
:cq " quit another buffers. (diff and logs)
cancel to edit.
:cq! " quit all buffers.
- bash multi-line variable: https://arstechnica.com/civis/viewtopic.php?p=21091503
- bash arguments loop: https://unix.stackexchange.com/questions/314032/how-to-use-arguments-like-1-2-in-a-for-loop
- vim discard the modified state in temporary buffer: https://stackoverflow.com/questions/17705331/exit-temporary-modified-file-without-saving-and-jump-back-to-my-previous-viewing
- vim move window by command: https://stackoverflow.com/questions/8822237/vim-is-there-a-command-to-switch-windows
- vim split by command: https://technotales.wordpress.com/2010/04/29/vim-splits-a-guide-to-doing-exactly-what-you-want/
- vim script, extract environment varible: https://vi.stackexchange.com/questions/7399/extract-the-result-of-a-shell-command-to-a-variable-in-a-vimrc-file
- vim script, if statement with regex: https://stackoverflow.com/questions/12699229/how-to-use-regular-expressions-on-variables-with-text-in-vimscript
- vim script, insert text by command: https://stackoverflow.com/questions/12699229/how-to-use-regular-expressions-on-variables-with-text-in-vimscript
- vim script, list: http://nanasi.jp/articles/code/variable/list.html
- vim script, arguments: https://stackoverflow.com/questions/10357374/is-it-possible-to-access-vims-command-line-arguments-in-vimscript