A quick tip for those who use Vim: if you need to remove several lines that match a regular expression, you can achieve that by running:
Let's say you want to remove the commented lines from the following file:
ruby
def foo
end
def bar
end
Run :g /^#.*/d, and your code will become:
rubydef foo
end
def bar
end
Simple, right? :)
Post atualizado em 03/04/2026, 15:00:00