I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
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)
I use this in Javascript to get rid of
console.log
lines.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.log
quite a lot and didn't think of doing that. Good suggestion!So glad you shared this 👍