3 ms·
I 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>
by zZorgz 10y ago
I 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'