Re: Partial current word under cursor

2018-02-04 Thread porphyry5
On Friday, February 2, 2018 at 2:42:21 PM UTC-8, S wrote: > Hello! > > > > It's a standard practice of mine having to replace whole words with > something else, very useful when coding.  I have the following > mapping in my vimrc: > >     > nnoremap s >

Re: Partial current word under cursor

2018-02-02 Thread Tim Chase
> nnoremap s :%s/\<\(\)\>//g > > I was thinking that I would set the cursor where I need to insert > the new word, as in "get#Something" where # represents the cursor > and then I'd need to replace it like so: > s/\<\(left-of-cursor)\zs\ze(right-of-cursor)\>/whatever/g You might try something

Partial current word under cursor

2018-02-02 Thread S
Hello! It's a standard practice of mine having to replace whole words with something else, very useful when coding.  I have the following mapping in my vimrc: nnoremap s :%s/\<\(\)\>//g which lets me just hit \+s and replace the current word under the cursor. Now I've found myself needing