sponsor Vim development Vim logo Vim Book Ad

vim-uncommenter : Automatically deletes all comments in a programming source file.

 script karma  Rating 107/30, Downloaded by 795  Comments, bugs, improvements  Vim wiki

created by
Benjamin Radovsky
 
script type
utility
 
description
UNMAINTAINED

In most programming language files opened in vim, to delete all of the lines that are comments, simply hit the keys `dc` and the comments will all disappear!

------------------------------------------

Before:
------------------------------------------
# here is a comment
def Hello (name) # here is wierdly placed comment
    puts "\n-------------"
    puts "Hello, #{name}." # even a comment here will be removed
    puts '--------------'
end

puts '######' # this one too, however the `#` inside the single quotes will be fine!

# and here is another comment
[1, 2, 3, 4, 5].each do |i|
    puts "hello" # and another wierd one
end

# and here is the last comment
Hello("# Benjamin #") # this one too

After:
------------------------------------------
def Hello (name)
    puts "\n-------------"
    puts "Hello, #{name}."
    puts '--------------'
end

puts '######'

[1, 2, 3, 4, 5].each do |i|
    puts "hello"
end

Hello("# Benjamin #")

Current programming languages that vim-uncommenter works with:
------------------------------------------
+ Ruby
+ PHP
+ Python
+ Perl
+ C
+ C++
+ C#
+ Rust
+ SASS/SCSS
+ D
+ Go
+ Java
+ Javascript
+ ActionScript
+ Scala
+ Pascal
+ Swift
+ R
+ Vimscript
+ Shell
+ Makefile
+ Cobra
+ Seed7
+ Powershell
+ Erlang
+ Text
+ VBScript
+ Small Basic
+ AutoIt
+ Lisp
+ Scheme
+ Rebol
+ Haskell
+ SQL
+ Ada
+ AppleScript
+ Eiffel
+ Lua
+ VHDL
 
install details
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-uncommenter-0.5.tar.gz 0.5 2016-01-07 7.0 Benjamin Radovsky Finished adding delete block comments functionality for most of the programming languages in the current list of languages that `vim-uncommenter` works with.
ip used for rating: 3.236.80.119

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
OSDN