On 11-Apr-2010 Bram Moolenaar <[email protected]> wrote:
> 
> Lech Lorens wrote:
> 
> > While
> > 10G
> > does add to the jump list,
> > :10
> > does not.
> > 
> > I believe that both the methods of moving from line to line should be
> > consistent with regard to the jump list. This patch removes this
> > inconsistency by making :10 update the jump list.
> > 
> > Additionally, this patch fixes the problem described by Jean Johner in
> > 5e8c1aa3-6f97-4d1e-ab09-c7e79a990...@q15g2000yqj.googlegroups.com (the 
> > current
> > position is not added to the jump list when in insert mode <C-End> is 
> > pressed).
> > An analogical situation takes place when <C-Home> is pressed in insert mode.
> > This has also been taken care of.
> 
> Did you verify that is compatible with vi?  Some of these
> inconsistencies are "traditional".  Sometimes it's useful to offer two
> ways to do the same thing, so that users and scripts can have the option
> of setting the jump or not.

I tried verifying it with vi which I got from http://ex-vi.sourceforge.net/.
Either I am missing something or the original vi does not include a jump
list implementation.
Regarding making it possible not to change the jump list - I think the
difference between 10G and :10 might indeed be desirable. In this case,
however, do you think it would be a good idea to mention the difference
in documentation? I attached a patch with a proposed modification.

-- 
Cheers,
Lech

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

To unsubscribe, reply using "remove me" as the subject.
diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt
index 0b5afe7..fbbb89b 100644
--- a/runtime/doc/motion.txt
+++ b/runtime/doc/motion.txt
@@ -314,7 +314,7 @@ _  <underscore>		[count] - 1 lines downward, on the first non-blank
 							*G*
 G			Goto line [count], default last line, on the first
 			non-blank character |linewise|.  If 'startofline' not
-			set, keep the same column.
+			set, keep the same column. G is a one of |jump-motions|.
 
 							*<C-End>*
 <C-End>			Goto line [count], default last line, on the last
@@ -327,7 +327,8 @@ gg			Goto line [count], default first line, on the first
 
 :[range]		Set the cursor on the last line number in [range].
 			[range] can also be just one line number, e.g., ":1"
-			or ":'m".
+			or ":'m". In contrast with |G| does not modify the
+			|jumplist|.
 							*N%*
 {count}%		Go to {count} percentage in the file, on the first
 			non-blank in the line |linewise|.  To compute the new

Raspunde prin e-mail lui