Re: Feature or bug? Funny behaviour of cw on whitespace.

2016-02-12 Thread 'Elmar Hinz' via vim_use

> It doesn't say why though, and the reason IIUC is that vi did it that way, 
> and it's such a basic command that millions are used to it.  IMO we'd be 
> better off with consistency, c{motion} is like d{motion} then enter insert 
> mode, without this special case, but after 40 years...
> 
> Regards, John Little

Either fully consistent, as you expect, or fully speaking as "change word". 

The current translation is the mixed case "change to end of word". 

Regards


Elmar

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Feature or bug? Funny behaviour of cw on whitespace.

2016-02-12 Thread John Little
On Friday, February 12, 2016 at 1:53:00 AM UTC+13, Erik Christiansen wrote:
> But ":h cw" opens with a defence of this "Special case: ...change-word". 

It doesn't say why though, and the reason IIUC is that vi did it that way, and 
it's such a basic command that millions are used to it.  IMO we'd be better off 
with consistency, c{motion} is like d{motion} then enter insert mode, without 
this special case, but after 40 years...

Regards, John Little

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Feature or bug? Funny behaviour of cw on whitespace.

2016-02-12 Thread 'Elmar Hinz' via vim_use
> As pointed out once or twice upthread, please read ":h cw", in particular
> the last paragraph. For those who can see, it is there.
> 
> Erik

Shouldn't an editor startup with the most consistent settings by default?

Elmar

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Feature or bug? Funny behaviour of cw on whitespace.

2016-02-12 Thread Erik Christiansen
On 12.02.16 03:02, Elmar Hinz wrote:
> 
> > It doesn't say why though, and the reason IIUC is that vi did it
> > that way, and it's such a basic command that millions are used to
> > it.  IMO we'd be better off with consistency, c{motion} is like
> > d{motion} then enter insert mode, without this special case, but
> > after 40 years...
> > 
> > Regards, John Little
> 
> Either fully consistent, as you expect, or fully speaking as "change
> word". 
> 
> The current translation is the mixed case "change to end of word". 

As pointed out once or twice upthread, please read ":h cw", in particular
the last paragraph. For those who can see, it is there.

Erik

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Feature or bug? Funny behaviour of cw on whitespace.

2016-02-11 Thread Erik Christiansen
On 11.02.16 03:43, 'Elmar Hinz' via vim_use wrote:
> the normal behaviour of the w motion is to move n words forward and to act 
> exclusively.

Yes, the motion is (mostly) to the start of the next/nth word. (exclusive)

> Different from this the normal behaviour of cw is to change to the end
> of the current word, much like ce.

Ah, I don't ever use cw within a word, but ce instead, so haven't
noticed that it fails to eat the space as it should, to be consistent.
But ":h cw" opens with a defence of this "Special case: ...change-word". 

> But what happens when hitting cw on whitespace between words?

The w motion is then perfectly as specified, and as expected.
It is particularly handy when correcting indentation of a few
lines to align with a leading line of arbitrary indentation:

  1) Move to start of leading line, with ^.
  2) j
  3) dw
  4) Loop to 2 until done, using '.' at 3, i.e. j.j.j.j.


Erik

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Feature or bug? Funny behaviour of cw on whitespace.

2016-02-11 Thread 'Elmar Hinz' via vim_use
> The w motion is then perfectly as specified, and as expected.
> It is particularly handy when correcting indentation of a few
> lines to align with a leading line of arbitrary indentation:
> 
>   1) Move to start of leading line, with ^.
>   2) j
>   3) dw
>   4) Loop to 2 until done, using '.' at 3, i.e. j.j.j.j.
> 
> 
> Erik

Hi Erik,

sure the dw motion. My questions here cover the cw motion on whitespace in 
special. Strange stuff.

Sure, that is something you likely never hit upon, unless you try to clone that 
behaviour and ask yourself should I really do that or should it be improved in 
Vim itself.


Kind regards,

Elmar






-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Feature or bug? Funny behaviour of cw on whitespace.

2016-02-11 Thread 'Elmar Hinz' via vim_use
> 
> (I start vim as "vim -u NONE" to exclude influences of personal settings. 
> Right?)
> 


I just detected that "vim -u NONE" brought mit into vi "compatible" setting. So 
all I observed here is rather vi behaviour. 

It's already improved with "nocompatible". It doesn't exactly work as I would 
intuitively expect, but consistently enough.

So please forget about the details.


How do I get my personal settings out of the way, without falling into vi 
compatible?


Kind regards


Elmar

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Feature or bug? Funny behaviour of cw on whitespace.

2016-02-11 Thread 'Jürgen Krämer' via vim_use

Hi,

'Elmar Hinz' via vim_use schrieb am 11.02.2016 um 15:00:
> On Thursday, February 11, 2016 at 2:41:42 PM UTC+1, Elmar Hinz wrote:
> 
>> How do I get my personal settings out of the way, without falling into vi 
>> compatible?
>>
>>
> 
> vim -u NONE -C
> 

I think you meant

  vim -u NONE -N

Regards,
Jürgen

-- 
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. (Calvin)

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Feature or bug? Funny behaviour of cw on whitespace.

2016-02-11 Thread 'Elmar Hinz' via vim_use

> I think you meant
> 
>   vim -u NONE -N
> 

You think right again. :)

Elmar

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Feature or bug? Funny behaviour of cw on whitespace.

2016-02-11 Thread Erik Christiansen
On 11.02.16 05:06, Elmar Hinz wrote:
> > The w motion is then perfectly as specified, and as expected.
> > It is particularly handy when correcting indentation of a few
> > lines to align with a leading line of arbitrary indentation:
> > 
> >   1) Move to start of leading line, with ^.
> >   2) j
> >   3) dw
> >   4) Loop to 2 until done, using '.' at 3, i.e. j.j.j.j.
> > 
> > 
> > Erik
> 
> Hi Erik,
> 
> sure the dw motion. My questions here cover the cw motion on
> whitespace in special. Strange stuff.

Noo-oo, it is cw within a word which is strange. Invoked from whitespace
it is unsurprising, going to the start of the nth word, exclusive.
Perfectly consistent with w by itself.

Please read ":help cw", which makes clear that it is deliberately
strange within a word. A mapping to provide consistent behaviour is
proffered there.

Vim has "compatible" and "nocompatible" modes w.r.t. vi. Perhaps you
might think of doing the same w.r.t. vim. Whether vi compatibility is
retained in your vim-n-a-bit, is another question. (Look at the vi bug
described at ":help cw".)

> Sure, that is something you likely never hit upon, unless you try to
> clone that behaviour and ask yourself should I really do that or
> should it be improved in Vim itself.

In this instance, it is already improved in Vim itself. ;-)
(Each user can choose convenience or correctness, according to
preference - that's close to perfection.)

Erik

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Feature or bug? Funny behaviour of cw on whitespace.

2016-02-11 Thread 'Elmar Hinz' via vim_use
On Thursday, February 11, 2016 at 2:41:42 PM UTC+1, Elmar Hinz wrote:
> > 
> > (I start vim as "vim -u NONE" to exclude influences of personal settings. 
> > Right?)
> > 

> How do I get my personal settings out of the way, without falling into vi 
> compatible?
> 
> 

vim -u NONE -C

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Feature or bug? Funny behaviour of cw on whitespace.

2016-02-11 Thread 'Elmar Hinz' via vim_use
Hello,

the normal behaviour of the w motion is to move n words forward and to act 
exclusively.

Different from this the normal behaviour of cw is to change to the end of the 
current word, much like ce.

But what happens when hitting cw on whitespace between words?

(I start vim as "vim -u NONE" to exclude influences of personal settings. 
Right?)


Case 1: cw

It replaces the current space and switches to insert mode. It doesn't ask for 
word boundaries at all. So it differs from the default w motion in this.

Case 2: 2cw

On contrary this one follows strictly the default w motion. The motion replaces 
forward all up to two words but excludes the beginning of the target word. 

Result is, that a command telling to change 2 words is changing 2 whitespace 
regions with one word in between, what feels very funny.


Both cases behave not the way, I would intuitively expect. That makes it more 
surprising, that they differ in behaviour.


What would I intuitively expect?

* 2cw on whitespace:  Change up to the end of 2 words forward.
* 2cw in word:  Change from beginning of first word to the end of second word.


Again my question are:

* What is the reasoning for this behaviour? 
* Is it for reason of vi compatibility (only)?
* Is there a consensus, that this oddity would ideally to be improved?
* If so, is there a roadmap to an improved version, a kind of VIM2 "oddity 
cleaned"?


Kind regards,


Elmar


-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.