News for hackers. Stuff that matters.
Re:Vim Modes Transition Diagram by cosmotic on Tuesday May 25, 2021 @12:54AM (#27272706)
I always get trapped in record mode but I don't see that in this diagram. Am I missing something?
Re:Vim Modes Transition Diagram by CGamesPlay on Tuesday May 25, 2021 @01:15AM (#27272832)
Well, it's not a mode. It's recording, but you can freely change between modes while recording and this will be part of the recording. I believe you can even start a recording in one mode and exit it in another, although this has limited use.
Re:Vim Modes Transition Diagram by cosmotic on Tuesday May 25, 2021 @12:32PM (#27278960)
It is most certainly a mode, from a usability standpoint. :q no longer works once in record mode; which fits the definition of modality.
Re:Vim Modes Transition Diagram by hansvm on Tuesday May 25, 2021 @01:24AM (#27272937)
It's the Q character. That usually happens to me when I mistype a semicolon rather than colon when trying to quit.
Re:Vim Modes Transition Diagram by cosmotic on Tuesday May 25, 2021 @12:31PM (#27278948)
Yeah; With basically everything using q to quit, the inconsistency is infuriating. It would be bad enough if it did nothing, but instead of changes modes that you need to explicitly escape before the real quit works.
Re:Vim Modes Transition Diagram by oftenwrong on Tuesday May 25, 2021 @08:14AM (#27275908)
Q enters ex mode

q is used to start a recording

Re:Vim Modes Transition Diagram by hansvm on Tuesday May 25, 2021 @11:26AM (#27278078)
That was imprecision on my part. I should have said "Q key" instead -- the capitalization was to make it stand out.
Re:Vim Modes Transition Diagram by mjbrownie on Tuesday May 25, 2021 @02:18AM (#27273379)
The best way to stop doing it accidentally is to start doing it deliberately, then the muscle memory will catch up.
Re:Vim Modes Transition Diagram by dvcrn on Tuesday May 25, 2021 @01:23AM (#27272927)
q + something else -> starts recording into buffer <something else>

q again -> finish recording

@ <somethinge else> -> replay recording of buffer <something else>

Re:Vim Modes Transition Diagram by schemathings on Tuesday May 25, 2021 @08:11AM (#27275878)
I recently had the happy discovery that q: puts you into the : buffer, which is your command history. You can navigate to a recent comment and just enter to execute. Bonus point for it being the opposite of :q
Re:Vim Modes Transition Diagram by alpaca128 on Tuesday May 25, 2021 @02:26AM (#27273452)
Good summary, but minor addition: `q` is also a valid input. Hitting `qq` starts recording in the `q` buffer, and it stops when the key is pressed a third time in normal mode.
Re:Vim Modes Transition Diagram by acomar on Tuesday May 25, 2021 @01:03AM (#27272754)
q another character begins recording a macro. press q again to finish recording.