On 2020-09-02 17:28, Paolo Bolzoni wrote:
> It is not a joke, my laptop keyboard is broken and seldom the keys
> Q, 4, Ins, and few others stop working.
> Is there a way to leave vim without saving without using the Q key?
Depends on how desperately you need a "q". You can use
:help :x
which has all the commands in editing.txt that you could need, for
copying into a register and executing. If you need arbitrary letters
:help SOFOTO
gives you a nice rendering of the entire alphabet in both upper- &
lower-case so you can copy/paste from there. Or try
:r !man ascii
to get pretty much every character available. :-)
You can then copy them to build up macros or mappings so you can work
around the mangled key.
That said, I have the same problem (my Z/A/Q/1/Tab column doesn't
work on my daily-driver laptop, so I grabbed an external USB keyboard
for <$10 which pretty much makes it a non-issue for me.
-tim