4 ms·
"<escape> colon w q <return>" is too many 'actions' for me personally (and anything that needs me to reach to escape is really asking for it), and I sometimes e
by zZorgz 10y ago
"<escape> colon w q <return>" is too many 'actions' for me personally (and anything that needs me to reach to escape is really asking for it), and I sometimes even mess that combination up (I used vim before using Komet). I learned about :x recently which is only just slightly better, but not in my muscle memory yet. Then one may need to decide when to use q! or cq to discard..
I also prefer using a native editor and am more productive with spell checking and auto correction, surprisingly.
edit: I'm also not a user that uses the keyboard all the time. After using Komet, I am surprised how often I actually used the mouse to hit commit instead.
- OskarS 10y agoI 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.
- JetSpiegel 10y ago"ZQ" to quit without saving, "ZZ" to save and quit. In normal mode ,if course.
- zZorgz 10y agoNot currently in my muscle memory but this does interest me since I use vim sometimes for other ocassions. I'd prefer if shift wasn't necessary though... so I'm not sure I'll commit to this :). Still, these are worse than Mac shortcuts that Komet uses IMO, and I dislike escape (and control to a lesser extent) :-). Also you sometimes want to quit with an exit failure status on canceling, and why have two different operations for that when your editor is smart enough to have one.
- dkuntz2 10y agoArguably having to use a mouse is too much action, because you have to move away from the keyboard, unless there are undocumented keyboard shortcuts.
- zZorgz 10y agoYes, very arguable :). Komet has keyboard shortcuts. I don't mention them on GitHub because they're shown and I believe natural to figure out after opening the app. I spend a lot of time on my computer not having at least one of my hands on the keyboard. Say I'm about done writing a commit message but I get a message on my phone I want to quickly check. It may be more convenient for me to use the mouse to hit commit later and then do some browsing tasks, or so. The other day I was doing some refactoring work while eating food in my other hand.. Nonetheless I believe having the option to use the mouse is better than not being able to.
- dkuntz2 10y ago`echo "set mouse=a" >> ~/.vimrc` ?