4 ms·
I use Vim for regular development and has mapped <Space> to colon in normal mode, so for me it feels very much like a single action to just tap those three keys
by OskarS 10y ago
I use Vim for regular development and has mapped <Space> to colon in normal mode, so for me it feels very much like a single action to just tap those three keys in quick succession with different fingers on one hand then tapping <Enter> with the other hand. It's like executing a fighting-game combo, the muscle memory makes it feel like a single action even though you're hitting several keys.
But it's arguably true that Vim is the wrong choice as the default commit editor since the majority of users probably will not feel very comfortable in that environment. In hindsight, nano would probably have been the better choice for default.
However, since I'm already a heavy Vim user (and have the vim-fugitive plugin installed), I would never go for anything else.
- zZorgz 10y agoI have invoked '<escape>:wq<return>' many times; it should be in my muscle memory but it's still something I get wrong on occasion. I can definitely see <space> being better than colon (it gets rid of shift!), although I still have beef with escape. I don't want to play the fighting game :). What about canceling commits? Sometimes you want to quit without saving, and other times you want to exit with a failure status (which has little application elsewhere). A "commit" editor should be smart enough to decide which to do under a single action. I acknowledge this isn't intended for those heavily invested in their CLI editor of choice.
- ibizaman 10y agoBtw you can cancel a commit if when issuing :wq the whole file is only composed of either blank lines or lines beginning with #
- zZorgz 10y agoSure, but why would one remember that if they could just do :q! regardless if there's new unsaved content or not. Relatedly, why would one remember to do :q! or :cq depending on if there's pre-existing content if they can just cancel in Komet and have it do the right thing ;)
- OJFord 10y ago> they can just cancel in Komet What is `:q!` if not "just cancel[ling]"? I'll take four keystrokes over <move hand to mouse>, <move mouse to button>, <click button> (and a debatable <move hand back to keyboard>). Even if you count that as 3v4, the keystrokes are quicker than the mouse movements. I get that not everyone wants to deal with vim, and may use a GUI editor for other stuff - but for something as small and specific as git commits, I really don't understand why you'd want to install something new; for what, a button?
- zZorgz 10y ago:q! quits without saving the text file which only aborts a commit if the message is empty, meaning it's not sufficient if the message has pre-existing content when you open it. And you largely misunderstood. Komet has a shortcut for making the commit (command return). The mouse is just a supplemental possibility.... Having a more convenient shortcut is not the only reason I use Komet. [edit]: and to address for "something as small as commits" -- well, I write commits pretty often. So it matters a great deal to me to have an aiding tool, and definitely not for a task I'd consider 'insignificant'
- _Wintermute 10y agoOn xubuntu the default for git is nano, or it was for me at least.