- 
      
- 
        Save willi-dev/f4b33fd5bdaf164626bb09b7109a30b2 to your computer and use it in GitHub Desktop. 
Revisions
- 
        ultim8k revised this gist Nov 4, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,6 @@ From: http://stackoverflow.com/questions/1676632/whats-a-quick-way-to-comment-un For those tasks I use most of the time block selection. Put your cursor on the first `#` character, press `Ctrl``V` (or `Ctrl``Q` for gVim), and go down until the last commented line and press `x`, that will delete all the `#` characters vertically. 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 second), and it will insert a `#` character on all selected lines. For the stripped-down version of vim shipped with debian/ubuntu by default, type `: s/^/#` in the second step instead. 
- 
        ultim8k created this gist Nov 4, 2016 .There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ From: http://stackoverflow.com/questions/1676632/whats-a-quick-way-to-comment-uncomment-lines-in-vim For those tasks I use most of the time block selection. Put your cursor on the first # character, press CtrlV (or CtrlQ for gVim), and go down until the last commented line and press x, that will delete all the # characters vertically. For commenting a block of text is almost the same: First, go to the first line you want to comment, press CtrlV, and select until the last line. Second, press ShiftI#Esc (then give it a second), and it will insert a # character on all selected lines. For the stripped-down version of vim shipped with debian/ubuntu by default, type : s/^/# in the second step instead.