Re: Slightly OT: Vim command (or macro) to replace space under cursor by "  " (without deleting the following word)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Niki Kovacs wrote:
> :map <F2> cw&nbsp;<ESC>
>
> ... except this also deletes the word after the cursor, which is annoying.
>   

    c1l&nbsp;<esc>

thats digit 1, lower case letter L, lower L being the move left 
command.  the 1 is uneeded, but c3l would change 3 characters, etc.

btw, my favorite way of doing what you said would be...

    / <enter>
   c1l&nbsp;

then n to find the next space, and . to execute the change op.   you 
sure don't want to change spaces that are inside < > commands, so a 
global change and replace is not suitable.


_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux