I am using the cw (change word) command and the screen does not update until i press the ESC key. I have already set "slow" in my .vimrc.
A:
What do you expect the cw command to do? Are you confusing it with dw (delete word)?
With cw, you should be doing: ESCcwFooBarESC. That will replace the current word your cursor is on with FooBar (the second ESC exits insert mode).
mobiGeek
2010-04-01 03:05:29
cw is Change word. For example if i place the cursor on the letter "C" of the word "Change" and type the command 'cw' I should then be able to type and see the letters I type replace the word "Change". vi works this way. vim does not seem to mimic this perfectly.
suresh
2010-04-01 03:30:53
+1
A:
Are you seeing a $ show up at the end of your change region immediately, and then it goes away when you hit ESC? If so, try :set cpo-=$
. You may also have to :set nocp
.
Laurence Gonsalves
2010-04-01 03:06:39
Thanks! that kind of works. The entire word disappears. What would be nice is if the $ shows up and the letters appear immediately as I type.
suresh
2010-04-01 03:28:07
That behavior, $ showing up and letters appearing immediately as you type, should be the behavior when you have $ in cpo. If you `:set cpo+=$` what, exactly, happens? BTW: the `slow` option does not exist in vim. It's a no-op option that exists only for backwards compatibility. See `:help missing-options`.
Laurence Gonsalves
2010-04-01 03:54:03
when cpo includes $, the $ shows up at the end of the word but the letters i type dont show up. The old word remains until I hit ESC when the word magically changes.
suresh
2010-04-01 05:24:25
Hmmm... I've never seen that behavior in vim. What terminal are you using? You may want to try adjusting the ttyfast and term options to see if they change the behavior. If that doesn't work, and if you're using an older version you might want to try a newer one to see if maybe you're running into a (hopefully fixed) bug.
Laurence Gonsalves
2010-04-01 05:41:30
term=xterm. seems like a new enough vim. Version 7.2.79. Came with Jaunty on ubuntu.
suresh
2010-04-01 06:47:10
What terminal program are you using (rxvt, eterm, gnome-terminal, konsole, xterm, something else...)? What happens in gvim? Do you see the same behavior? What about `vim -n NONE` (tells vim to ignore your .vimrc, etc.)?
Laurence Gonsalves
2010-04-01 22:05:40