I use this in Javascript to get rid of console.log lines.
console.log
I think it's a great reason people should stick to one command per line rather than chaining them with semi-colons :)
Same. I like to search first to see where I wrote the console statements (and ensure that they aren't inline with something important), then do :g//d (if you leave the search blank it'll just use whatever is in your search buffer)
:g//d
That's right, vim repeats the last search if we leave pattern blank (//)! Good call!
//
Oh, nice!! I console.log quite a lot and didn't think of doing that. Good suggestion! So glad you shared this 👍
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I use this in Javascript to get rid of
console.loglines.I think it's a great reason people should stick to one command per line rather than chaining them with semi-colons :)
Same. I like to search first to see where I wrote the console statements (and ensure that they aren't inline with something important), then do
:g//d(if you leave the search blank it'll just use whatever is in your search buffer)That's right, vim repeats the last search if we leave pattern blank (
//)! Good call!Oh, nice!! I
console.logquite a lot and didn't think of doing that. Good suggestion!So glad you shared this 👍