You might look into the Easymotion plugin. It makes motions on a window of
text quite a bit quicker once you get the hang of it. I use it quite
regularly.

On Friday, January 11, 2013, Jeroen Budts wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> TL;DR: I often use <count>j and <count>k to jump to other lines (with
> 'relativenumber' enabled).
> Is it possible to add those jumps to the jumplist?
> And/or what are more efficient ways of jumping to lines which are
> visible on the screen?
>
> Thanks, and my excuses for my previous mail which was obviously too
> long :)
> Jeroen
>
> On 01/10/2013 05:39 PM, Jeroen Budts wrote:
> > Hi all,
> >
> > Although I have been using Vim now for over two years now as my
> > main text editor, I often still have the feeling that I'm not very
> > efficient in navigating through a file, more specifically through
> > the part of the file which is on my screen. Most of the time when
> > I can see the line where I want to jump to I will use a count
> > together with the j or k command. I use 'relativenumber', so I can
> > easily see the correct count. However, this still feels a little
> > inefficient, as my eyes first have to find the line I want to jump
> > to, then carefully (without loosing track of the line) look to the
> > left to find the correct number, then my fingers have to enter the
> > correct number and finally I can press j or k. So far the jumplist
> > has also always felt rather confusing to me. Yesterday I finally
> > discovered why: I think of the method how I move to specific lines
> > as being a 'jump', because in fact, the cursor jumps to another
> > line in the file. However, Vim doesn't think of this as being a
> > jump. The reason for this is that a j and a k without a count are
> > obviously not jumps.
> >
> > So now I'm wondering what my options are to navigate efficiently
> > and be able to use the jumplist correctly at the same time? Some
> > ideas: - maybe I should simply use search a lot more? Just typing
> > what I want to find is probably equally fast as looking at
> > linenumbers, and searches are jumps - Make use of H M L to jump
> > 'near' the line I want and then use j / k? that would at least add
> > some positions to the jumplist, but feels very inefficient also. -
> > stop using 'relativenumber' and use a count with the G command.
> > This fixes the jumplist but then I would have to enter longer
> > numbers in most cases and I loose the benefits of relativenumber
> > (for deletions etc). - remap j and k so that they would calculate
> > the correct linenumber and use the G command instead, but only if
> > the count is larger then 5 for example?
> >
> > Wouldn't it be possible to add a configuration option to Vim to
> > make the jumplist recognize 'jumps' with j and k? For example
> > 'minimumjumplines' which can be set to an int. When 0 the
> > behaviour is as it is now; when set to a value greater than 0, it
> > will add a position to the jumplist when using j and k to move the
> > cursor up/down at least that number of lines (when not in operator
> > pending mode)
> >
> > Thanks a lot for any suggestions! Jeroen
> >
>
> - --
> website: http://budts.be/ - twitter: @teranex
> ___________________________________
> Registered Linux User #482240 - GetFirefox.com - ubuntu.com
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.17 (GNU/Linux)
>
> iQIcBAEBCAAGBQJQ79UsAAoJEBrqc/v4ufiMslgP/2vRsSUM6bKc2/v1WpBTjEia
> oYtYfbRReF+oCO0E4FCNGtU/mBLv5V1IAqLNO0DuhLmAW8E0clg4n3aBUK+YQ6Nx
> bvnvoPQ/eTLs8A2ZCtR2IVN+7elZZReF3dvQ/cMy6fDJu/lWnCHDzI1ig7hV6yas
> cNsPqFOBnx2Dx5ym9lpOYIGA5CCD3/rKZg0KMSxjXAYanKk/Gcmiy3vpsiPK+yj4
> DMGvj3nNHkRkmv9vrBvhDIp1+kUopU1eV6jSc/VgmVMq6wPerDp2RtB58+tfyCCU
> xDeaSPCtSey+wcSMBIo2MB7dJYN9q/fOXc09CRpdiu8z+x5LGUWfGzE1wXftJiCw
> m9et+vx2+8Dfkt5hQKTkO7irbVXFQgAfL4EZ4GnAirHxKwX1kQOHOdszLTafRdtt
> ul24JOs7Iy1ioNnH86sPRyhuEugGR4pgn3sGCzp8HyDrnU9IbuacU19zYe0utL6i
> 1wtk9UHTD62KAw9xfb/5hVNoqPuYIsDiLWu/ANScNLq/4WRGGvmKILQNKDEsxRuM
> VvJcjCr1MFnYLG9IM3Y2wH0t72CHDvLm9EfkD2ebQi0QnqQj0K7CVy7BaKslTmxv
> U8QoJ+xJoeHwH9rYZ0xrijSWjOT5hpltuQ2FrIiaC5YrSTrL+OeceoWFYN90lbDA
> p0ng4QqlNlbpsYxEDa9X
> =ph3S
> -----END PGP SIGNATURE-----
>
> --
> 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 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

Reply via email to