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

Move the cursor to the position of the first character of the line above

Expand Messages
  • Javier Mediavilla Vegas
    Hi all, Is there any key stroke that puts the cursor in the column of the first letter of the above line? Something like - or + but the cursor moves in the
    Message 1 of 3 , Jul 15, 2013
    • 0 Attachment
      Hi all,
      Is there any key stroke that puts the cursor in the column of the first letter of the above line?
      Something like - or + but the cursor moves in the line it is.
      I want this to write something aligned fast.

      Example
      <tab><tab><space><space> something interesting
      <keystroke to go below s> write something

      I didn't find anything.

      Regards,
      Javier.

      --
      --
      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.
    • glts
      ... You could use autoindent . Or a mapping that copies the exact indentation whitespace from the line above it (on one line): inoremap :call
      Message 2 of 3 , Jul 15, 2013
      • 0 Attachment
        On Monday, July 15, 2013 7:53:21 PM UTC+2, Javier Mediavilla Vegas wrote:
        > Is there any key stroke that puts the cursor in the column of the first letter of the above line?
        > Something like - or + but the cursor moves in the line it is.
        > I want this to write something aligned fast.
        >
        > Example
        > <tab><tab><space><space> something interesting
        > <keystroke to go below s> write something

        You could use 'autoindent'.

        Or a mapping that copies the exact indentation whitespace from the line
        above it (on one line):

        inoremap <C-S> <Esc>:call setline(".",substitute(getline(line(".")),'^\s*',matchstr(getline(line(".")-1),'^\s*'),''))<CR>I

        Best,
        David

        --
        --
        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.
      • Javier Mediavilla Vegas
        ... Thanks a lot, autoindent is what I was looking for. Regards, Javier -- -- You received this message from the vim_use maillist. Do not top-post! Type your
        Message 3 of 3 , Jul 15, 2013
        • 0 Attachment
          El lunes, 15 de julio de 2013 20:18:48 UTC+2, glts escribió:
          > On Monday, July 15, 2013 7:53:21 PM UTC+2, Javier Mediavilla Vegas wrote:
          > > Is there any key stroke that puts the cursor in the column of the first letter of the above line?
          > > Something like - or + but the cursor moves in the line it is.
          > > I want this to write something aligned fast.
          > >
          > > Example
          > > <tab><tab><space><space> something interesting
          > > <keystroke to go below s> write something
          >
          > You could use 'autoindent'.
          >
          > Or a mapping that copies the exact indentation whitespace from the line
          > above it (on one line):
          >
          > inoremap <C-S> <Esc>:call setline(".",substitute(getline(line(".")),'^\s*',matchstr(getline(line(".")-1),'^\s*'),''))<CR>I
          >
          > Best,
          > David

          Thanks a lot, autoindent is what I was looking for.

          Regards,
          Javier

          --
          --
          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.