Loading ...
Sorry, an error occurred while loading the content.
 

Exiting after pressing Ctrl-X Ctrl-S

Expand Messages
  • TheLonelyStar
    Hi, I come from emacs. When I want to save my file, I am used to press Ctrl-X Ctrl-S When in vim, in insert mode, pressing Ctrl-X goes into a special mode from
    Message 1 of 8 , Jun 4 1:30 AM
      Hi,

      I come from emacs.
      When I want to save my file, I am used to press Ctrl-X Ctrl-S

      When in vim, in insert mode, pressing Ctrl-X goes into a special mode from
      which I can exit using any keystroke.
      But not if I pressed Ctrl-S aftwerwards.
      When I press Ctrl-X Ctrl-S, my vim is stuck and I have no Idea how to get
      out of that mode ...

      Any help?
      Thanks!
      Nathan
      --
      View this message in context: http://www.nabble.com/Exiting-after-pressing-Ctrl-X-Ctrl-S-tp23865824p23865824.html
      Sent from the Vim - General mailing list archive at Nabble.com.


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • pansz
      ... If you use gvim there won t be any problem for Ctrl-S. If you use console vim it does not use Ctrl-S at all, since Ctrl-S are reserved for terminal flow
      Message 2 of 8 , Jun 4 1:46 AM
        TheLonelyStar 写道:
        > I come from emacs.
        > When I want to save my file, I am used to press Ctrl-X Ctrl-S
        >
        > When in vim, in insert mode, pressing Ctrl-X goes into a special mode from
        > which I can exit using any keystroke.
        > But not if I pressed Ctrl-S aftwerwards.
        > When I press Ctrl-X Ctrl-S, my vim is stuck and I have no Idea how to get
        > out of that mode ...
        >

        If you use gvim there won't be any problem for Ctrl-S.

        If you use console vim it does not use Ctrl-S at all, since Ctrl-S are
        reserved for terminal flow control. For compatibility reasons, you
        should not use Ctrl-S as shortcut for any console application.


        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Raúl Núñez de Arenas Coronado
        Saluton TheLonelyStar :) ... You enter completion mode ( :help ins-completion ). You should see ^X mode ( ) in the bottom of your
        Message 3 of 8 , Jun 4 1:48 AM
          Saluton TheLonelyStar :)

          On Thu 4 Jun 2009 10:30 +0200, TheLonelyStar <n...@...> dixit:
          > When in vim, in insert mode, pressing Ctrl-X goes into a special mode from
          > which I can exit using any keystroke.

          You enter "completion mode" (":help ins-completion"). You should see
          "^X mode (<a lot of keys here>)" in the bottom of your screen. For
          exiting that mode you have to press any invalid key in that context. Any
          character should work, because completion commands are all preceded by
          "Ctrl". See the help for details, but as you have discovered, it is not
          a "mode", but a command, so you can keep on typing.

          > But not if I pressed Ctrl-S aftwerwards. When I press Ctrl-X Ctrl-S,
          > my vim is stuck and I have no Idea how to get out of that mode ...

          In that case you are not entering another mode, but you are requesting
          "stop flow control" to the terminal. This is not a Vim thing, it's a
          terminal thing. To resume flow control use "Ctrl-Q".

          I don't know if you are using console or GUI Vim, and I don't know what
          terminal or emulator do you use, or what platform are you using Vim on,
          so the above may be wrong... I was assuming console Vim on UNIX terminal
          or terminal emulator, although some terminal emulators no longer use
          flow control.

          --
          Raúl "DervishD" Núñez de Arenas Coronado
          Linux Registered User 88736 | http://www.dervishd.net
          It's my PC and I'll cry if I want to... RAmen!

          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • TheLonelyStar
          I do not want to use it, I sometimes press it by accident (Ctrl-X Ctrl-S). And it hangs my vim :( ... -- View this message in context:
          Message 4 of 8 , Jun 4 1:50 AM
            I do not want to use it, I sometimes press it by accident (Ctrl-X Ctrl-S).
            And it hangs my vim :(



            pansz wrote:
            >
            >
            > TheLonelyStar 写道:
            >> I come from emacs.
            >> When I want to save my file, I am used to press Ctrl-X Ctrl-S
            >>
            >> When in vim, in insert mode, pressing Ctrl-X goes into a special mode
            >> from
            >> which I can exit using any keystroke.
            >> But not if I pressed Ctrl-S aftwerwards.
            >> When I press Ctrl-X Ctrl-S, my vim is stuck and I have no Idea how to get
            >> out of that mode ...
            >>
            >
            > If you use gvim there won't be any problem for Ctrl-S.
            >
            > If you use console vim it does not use Ctrl-S at all, since Ctrl-S are
            > reserved for terminal flow control. For compatibility reasons, you
            > should not use Ctrl-S as shortcut for any console application.
            >
            >
            > >
            >
            >

            --
            View this message in context: http://www.nabble.com/Exiting-after-pressing-Ctrl-X-Ctrl-S-tp23865824p23866099.html
            Sent from the Vim - General mailing list archive at Nabble.com.


            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_use" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • bill lam
            On Thu, 04 Jun 2009, TheLonelyStar wrote: When I press Ctrl-X Ctrl-S, my vim is stuck and I have no Idea how to get out of that mode ...try ctrl-q--
            Message 5 of 8 , Jun 4 1:51 AM
              On Thu, 04 Jun 2009, TheLonelyStar wrote:
              > When I press Ctrl-X Ctrl-S, my vim is stuck and I have no Idea how to get
              > out of that mode ...

              try ctrl-q

              --
              regards,
              ====================================================
              GPG key 1024D/4434BAB3 2008-08-24
              gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
              唐詩220 溫庭筠 蘇武廟
              蘇武魂銷漢使前 古祠高樹兩茫然 雲邊雁斷胡天月 隴上羊歸塞草煙
              迴日樓臺非甲帳 去時冠劍是丁年 茂陵不見封侯印 空向秋波哭逝川

              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_use" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            • Christian Brabandt
              Hi TheLonelyStar! ... you can disable sending Flow Controll using stty (at least on linux). e.g. stty stop undef regards, Christian -- ...
              Message 6 of 8 , Jun 4 8:58 AM
                Hi TheLonelyStar!

                On Do, 04 Jun 2009, TheLonelyStar wrote:

                >
                >
                > I do not want to use it, I sometimes press it by accident (Ctrl-X Ctrl-S).
                > And it hangs my vim :(
                >

                you can disable sending Flow Controll using stty (at least on linux).

                e.g. stty stop undef

                regards,
                Christian
                --
                :wq!

                --~--~---------~--~----~------------~-------~--~----~
                You received this message from the "vim_use" maillist.
                For more information, visit http://www.vim.org/maillist.php
                -~----------~----~----~----~------~----~------~--~---
              • Matt Wozniski
                ... Instead of undefining stop, it s a little cleaner to do stty -ixon - that way, it s one command to turn off flow control for ^S and ^Q, and one command
                Message 7 of 8 , Jun 4 6:28 PM
                  On Thu, Jun 4, 2009 at 11:58 AM, Christian Brabandt wrote:
                  >
                  > Hi TheLonelyStar!
                  >
                  > On Do, 04 Jun 2009, TheLonelyStar wrote:
                  >
                  >>
                  >>
                  >> I do not want to use it, I sometimes press it by accident (Ctrl-X Ctrl-S).
                  >> And it hangs my vim :(
                  >>
                  >
                  > you can disable sending Flow Controll using stty (at least on linux).
                  >
                  > e.g. stty stop undef

                  Instead of undefining stop, it's a little cleaner to do "stty -ixon" -
                  that way, it's one command to turn off flow control for ^S and ^Q, and
                  one command to re-enable it (if for some reason you should ever want
                  to).

                  ~Matt

                  --~--~---------~--~----~------------~-------~--~----~
                  You received this message from the "vim_use" maillist.
                  For more information, visit http://www.vim.org/maillist.php
                  -~----------~----~----~----~------~----~------~--~---
                • 曲健
                  thanks bill, i fixed it! -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For
                  Message 8 of 8 , Jun 20 11:29 PM
                    thanks bill, i fixed it!

                    --
                    --
                    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 vim_use+unsubscribe@....
                    For more options, visit https://groups.google.com/groups/opt_out.
                  Your message has been successfully submitted and would be delivered to recipients shortly.