Coder Social home page Coder Social logo

atom-block-comment-plus's Introduction

block-comment-plus

Comment your code with block comments.

Installation

apm install block-comment-plus

Or using the settings view in atom.

keymaps

Mac:

cmd + alt + /

Windows / Linux:

ctrl + alt + /

Supported languages so far

  • C-based languages
  • Python
  • Coffee Script
  • HTML
  • Markdown
  • Ruby
  • Elm
  • Julia

Features

  • Based on grammars at start and end points of selection
  • Handles embedded languages (such as PHP in HTML)
  • Multiple selections
  • uncomment when cursor is positioned inside a comment block.

atom-block-comment-plus's People

Contributors

leobm avatar mezcala avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

atom-block-comment-plus's Issues

AngularJS, JSLint => block-comment spaces

JSlint has a problem with bock comments without spaces. So how about adding a trailing/leading space to thecomment chars?!

// defaults to C based comments
let commentStart = '/* ';
let commentEnd = ' */';

Uncaught TypeError: selection.getBufferRange is not a function

[Enter steps to reproduce:]

  1. Select Elm code.
  2. Press cmd-alt-/ to block-comment.

Atom: 1.40.1 x64
Electron: 3.1.10
OS: Mac OS X 10.14.6
Thrown From: block-comment-plus package 0.5.1

Stack Trace

Uncaught TypeError: selection.getBufferRange is not a function

At /Applications/Atom.app/Contents/Resources/app/static/<embedded>:11

TypeError: selection.getBufferRange is not a function
    at /packages/block-comment-plus/lib/block-comment-plus.js:42:40
    at TextBuffer.transact (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:492111)
    at HTMLElement.toggle (/packages/block-comment-plus/lib/block-comment-plus.js:38:10)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:349123)
    at KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1249835)
    at KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1245969)
    at WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:284329)

Commands

     -1:43.8.0 pane:show-next-item (input.hidden-input)
     -1:21.1.0 editor:toggle-line-comments (input.hidden-input)
     -1:15.5.0 editor:select-to-end-of-line (input.hidden-input)
     -1:14.7.0 block-comment-plus:toggle (input.hidden-input)
     -0:59 settings-view:open (a.)
     -0:06.4.0 block-comment-plus:toggle (input.hidden-input)

Non-Core Packages

atom-python-run 0.9.7 
atom-quokka 1.0.159 
atom-solidity-linter 0.0.11 
atom-transpose 0.3.5 
autocomplete-solidity 0.3.4 
autocomplete-xml 0.8.1 
block-comment-plus 0.5.1 
elm-format 3.2.0 
elm-navigator 2.0.0 
es6-javascript 1.0.0 
language-elm 1.5.0 
language-haskell 1.18.0 
language-idris 0.4.5 
language-purescript 0.8.3 
linter 2.3.0 
linter-clojure 1.1.2 
linter-solium 0.0.5 
linter-ui-default 1.7.1 
linter-xmllint 1.3.0 
prettier-atom 0.53.0 
pretty-json 2.0.0 
python-yapf 0.14.0 
todo-show 2.1.0 

Python

Commenting works nice but uncommenting is buggy when you put the cursor inside the comment. It adds other comment signs within the first added.

You have to select the whole comment for it to work properly.

Error when adding a comment in a SCSS file

Uncaught TypeError: Cannot read property 'includes' of undefined
/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:810
Hide Stack Trace
TypeError: Cannot read property 'includes' of undefined
at searchCommentRow (/Users/Drawcard/.atom/packages/block-comment-plus/lib/block-comment-plus.js:114:18)
at /Users/Drawcard/.atom/packages/block-comment-plus/lib/block-comment-plus.js:41:26
at TextBuffer.module.exports.TextBuffer.transact (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:805:18)
at atom-text-editor.toggle (/Users/Drawcard/.atom/packages/block-comment-plus/lib/block-comment-plus.js:17:10)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61)
at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:160:19)
at module.exports._executeCallback (/Users/Drawcard/.atom/packages/tool-bar/lib/tool-bar-button-view.coffee:69:23)
at space-pen-button. (/Users/Drawcard/.atom/packages/tool-bar/lib/tool-bar-button-view.coffee:29:7)
at space-pen-button.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/node_modules/space-pen/node_modules/jquery/dist/jquery.js:4435:9)
at space-pen-button.elemData.handle (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/node_modules/space-pen/node_modules/jquery/dist/jquery.js:4121:28)

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.