Re: New feature: cursor at the beginning of tab character in normal mode

2008-10-06 Fir de Conversatie Vladimir A . Pavlov

On Sat, 4 Oct 2008 at 02:37 Richard Hartmann wrote:

 I would suggest adapting the helpfiles to reflect the above, though.

I found the section called VIEWING TABS in the chapter 05.7 of the
standard vim manual. It contains the following:

 :set listchars=tab:-,trail:-

with the explanation what the setting does. However there is no
word concerning cursor position there. That chapter seems to be the
best place to write how to emulate the standard cursor behaviour
in vim. But:
1. it would be difficult for a novice who came from another editor
   to find that place and he/she won't probably find the solution of
   the problem. Are there better places?
2. is the solution in question correct on all platforms/terminals so
   that we are allowed to add such a comment to the help file? It
   works on x86 and x86_64 in xterm and linux terminals but what
   about others?

 Vladimir, I suspect Bram would accept a patch against the help.

Bram, would you?

--
Vladimir

--~--~-~--~~~---~--~~
You received this message from the vim_dev maillist.
For more information, visit http://www.vim.org/maillist.php
-~--~~~~--~~--~--~---



Re: New feature: cursor at the beginning of tab character in normal mode

2008-10-06 Fir de Conversatie Richard Hartmann

2008/10/6 Vladimir A. Pavlov [EMAIL PROTECTED]:

 1. it would be difficult for a novice who came from another editor
   to find that place and he/she won't probably find the solution of
   the problem. Are there better places?

Agreed. But havin it _somewhere_ is better than nowhere.


 2. is the solution in question correct on all platforms/terminals so
   that we are allowed to add such a comment to the help file? It
   works on x86 and x86_64 in xterm and linux terminals but what
   about others?

As this is a UI thing and quite basic, I am willing to bet that it will
work everywhere.


 Bram, would you?

He is on holidays, don't expect a quick answer.
Richard

--~--~-~--~~~---~--~~
You received this message from the vim_dev maillist.
For more information, visit http://www.vim.org/maillist.php
-~--~~~~--~~--~--~---



Re: New feature: cursor at the beginning of tab character in normal mode

2008-10-03 Fir de Conversatie Ian Kelling

 That seems unexpected to me.
 Cheers,
 Craig

Think about this. Changing it would be unexpected to the vast majority
of vim users. I agree with Bram, this is best left alone.

- Ian
--~--~-~--~~~---~--~~
You received this message from the vim_dev maillist.
For more information, visit http://www.vim.org/maillist.php
-~--~~~~--~~--~--~---



Re: New feature: cursor at the beginning of tab character in normal mode

2008-10-02 Fir de Conversatie Bram Moolenaar


Vladimir A. Pavlov wrote:

 A few days ago I wrote the following to [EMAIL PROTECTED]:
 
  I'd like to switch to vim but there is an annoying issue with
  it that I couldn't solve.
  
  When the cursor is at a tab character most editors display
  the cursor at the beginning of the interval the tab character
  occupies as follows (_ is the cursor):
  
  _   if (a  c) ...
  
  Vim does the same in insert or replace mode. But in normal
  mode the cursor is displayed at the end of the tab character:
  
 _if (a  c) ...
  
  Is there a way to make vim show the cursor at the beginning
  of a tab character in normal mode as it does in insert mode?
  
  I tried searching in Google but found nothing unfortunatelly :(
 
 Then I got a reply that said it's impossible without vim code
 modification so I decided to find out how to fix that.
 
 I seem to find the solution (the patch is at the end of this
 email) but it is so simple that I can't understand why it hasn't
 been done yet (since I know several people that are irritated by
 this feature of vim).
 
 I guess this mailing list is the best place to ask whether I
 miss anything. Here are my questions:
 
 1. Are there any obvious problems/bugs with the patch itself?
In other words, does it breaks anything very basic so
that it definitely breaks some basic functionality or
some plugins?

The way it works is intentional.  It's how Vi has always worked.  I have
no intention to change it.

Now we could start a long discussion about yet another option...  Keep
in mind that switching this option on would have the risk of breaking
some plugins and making users wonder why Vim doesn't behave as expected.

 2. If there are no problems with it, do you have any wishes to
apply it to the trunk? (And what the reasons for not doing
so?)

I haven't tried it, but I would suspect there are a few more places to
change.

If so, I would add an option called, say, cursorattabstart
that will trigger the new behaviour and resend the patch
here for anyone of you to commit.

-- 
You cannot have a baby in one month by getting nine women pregnant.

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

--~--~-~--~~~---~--~~
You received this message from the vim_dev maillist.
For more information, visit http://www.vim.org/maillist.php
-~--~~~~--~~--~--~---



Re: New feature: cursor at the beginning of tab character in normal mode

2008-10-02 Fir de Conversatie Ingo Karkat

On 02-Oct-08 20:03, Vladimir A. Pavlov wrote:
 Hello!
 
 A few days ago I wrote the following to [EMAIL PROTECTED]:
 
 I'd like to switch to vim but there is an annoying issue with
 it that I couldn't solve.

 When the cursor is at a tab character most editors display
 the cursor at the beginning of the interval the tab character
 occupies as follows (_ is the cursor):

 _   if (a  c) ...

 Vim does the same in insert or replace mode. But in normal
 mode the cursor is displayed at the end of the tab character:

_if (a  c) ...

 Is there a way to make vim show the cursor at the beginning
 of a tab character in normal mode as it does in insert mode?

 I tried searching in Google but found nothing unfortunatelly :(
 
 Then I got a reply that said it's impossible without vim code
 modification so I decided to find out how to fix that.
 
 I seem to find the solution (the patch is at the end of this
 email) but it is so simple that I can't understand why it hasn't
 been done yet (since I know several people that are irritated by
 this feature of vim).
 
 I guess this mailing list is the best place to ask whether I
 miss anything. Here are my questions:
 
 1. Are there any obvious problems/bugs with the patch itself?
In other words, does it breaks anything very basic so
that it definitely breaks some basic functionality or
some plugins?
 
 2. If there are no problems with it, do you have any wishes to
apply it to the trunk? (And what the reasons for not doing
so?)
 
If so, I would add an option called, say, cursorattabstart
that will trigger the new behaviour and resend the patch
here for anyone of you to commit.
 
 --
 Vladimir

When 'list' is set, the cursor stays at the beginning of a Tab interval, too. 
So you could achieve the same effect with these settings:
 ':set list listchars=tab:\ \ '
Of course, you would lose the functionality of ':set invlist'; but you can 
probably define an alternative command / mapping that now will toggle the 
'listchars' option.

-- regards, ingo

--~--~-~--~~~---~--~~
You received this message from the vim_dev maillist.
For more information, visit http://www.vim.org/maillist.php
-~--~~~~--~~--~--~---



RE: New feature: cursor at the beginning of tab character in normal mode

2008-10-02 Fir de Conversatie Craig Barkhouse

Not to take sides, but just to add my comments...

1) In normal mode, if you have the 'list' option on, the cursor is displayed at 
the beginning of the tab character, not the end.  So now it's not just mode 
that determines it.  If you sit your cursor on a tab character and repeatedly 
toggle the 'list' option (which I actually have a keymapping for), the cursor 
will actually jump back and forth on screen from the beginning of the tab to 
the end.  That seems unexpected to me.

2) As a general question:  If there's a quirk carried forward from original Vi, 
and the general consensus among Vim users is that the quirk is only there for 
strict Vi compatibility and it would make more sense to change it, would it not 
make sense to have it controlled by the 'compatible' option?  Setting 
'nocompatible' already breaks some Vi compliance.  So, yet-another-option would 
not necessarily need to be introduced.

Cheers,
Craig


--~--~-~--~~~---~--~~
You received this message from the vim_dev maillist.
For more information, visit http://www.vim.org/maillist.php
-~--~~~~--~~--~--~---