GithubHelp home page GithubHelp logo

mathomp4 / comments.vim Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jtamir/comments.vim

0.0 2.0 0.0 25 KB

To Comment/Un-Comment single/multiple lines of code for different source files

Home Page: http://www.vim.org/scripts/script.php?script_id=1528

Vim Script 100.00%

comments.vim's Introduction

comments.vim

Global Plugin to comment and un-comment lines in different source files in both normal and visual mode

The following are the changes that I have done to the original Plugin

  • Added support for Arduino files (both .pde and .ino)
  • Added support for Pig files (.pig)
  • Added support for Golang (.go) (by Athom)
  • Added support for remapping the keys if needed
  • Added support for Clojure and ClojureScript (by seedano)
  • Added support for Matlab and Octave (.m) files
  • Added support for IDL (.pro) files (by mathomp4)

Credit goes to the original author Jasmeet Singh Anand.

Installation

Manual

Stick this file in your ~/.vim/plugin directory or in some other 'plugin' directory that is in your runtime path

Using Vundle

    Bundle "sudar/comments.vim"

    And :BundleInstall

Configuration

By default, the following keys are mapped

  • Ctrl-c - to comment a single line or visual block
  • Ctrl-x - to un-comment a single line or visual block

You can map your own keys if needed

    let g:comments_map_keys = 0

    " key-mappings for comment line in normal mode
    noremap  <silent> <C-L> :call CommentLine()<CR>
    " key-mappings for range comment lines in visual <Shift-V> mode
    vnoremap <silent> <C-L> :call RangeCommentLine()<CR>

    " key-mappings for un-comment line in normal mode
    noremap  <silent> <C-K> :call UnCommentLine()<CR>
    " key-mappings for range un-comment lines in visual <Shift-V> mode
    vnoremap <silent> <C-K> :call RangeUnCommentLine()<CR>

Original Readme file

This is a mirror of http://www.vim.org/scripts/script.php?script_id=1528

Global Plugin to comment and un-comment lines in different source files in both normal and visual mode usage: ctrl-c to comment a single line ctrl-x to un-comment a single line shift-v and select multiple lines, then ctrl-c to comment the selected multiple lines shift-v and select multiple lines, then ctrl-x to un-comment the selected multiple lines supports: c, c++, java, php[2345], proc, css, html, htm, xml, xhtml, vim, vimrc, sql, sh, ksh, csh, perl, tex, fortran, ml, caml, ocaml, vhdl, haskel and normal files

comments.vim's People

Contributors

sudar avatar mathomp4 avatar ififi avatar jtamir avatar jasanand avatar ssedano avatar

Watchers

James Cloos 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.