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

Re: jump function

Expand Messages
  • Marcin Szamotulski
    ... That s interesting, but apparently: nm :exe norm! ... Though as I have mentioned earlier there is no problem with ^O. I use vim, but
    Message 1 of 2 , Aug 29, 2013
    • 0 Attachment
      On 20:44 Thu 29 Aug , glts wrote:
      > Hi Marcin,
      > On Thu, Aug 29, 2013 at 8:10 PM, Marcin Szamotulski <mszamot@...> wrote:
      > > Recently I tried to make a user function for jumping through the jump
      > > list (by files), but it happens that there is no good interface for
      > > that. For example CTRL-I could possibly be only with :normal! <c-i> but
      > > this does not work (even in vim -U NONE in the terminal, I have not
      > > tested this in the GUI though) and also using CTRL-V will not work since
      > > CTRL-V_CTRL-I produces a tab (this works with CTRL-O thought).
      > > I present here a very simple patch which introduce a vim function
      > > jump({count}). :call jump(-5) will jump back in the jump list by
      > > 5 positions and :call jump(5) will jump forward five positions.
      > cheers. But for what it's worth, I don't see a big advantage in
      > :call jump(-3)
      > :call jump(1)
      > over
      > :norm! 3^O
      > :norm! 1^I
      > or
      > :exe "norm! 3\<C-O>"
      > :exe "norm! 1\<C-I>"
      > Just one more function to add to the list.

      That's interesting, but apparently:

      nm \<c-i> :exe "norm! \<C-I>"<cr>
      ends with error E471: Argument reuired, exactly the same as:
      :normal! ^I

      Though as I have mentioned earlier there is no problem with ^O. I use
      vim, but this also does not work in gvim (on GNU/Linux). I also tested
      this with vim -U NONE, and it does not work. Having a simple reliable
      solution would be good, that's why I wrote the small patch. Is it
      possible to fix :normal when \<C-I> get expanded to a tab character?
      I don't think so, but I am not a vim-guru ...


      You received this message from the "vim_dev" 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_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+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.