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

Re: insert newline

Expand Messages
  • Charles E Campbell Jr
    ... Do you really mean command mode (and not normal mode )? If so, ... will put an empty line after the line the cursor is presently on and ... will put an
    Message 1 of 10 , Apr 1, 2008
      bill lam wrote:
      > Hello,
      >
      > This should be a very simple question. How to insert newline in command mode and
      > stay in command mode? O and o doesn't work because it changes to insert mode.
      >
      Do you really mean "command mode" (and not "normal mode")? If so,

      :put =''

      will put an empty line after the line the cursor is presently on and

      :put! =''

      will put an empty line before the line the cursor is presently on.
      Note: the characters following the "=" are *TWO* single quotes, '', not
      a double quote.

      However, I suspect you're interested in doing this operation in normal
      mode as you mention using O and o -- which aren't particularly effective
      in command mode by themselves.

      Regards,
      Chip Campbell


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Tony Mechelynck
      ... According to :help Normal , Normal mode is also known as command mode. (Not to be confused with Command-line mode, also called Cmdline mode, which is for
      Message 2 of 10 , Apr 1, 2008
        Charles E Campbell Jr wrote:
        > bill lam wrote:
        >> Hello,
        >>
        >> This should be a very simple question. How to insert newline in command mode and
        >> stay in command mode? O and o doesn't work because it changes to insert mode.
        >>
        > Do you really mean "command mode" (and not "normal mode")? If so,
        >
        > :put =''
        >
        > will put an empty line after the line the cursor is presently on and
        >
        > :put! =''
        >
        > will put an empty line before the line the cursor is presently on.
        > Note: the characters following the "=" are *TWO* single quotes, '', not
        > a double quote.
        >
        > However, I suspect you're interested in doing this operation in normal
        > mode as you mention using O and o -- which aren't particularly effective
        > in command mode by themselves.
        >
        > Regards,
        > Chip Campbell

        According to ":help Normal", Normal mode is also known as command mode.

        (Not to be confused with Command-line mode, also called Cmdline mode,
        which is for entering one ex-command; then you come back to Normal mode.)


        Best regards,
        Tony.
        --
        f y cn rd ths thn y cn hv grt jb n cmptr prgrmmng

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • bill lam
        ... iirc when I first encountered vi some 20 years ago, that was called command mode and the command-line mode might be called colon mode . I m not sure
        Message 3 of 10 , Apr 1, 2008
          >> Do you really mean "command mode" (and not "normal mode")? If so,

          > According to ":help Normal", Normal mode is also known as command mode.

          iirc when I first encountered vi some 20 years ago, that was called "command
          mode" and the command-line mode might be called "colon mode". I'm not sure for
          that. "insert mode" was called "input mode"

          regards,




          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        Your message has been successfully submitted and would be delivered to recipients shortly.