Broken Q key... how can I leave vim without saving?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Broken Q key... how can I leave vim without saving?

Paolo Bolzoni
Dear list,

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?

Cheers,
Paolo

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAO4LoOzFQ-XWB7NfdaMpAfqw%2BTX5FsiKN7VPSTEGj8YUOQXC%3Dw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Broken Q key... how can I leave vim without saving?

tuxic
On 09/02 05:28, Paolo Bolzoni wrote:

> Dear list,
>
> 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?
>
> Cheers,
> Paolo
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAO4LoOzFQ-XWB7NfdaMpAfqw%2BTX5FsiKN7VPSTEGj8YUOQXC%3Dw%40mail.gmail.com.
>


Hi Paolo,

From insert mode try:

<ESC>:exit

HTH!

Cheers!
mcc


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200902084055.u3ip5lo22ocox4d7%40solfire.
Reply | Threaded
Open this post in threaded view
|

Re: Broken Q key... how can I leave vim without saving?

Jürgen Krämer-4
Hi

[hidden email] schrieb am 02.09.2020 um 10:40:
> On 09/02 05: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?
>
> From insert mode try:
>
> <ESC>:exit

this will save changes. One way to quit without saving changes I could
think of is to first reload the buffer and exit then:

  :e! | exit

Regards,
Jürgen

--
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us.     (Calvin)

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/6cfefa26-cb67-effb-9614-45f6ef7cf99d%40googlemail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Broken Q key... how can I leave vim without saving?

meine
In reply to this post by Paolo Bolzoni
On Wed, Sep 02, 2020 at 05:28:25PM +0900, Paolo Bolzoni wrote:
> Dear list,
>
> 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?

ZZ to write the current file if modified and quit

ZQ to quit without checking for changeѕ (like :q!)

Note that those are capitals!

BTW, this tread shows that there are several ways to quit Vim, which
makes it even a bigger laugh when someone is trapped inside ;-)

//meine

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200907063230.GA1065%40trackstand.
Reply | Threaded
Open this post in threaded view
|

Re: Broken Q key... how can I leave vim without saving?

meine
> ZQ to quit without checking for changeѕ (like :q!)

Excuses (XQQ), realzed afterwards that your Q-key was broken, so this is
useless...

//meine

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200907063446.GB1065%40trackstand.
Reply | Threaded
Open this post in threaded view
|

Re: Broken Q key... how can I leave vim without saving?

Jürgen Krämer-4
In reply to this post by Jürgen Krämer-4
Hi,

Jürgen Krämer schrieb am 02.09.2020 um 10:57:

>
> [hidden email] schrieb am 02.09.2020 um 10:40:
>> On 09/02 05: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?
>>
>> From insert mode try:
>>
>> <ESC>:exit
>
> this will save changes. One way to quit without saving changes I could
> think of is to first reload the buffer and exit then:
>
>   :e! | exit

or in a lucky moment, when your Q key works, put something like

  nnoremap <A-F4>   :q<cr>
  nnoremap <A-C-F4> :q!<cr>

in your ~/.vimrc. You can do this for the other keys, too, and even
map <F4> to 4, which (to my surprise) even works for entering a count
in front of a normal mode command, e.g., <F4>dd expands to 4dd.

Regards,
Jürgen

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/38e32a85-6e91-0ecc-56a0-4452b2ddbef1%40googlemail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Broken Q key... how can I leave vim without saving?

Christian Brabandt

On Mo, 07 Sep 2020, 'Jürgen Krämer' via vim_use wrote:

> or in a lucky moment, when your Q key works, put something like
>
>   nnoremap <A-F4>   :q<cr>
>   nnoremap <A-C-F4> :q!<cr>
>
> in your ~/.vimrc. You can do this for the other keys, too, and even
> map <F4> to 4, which (to my surprise) even works for entering a count
> in front of a normal mode command, e.g., <F4>dd expands to 4dd.

Or simply cut and past this into your .vimrc

Best,
Christian
--
Und die Sonne Homers, siehe! Sie lächelt auch uns.
                -- Friedrich Schiller

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200907070026.GA8698%40256bit.org.
Reply | Threaded
Open this post in threaded view
|

Re: Broken Q key... how can I leave vim without saving?

Gary Johnson-4
On 2020-09-07, Christian Brabandt wrote:

> On Mo, 07 Sep 2020, 'Jürgen Krämer' via vim_use wrote:
>
> > or in a lucky moment, when your Q key works, put something like
> >
> >   nnoremap <A-F4>   :q<cr>
> >   nnoremap <A-C-F4> :q!<cr>
> >
> > in your ~/.vimrc. You can do this for the other keys, too, and even
> > map <F4> to 4, which (to my surprise) even works for entering a count
> > in front of a normal mode command, e.g., <F4>dd expands to 4dd.
>
> Or simply cut and past this into your .vimrc

How about this?

    :exe nr2char(113)

or

    :exe nr2char(113).'!'

Regards,
Gary

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200907153533.GA3242%40phoenix.
Reply | Threaded
Open this post in threaded view
|

Re: Broken Q key... how can I leave vim without saving?

Tim Chase
In reply to this post by Paolo Bolzoni
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


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200907130056.00c4a3d2%40bigbox.attlocal.net.
Reply | Threaded
Open this post in threaded view
|

Re: Broken Q key... how can I leave vim without saving?

arocker

Assuming the "w" key still works, there's always the "nuke it from orbit"
option; write the file when you're satisfied, (or do nothing, if you don't
want to save anything, then kill the vim process.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/18f190525d9bceed54e8ac7a7975d07b.squirrel%40webmail.vybenetworks.com.
Reply | Threaded
Open this post in threaded view
|

Re: Broken Q key... how can I leave vim without saving?

Gabriele Fava
In reply to this post by Gary Johnson-4
On 07/09/2020 17.35, Gary Johnson wrote:
> How about this?
>
>      :exe nr2char(113)
>
> or
>
>      :exe nr2char(113).'!'

At that point it's easier to do CTRL-V 113 (for the "q"), or CTRL-V 081
(for the "Q"); under Windows you probably need to use CTRL-Q in place of
CTRL-V (:help i_CTRL-V)

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/fb110da0-af01-5d2d-8627-f6326526b92b%40tiscali.it.
Reply | Threaded
Open this post in threaded view
|

Re: Broken Q key... how can I leave vim without saving?

Paolo Bolzoni
On Wed, Sep 9, 2020 at 1:23 AM Gabriele <[hidden email]> wrote:
> At that point it's easier to do CTRL-V 113 (for the "q"), or CTRL-V 081
> (for the "Q"); under Windows you probably need to use CTRL-Q in place of
> CTRL-V (:help i_CTRL-V)

I never thought of using CTRL-v like that! Clever.
Thanks everyone.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAO4LoOwwSKMMCwR_%2BdUF1Jai3ZAmXvot9qvX2AsFDKpV02ckiw%40mail.gmail.com.