Hi Bidit!

On Sa, 18 Apr 2015, Bidit Mazumder wrote:

> On Thursday, April 16, 2015 at 11:31:12 PM UTC+3, Christian Brabandt wrote:
> > Hi Bidit!
> > 
> > On Do, 16 Apr 2015, Bidit Mazumder wrote:
> > 
> > > First, I would like to thank Bram Moolenaar for making Vim, and Björn
> > > Winckler for the MacVim port.
> > > 
> > > The "ce" and "cw" bug should be addressed (see
> > > https://groups.google.com/forum/#!topic/vim_use/UWLISFkZAlo)
> > 
> > That is not a bug and has been explained several times (even in your 
> > link)
> > 
> > You can probably map it away if you don't like this. A quick google 
> > search shows, there is even a plugin to change that behaviour:
> > https://github.com/ap/vim-you-keep-using-that-word
> > 
> > > Sublime Text also has a unique feature that allows you to navigate
> > > through the entire document from a pane on the right (see pic). This
> > > would be a great feature to have in Vim—Especially for those who can't
> > > stand folding. Sublime Text also shows indentation as vertical lines
> > > (see pic)—This is a good feature; it will blend in perfectly with Vim.
> > 
> > There are plugins that do that:
> > https://github.com/severin-lemaignan/vim-minimap
> > https://github.com/koron/minimap-vim
> > 
> > > As far as I know, in Vim, it is not possible to display "\r" and "\n"
> > > as (different) special characters. This would be a nice feature to
> > > have for documents that contain both 'dos', 'unix' and 'classic mac'
> > > line breaks.
> > 
> > Concealing should help with that.
> > 
> > > Finally, there should be a simple way to know if the Caps-Lock or
> > > Shift key is pressed (like changing the cursor color, or the color of
> > > the cursor-line. Like "hi ShiftModeCursor" or "hi
> > > ShiftModeCursorLine".
> > 
> > If there is a utility that queries the status of the Caps-Lock key, you 
> > can probably make use of it in the statusline. Don't know, if such a 
> > tool exists.
> 
> I tried Conceal to show 'dos' line breaks, but it doesn't work. Here is what 
> I tried:
>  set conceallevel=2 concealcursor=nciv
>  syntax match CRLF "\r\n" conceal cchar=→
>  hi clear Conceal
>  hi Conceal

If I see this correctly, this only works for extra CR after which a new 
line follows (and that are usually displayed like ^M in Vim). But that 
works.

> Regarding the "ce" issue: I've read the arguments about "ce" in that
> links that Justin provided, but I'm still not convinced that the
> behavior of "ce" is a feature.
> 
> Example:
> 
> Th[i]s is a web page. (the cursor is on "i") "ce" or "cw"
> Th| is a web page. (Insert mode is enabled. "|" is the cursor)
> 
> In the above case, "ce" and "cw" both have the same effect. ---
> 
> This is [a] web page. "ce" This is | page.
> 
> This is [a] web page. "cw" This is | web page.
> 
> In the above case, "ce" deletes two words; and "cw" deletes one word.
> ---
> 
> This is [a] web page. "de" This is [] page.
> 
> This is [a] web page. "dw" This is [w]eb page.
> 
> In the above case, both "de" and "dw" perform as expected. ---
> 
> 
> "d" and "c" are both operators, pressing them in Normal mode enters
> Operator-Pending mode.
> 
> In essence, it starts a finite-state machine and waits for a motion.
> The finite-state machine for "ce" and "de" should be the same, the
> only difference would be the final state.
> 
> "de"'s final state is Normal mode and "ce"'s final state is Insert
> mode.

Well I think it dates back from the original Vi and always has been that 
way and that is how all vi clones work. Here is a quote from the source:

/*
 * This is a little strange. To match what the real Vi does,
 * we effectively map 'cw' to 'ce', and 'cW' to 'cE', provided
 * that we are not on a space or a TAB.  This seems impolite
 * at first, but it's really more what we mean when we say
 * 'cw'.
 * Another strangeness: When standing on the end of a word
 * "ce" will change until the end of the next word, but "cw"
 * will change only one character! This is done by setting
 * flag.
 */

We could probably add a flag to 'cpoptions' to change this behaviour,
but we wouldn't change the behaviour by default, since this would be 
backward incompatible (and in fact I have gotten used to it and like it 
that way). Then again you could of course map 'w' in operator pending 
mode like this:

onoremap w :norm! w<cr>

That should work.

Best,
Christian 
-- 
Abwärts-Kompatibilität bei Win98:
Auch alte Software stürzt klaglos ab.

-- 
-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui