This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Jonas Schumacher
So you know that /
will bring up search in Vim and VSCode Vim. That's good!
But then you named a variable is
and now want to find every occurence of that word - but only where it stands alone. So no places where it occurs as part of your isLargePizza()
function for example.
Luckily, that's doable: \<
matches the beginning of a word and \>
the end.
So hitting ...
/\<is\>
... will to the trick!
This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Jonas Schumacher

Jonas Schumacher | Sciencx (2022-12-03T13:33:02+00:00) Search for word boundaries in Vim & VSCode Vim. Retrieved from https://www.scien.cx/2022/12/03/search-for-word-boundaries-in-vim-vscode-vim/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.