About 4,840,000 results
Open links in new tab
  1. What's a quick way to comment/uncomment lines in Vim?

    Nov 5, 2009 · The basic idea is to comment or uncomment lines out using the same method as yanking a paragraph by typing yip or deleting 2 lines by typing dj. This approach will let you do …

  2. How to comment multiple lines at once? - Unix & Linux Stack …

    sed '/START/i \<<"COMMENT" \ /END/a\COMMENT\n' - you only change two lines. And to see what you commented add cat to the beginning. First, move the cursor to the first char of the …

  3. How to Comment and Uncomment multiple line vi terminal editor

    Sep 13, 2024 · Follow these steps to comment multiple lines in Vi/Vim: Open the file you wish to edit in vi/vim. You can do this by entering the following command in your terminal, replacing …

  4. What is your favorite way to comment several lines in Vim?

    Nov 30, 2013 · In vim I simply highlight the lines and push `c to comment and `r to remove comments. I normally just save the step in a macro and then invoke the macro in whichever …

  5. How to comment multiple lines in Vim Editor in Linux

    Sep 25, 2023 · For commenting on multiple lines in Vim Editor in Linux, we have various methods through which it will be easy for us to comment on multiple lines in one go. Below are the …

  6. How to Comment Multiple Lines in Vim Editor - Make Tech Easier

    Jun 5, 2023 · We use a simple Python script to learn how to comment out multiple lines in Vim. 1. Using Line Numbers. Using line numbers is one method to comment out multiple lines in Vim. …

  7. Comment / uncomment multiple fixed lines in vim - Stack Overflow

    Mar 29, 2014 · First, find a pattern that selects the right lines. If you have :set hls, it will help spot the matches. I think something like /#.*\/\/$ is what you want. Next, comment out the selected …

  8. Best ways to comment in Vim - by Rashid Amiri - Vimology

    Sep 14, 2024 · Method 1 - Visual Mode with :sCommand (Substitution) This method works by visually selecting multiple lines and applying a substitution to prepend the comment character …

  9. (un) comment multiple lines vim · GitHub

    For commenting a block of text is almost the same: First, go to the first line you want to comment, press Ctrl``V, and select until the last line. Second, press Shift``I``#``Esc (then give it a …

  10. Comment & Uncomment multiple lines in Vim

    May 4, 2012 · The mappings use Ctrl-A to comment and Ctrl-B to uncomment. Replace these with any convenient keys. To use it, just select the lines to comment by pressing V then moving the …

Refresh