GithubHelp home page GithubHelp logo

expand-selection's People

Contributors

mrolla avatar panstav avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

expand-selection's Issues

Expansion is too greedy

Refer to the gif below:

expand-selection_01

  • On line 3, I think it should first select the whole class (possible without the ., first) before selecting the brace, as well.
  • Line 5 should behave similarly, not selecting whole block right from the start.
  • On line 10, the contents of the string should be selected first, then outer string, then brackets. I noticed the incorrect behavior only if the string is a non-word string, though, so it might not be such an issue.

Failed to activate the expand-selection package

Atom Version: 0.196.0 ⚠️ in 1.0 API Preview Mode ⚠️
System: Mac OS X 10.10.3
Thrown From: expand-selection package, v0.2.1

Stack Trace

Failed to activate the expand-selection package

At Cannot read property 'command' of undefined

TypeError: Cannot read property 'command' of undefined
    at ExpandSelection.module.exports.Subscriber.subscribeWith (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/emissary/lib/subscriber.js:25:23)
    at ExpandSelection.module.exports.Subscriber.subscribeToCommand (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/emissary/lib/subscriber.js:70:19)
    at new ExpandSelection (/Users/mderazon/.atom/packages/expand-selection/lib/expand-selection.coffee:43:12)
    at Object.module.exports.activate (/Users/mderazon/.atom/packages/expand-selection/lib/main.coffee:8:37)
    at Package.module.exports.Package.activateNow (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:222:19)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:203:30
    at Package.module.exports.Package.measure (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:147:15)
    at Package.module.exports.Package.activate (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:195:14)
    at PackageManager.module.exports.PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:434:21)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:418:29

Commands

Config

{
  "core": {
    "ignoredNames": [
      ".git",
      ".svn",
      ".DS_Store"
    ],
    "useReactEditor": true,
    "disabledPackages": [
      "api-blueprint-preview"
    ],
    "themes": [
      "unity-ui",
      "atom-dark-syntax"
    ]
  }
}

Installed Packages

# User
color-picker, v1.7.0
expand-selection, v0.2.1
expand-selection-to-quotes, v0.1.0
linter, v0.12.1
linter-csslint, v0.0.11
linter-htmlhint, v0.0.13
linter-jscs, v1.10.0
linter-jshint, v0.1.2
linter-jsxhint, v0.1.1
react, v0.11.7
timecop, v0.31.0
unity-ui, v2.0.7

# Dev
No dev packages

getLastSelection Error

Hey man, thanks for starting this, was DYING for this...

Looks like its throwing a error when i try and trigger , here is the copied error stack trace

ReferenceError: getLastSelection is not defined
at ExpandSelection.module.exports.ExpandSelection.expand (/Users/eruthven/.atom/packages/expand-selection/lib/expand-selection.coffee:79:26)
at atom-workspace. (/Users/eruthven/.atom/packages/expand-selection/lib/expand-selection.coffee:35:10)
at atom-workspace.handler (/Applications/Atom.app/Contents/Resources/app/src/space-pen-extensions.js:113:32)
at atom-workspace.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4681:9)
at atom-workspace.elemData.handle (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4359:46)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29)
at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:544:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:386:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:151:20)

not selecting {}

It does not work well with brackets on new lines.
eg:

{
 works: "no"
}
{ works: 'yes' }

Deprecated Atom APIs will be removed June 1st

Atom will no longer load this package after June 1st without changes. There are a couple deprecations on the latest version (0.2.1) of this package:

  1. Use activationCommands instead of activationEvents in your package.json Commands should be grouped by selector as follows: json "activationCommands": { "atom-workspace": ["foo:bar", "foo:baz"], "atom-text-editor": ["foo:quux"] }
  2. The context menu CSON format has changed. Please see https://atom.io/docs/api/latest/ContextMenuManager#context-menu-cson-format for more info.
  3. atom.workspaceView is no longer available. In most cases you will not need the view. See the Workspace docs for alternatives: https://atom.io/docs/api/latest/Workspace. If you do need the view, please use atom.views.getView(atom.workspace), which returns an HTMLElement.
  4. Call ::getActiveTextEditor instead
  5. Use Cursor::getScopeDescriptor() instead
  6. Use Point::traverse instead

Visit https://gist.github.com/benogle/6d09e295c84b717ef9b4 and search for your package name to see what deprecations are being reported on this package.

See atom/atom#6867 for more info.

Opposite action.

Add a command to reverse the selection in the same way it is expanded.

Package.getActivationCommands is deprecated.

Use activationCommands instead of activationEvents in your package.json
Commands should be grouped by selector as follows:

  "activationCommands": {
    "atom-workspace": ["foo:bar", "foo:baz"],
    "atom-text-editor": ["foo:quux"]
  }
Package.getActivationCommands (/usr/share/atom/resources/app.asar/src/package.js:808:9)
Package.hasActivationCommands (/usr/share/atom/resources/app.asar/src/package.js:733:20)
<unknown> (/usr/share/atom/resources/app.asar/src/package.js:185:24)
Package.measure (/usr/share/atom/resources/app.asar/src/package.js:163:15)
Package.load (/usr/share/atom/resources/app.asar/src/package.js:177:12)
PackageManager.loadPackage (/usr/share/atom/resources/app.asar/src/package-manager.js:355:14)

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.