Posted By: Anonymous
I have a Ruby code file open in vi, there are lines commented out with
class Search < ActiveRecord::Migration def self.up # create_table :searches do |t| # t.integer :user_id # t.string :name # t.string :all_of # t.string :any_of # t.string :none_of # t.string :exact_phrase # # t.timestamps # end end def self.down # drop_table :searches end end
Say I want to uncomment all the lines in the first
def ... end section. What’s an efficient way to do that in Vim?
//) or Haml (
I use the NERD Commenter script. It lets you easily comment, uncomment or toggle comments in your code.
As mentioned in the comments:
for anyone who is confused by the usage, default leader is “” so 10cc will comment ten lines and 10cu will uncomment those ten lines
Answered By: Anonymous