Reputation: 11
I know there is a lot of information on how to do it, but I can't do it anyway. I use vs with vim expansion.
I have text with variables, I want to select for example variable btn
in all text and change it to button
. How can I do it?
I tried with select and press key n,
but it selects all text until next btn;
also '*' is not working, it's just jumping to next btn;
Thank you!
Upvotes: 0
Views: 657
Reputation: 11
Found a good solution:
:%s/oldText/newText/g
more here: https://www.thegeekstuff.com/2009/04/vi-vim-editor-search-and-replace-examples/
Upvotes: -1
Reputation: 486
You can use the *
or viw
to visually select the word under the cursor.
Upvotes: 2