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
> :%s/\<\(\
> 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 lik
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 more