Code Monkey home page Code Monkey logo

vim-uncommenter's Introduction

VIM-UNCOMMENTER

vim-uncommenter is a simple a plugin to delete all comments in a programming source file, just by pressing dc in vim.

Step 1.

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!

===========================================================================

UPDATE: NOW WORKING FOR DELETING BLOCK COMMENTS WITH MOST OF THE PROGRAMMING LANGUAGES ON THE LIST BELOW

===========================================================================

Installation:

If using Vundle Plug-in Manager for Vim:

Add the following line to your vimrc file:

Plugin 'radovskyb/vim-uncommenter'

Launch vim and run :PluginInstall [Pathogen.vim]: https://github.com/tpope/vim-pathogen [Tim Pope]: https://github.com/tpope

If using [Pathogen.vim] by [Tim Pope]:

Go to your terminal window and type:

cd ~/.vim/bundle
git clone https://github.com/radovskyb/vim-uncommenter.git

===========================================================================

EXAMPLE UNCOMMENT:

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 #") # deletes here 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
+ CoffeeScript
+ 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

===========================================================================

Copyright (C) Benjamin Radovsky [email protected].
Distributed under the same terms as Vim itself. See :help license.

vim-uncommenter's People

Contributors

radovskyb avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.