Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created Readme file #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
I just realized this today, and figured it may come in handy for others. Sometimes when I'm testing a more complicated regex of things I want to delete, I'll just use the search (/) and build while watching the highlighting to see what's being recognized. Then I hit enter and have to retype it as a substitute command, because :%s/typetypetype doesn't show highlighting while typing, but /typetypetype does.
It occurred to me today that since // means search for last search again, that s// might mean substitute over the previous search, and that s/// might just delete it. It turns out it does, so now I can just hit /complicatedregexhere, and once it's matching what I want, I just hit enter, then do :%s/// and enter to delete it all.

You can also hit Ctrl+R, / to pull the find buffer into the search command if you want to see it and be able to edit it.