Giter Club home page Giter Club logo

atom-aligner's People

Contributors

adrianlee44 avatar greenkeeper[bot] avatar mokoaki avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

atom-aligner's Issues

Failed to load the aligner package

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.11
System: Unknown Windows Version
Thrown From: aligner package, v0.16.0

Stack Trace

Failed to load the aligner package

At Cannot find module 'extend'

Error: Cannot find module 'extend'
    at Module._resolveFilename (module.js:328:15)
    at Function.Module._resolveFilename (C:\Users\rudnei.oliveira\AppData\Local\atom\app-1.0.11\resources\app.asar\src\module-cache.js:383:52)
    at Function.Module._load (module.js:270:25)
    at Module.require (module.js:357:17)
    at require (module.js:376:17)
    at Object.<anonymous> (C:\Users\rudnei.oliveira\.atom\packages\atom-aligner-0.16.0\lib\operator-config.coffee:2:11)
    at Object.<anonymous> (C:\Users\rudnei.oliveira\.atom\packages\atom-aligner-0.16.0\lib\operator-config.coffee:1:1)
    at Module._compile (module.js:452:26)
    at Object.defineProperty.value [as .coffee] (C:\Users\rudnei.oliveira\AppData\Local\atom\app-1.0.11\resources\app.asar\src\compile-cache.js:169:21)
    at Module.load (module.js:347:32)

Commands

Config

{}

Installed Packages

# User
No installed packages

# Dev
No dev packages

inline arrays... maybe?

["one", 1, "uno"]
["two", 2, "dos"]
["three", 3, "tres"]
["one",    1, "uno"]
["two",    2, "dos"]
["three",  3, "tres"]

strings left align
ints right align

Uncaught TypeError: Cannot read property 'selector' of null

[Enter steps to reproduce below:]

  1. in JavaScript, use aligner to align :
  var target              = this.event.target;
  var inDropdown          = isNode(target.closest('.dropdown'));
  var isScrollbar         = helper.scrollbar.isComponent(target);
  var isInit              = dingo.keys(this.node).has('dingo_init');
  var scrollInDropdown = isScrollbar && inDropdown;

Atom Version: 1.0.11
System: Mac OS X 10.10.5
Thrown From: aligner package, v0.16.0

Stack Trace

Uncaught TypeError: Cannot read property 'selector' of null

At /Users/sean/.atom/packages/aligner/lib/operator-config.coffee:131

TypeError: Cannot read property 'selector' of null
    at OperationConfig.getConfig (/Users/sean/.atom/packages/aligner/lib/operator-config.coffee:131:5)
    at Object.getTokenizedAlignCharacter (/Users/sean/.atom/packages/aligner/lib/helper.coffee:137:1)
    at Aligner.alignAtRow (/Users/sean/.atom/packages/aligner/lib/main.coffee:13:5)
    at Aligner.align (/Users/sean/.atom/packages/aligner/lib/main.coffee:13:5)
    at atom-text-editor.<anonymous> (/Users/sean/.atom/packages/aligner/lib/main.coffee:1:1)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:245:29)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:524:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:347:22)
    at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:184:20)

Commands

     -0:09.3.0 editor:move-to-end-of-screen-line (atom-text-editor.editor.is-focused)
     -0:09.1.0 core:move-left (atom-text-editor.editor.is-focused)
     -0:08.8.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:08.4.0 core:move-down (atom-text-editor.editor.is-focused)
     -0:07.9.0 core:move-up (atom-text-editor.editor.is-focused)
     -0:07.8.0 core:move-left (atom-text-editor.editor.is-focused)
  6x -0:07.7.0 editor:move-to-beginning-of-word (atom-text-editor.editor.is-focused)
     -0:06.4.0 editor:move-to-end-of-word (atom-text-editor.editor.is-focused)
  5x -0:06.1.0 core:move-right (atom-text-editor.editor.is-focused)
     -0:05.2.0 editor:select-to-beginning-of-word (atom-text-editor.editor.is-focused)
     -0:04.1.0 editor:consolidate-selections (atom-text-editor.editor.is-focused)
     -0:04.1.0 core:cancel (atom-text-editor.editor.is-focused)
     -0:03.1.0 aligner:align (atom-text-editor.editor.is-focused)
     -0:02.3.0 editor:consolidate-selections (atom-text-editor.editor.is-focused)
     -0:02.3.0 core:cancel (atom-text-editor.editor.is-focused)
     -0:00.4.0 aligner:align (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "projectHome": "/Users/sean/Dropbox/",
    "ignoredNames": [
      ".sass-cache",
      "node_modules",
      ".git",
      "bin",
      ".DS_Store*"
    ],
    "disabledPackages": [
      "css-comb",
      "csscomb"
    ],
    "themes": [
      "one-light-ui",
      "myth-syntax"
    ]
  },
  "aligner": {
    ":-leftSpace": true,
    ",-leftSpace": true,
    ":-alignment": "left"
  }
}

Installed Packages

# User
aligner, v0.16.0
aligner-css, v1.2.0
aligner-scss, v1.1.0
color-picker, v2.0.11
emmet, v2.3.12
myth-syntax, v0.0.0

# Dev
No dev packages

Uncaught Error: Aligner: aligner-css has already been activated

To reproduce:

  1. Not sure -- it just happened a few minutes after upgrading all packages.

Atom Version: 1.0.18
System: Mac OS X 10.11
Thrown From: aligner package, v0.16.2

Stack Trace

Uncaught Error: Aligner: aligner-css has already been activated

At /Volumes/Is/tizzyd/.atom/packages/aligner/lib/provider-manager.coffee:15

Error: Aligner: aligner-css has already been activated
  at Error (native)
  at ProviderManager.register (/Volumes/Is/tizzyd/.atom/packages/aligner/lib/provider-manager.coffee:15:20)
  at Aligner.registerProviders (/Volumes/Is/tizzyd/.atom/packages/aligner/lib/main.coffee:51:21)
  at Provider.module.exports.Provider.provide (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/service-hub/lib/provider.js:30:52)
  at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/service-hub/lib/service-hub.js:55:26
  at doNTCallback0 (node.js:416:9)
  at process._tickCallback (node.js:345:13)

Commands

Config

{
  "core": {
    "themes": [
      "unity-ui",
      "one-light-syntax"
    ],
    "disabledPackages": [
      "atom-fsharp",
      "atom-ternjs",
      "file-icon-supplement"
    ]
  }
}

Installed Packages

# User
Sublime-Style-Column-Selection, v1.3.0
aligner, v0.16.2
aligner-css, v1.2.0
aligner-php, v1.0.0
aligner-ruby, v1.4.0
aligner-scss, v1.1.0
atom-pair, v2.0.10
autoclose-html, v0.19.0
autocomplete-php, v0.3.7
autocomplete-plus-python-jedi, v0.3.6
hex, v0.6.2
highlight-line, v0.11.0
highlight-selected, v0.10.1
htmlhint, v1.1.3
language-fsharp, v0.8.4
linter-js-yaml, v1.1.2
linter-php, v1.0.3
linter-phpmd, v1.2.0
linter-scss-lint, v2.0.0
linter-tidy, v1.0.1
local-history, v3.2.3
wordpress-api, v1.2.1

# Dev
No dev packages

indent spaces instead of tabs

not following the editor settings to use soft or hard tabs.

Tab Type
Determine character inserted when Tab key is pressed. Possible values: "auto", "soft" and "hard". When set to "soft" or "hard", soft tabs (spaces) or hard tabs (tab characters) are used. When set to "auto", the editor auto-detects the tab type based on the contents of the buffer (it uses the first leading whitespace on a non-comment line), or uses the value of the Soft Tabs config setting if auto-detection fails.

in my case aligner will convert all indent tabs into spaces

Allow :whitespace: as separator

Hi!

I'm used to work with Stylus files, and it allows to forgot : when declaring properties (http://stylus-lang.com/docs/selectors.html), so:

body
    background-color #333
    color white

will be compiled to:

body {
    background-color: #333;
    color: white;
}

I want / need to align my CSS properties in this form:

body
    background-color #333
    color            white

Can we use a dedicated separator like first whitespace available to make alignment? Is this possible only with a provider, or do we need to hack the aligner core to do this? I can develop it, but I need some first tips to start ๐Ÿ˜‰.

Thanks!

Alignment inserts space at beginning of line

Running Vertical Align: Align on this line (surrounded by blank lines)

console.log("hi", 4);

inserts a space at the beginning of the line

 console.log("hi", 4);

I'm using Vertical Align 0.6.0.

Uncaught Error: EPERM: operation not permitted, scandir 'D:\MSOCache'

[Enter steps to reproduce below:]

  1. Just opened my whole drive (e.g. D:\ on Windows) in Atom - it did not worked very nice.

But the real cause of this seem to be some directories, which Atom cannot access, because administrative rights are required (like MSOCache here).

Atom Version: 1.3.2
System: Windows 7, x64
Thrown From: aligner package, v0.17.4

Stack Trace

Uncaught Error: EPERM: operation not permitted, scandir 'D:\MSOCache'

At fs.js:813

Error: EPERM: operation not permitted, scandir 'D:\MSOCache'
    at Error (native)
    at Object.fs.readdirSync (fs.js:813:18)
    at Object.fs.readdirSync (ATOM_SHELL_ASAR.js:454:28)
    at Object.fsPlus.listSync (C:\Users\%username%\AppData\Local\atom\app-1.3.2\resources\app.asar\node_modules\fs-plus\lib\fs-plus.js:171:18)
    at Directory.module.exports.Directory.squashDirectoryNames (C:\Users\%username%\AppData\Local\atom\app-1.3.2\resources\app.asar\node_modules\tree-view\lib\directory.js:379:23)
    at new Directory (C:\Users\%username%\AppData\Local\atom\app-1.3.2\resources\app.asar\node_modules\tree-view\lib\directory.js:28:25)
    at Directory.module.exports.Directory.getEntries (C:\Users\%username%\AppData\Local\atom\app-1.3.2\resources\app.asar\node_modules\tree-view\lib\directory.js:256:30)
    at Directory.module.exports.Directory.reload (C:\Users\%username%\AppData\Local\atom\app-1.3.2\resources\app.asar\node_modules\tree-view\lib\directory.js:312:20)
    at Directory.module.exports.Directory.expand (C:\Users\%username%\AppData\Local\atom\app-1.3.2\resources\app.asar\node_modules\tree-view\lib\directory.js:356:12)
    at tree-view-directory.DirectoryView.expand (C:\Users\%username%\AppData\Local\atom\app-1.3.2\resources\app.asar\node_modules\tree-view\lib\directory-view.js:177:24)
    at tree-view-directory.DirectoryView.initialize (C:\Users\%username%\AppData\Local\atom\app-1.3.2\resources\app.asar\node_modules\tree-view\lib\directory-view.js:81:21)
    at TreeView.<anonymous> (C:\Users\%username%\AppData\Local\atom\app-1.3.2\resources\app.asar\node_modules\tree-view\lib\tree-view.js:571:16)
    at TreeView.module.exports.TreeView.updateRoots (C:\Users\%username%\AppData\Local\atom\app-1.3.2\resources\app.asar\node_modules\tree-view\lib\tree-view.js:576:10)
    at C:\Users\%username%\AppData\Local\atom\app-1.3.2\resources\app.asar\node_modules\tree-view\lib\tree-view.js:361:24
    at Emitter.module.exports.Emitter.emit (C:\Users\%username%\AppData\Local\atom\app-1.3.2\resources\app.asar\node_modules\event-kit\lib\emitter.js:86:11)
    at Project.module.exports.Project.addPath (C:\Users\%username%\AppData\Local\atom\app-1.3.2\resources\app.asar\src\project.js:255:29)
    at AtomEnvironment.module.exports.AtomEnvironment.openLocations (C:\Users\%username%\AppData\Local\atom\app-1.3.2\resources\app.asar\src\atom-environment.js:1028:26)
    at EventEmitter.outerCallback (C:\Users\%username%\AppData\Local\atom\app-1.3.2\resources\app.asar\src\application-delegate.js:201:18)
    at emitTwo (events.js:92:20)
    at EventEmitter.emit (events.js:172:7)

Commands

     -0:12 editor-stats:toggle (atom-workspace.workspace.scrollbars-visible-always)

Config

{
  "core": {
    "disabledPackages": [
      "autocomplete-emojis",
      "metrics",
      "tree-view-background",
      "markdown-table-formatter",
      "atom-beautify",
      "linter-js-standard",
      "linter-flake8",
      "tree-view-breadcrumb",
      "autocomplete-php",
      "linter-pep8",
      "copy-paste"
    ],
    "themes": [
      "atom-dark-ui",
      "one-dark-syntax"
    ],
    "packagesWithKeymapsDisabled": [
      "regex-railroad-diagram"
    ]
  }
}

Installed Packages

# User
aligner, v0.17.4
aligner-php, v1.0.0
aligner-python, v1.0.1
aligner-scss, v1.1.0
[...]

# Dev
No dev packages

Failed to load the quick-jump package

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.207.0
System: Microsoft Windows 7 Professional
Thrown From: aligner package, v0.13.0

Stack Trace

Failed to load the quick-jump package

At Cannot read property 'prototype' of undefined

TypeError: Cannot read property 'prototype' of undefined
    at __extends (/C:/Users/prasannar/.atom/packages/quick-jump/lib/quick-jump-view.coffee:4:199)
    at /C:/Users/prasannar/.atom/packages/quick-jump/lib/quick-jump-view.coffee:9:5
    at Object.<anonymous> (/C:/Users/prasannar/.atom/packages/quick-jump/lib/quick-jump-view.coffee:275:5)
    at Object.<anonymous> (/C:/Users/prasannar/.atom/packages/quick-jump/lib/quick-jump-view.coffee:277:4)
    at Module._compile (module.js:452:26)
    at Object.requireCoffeeScript (C:\Users\prasannar\AppData\Local\atom\app-0.207.0\resources\app.asar\node_modules\coffee-cash\lib\coffee-cash.js:85:19)
    at Module.load (module.js:347:32)
    at Function.Module._load (module.js:302:12)
    at Module.require (module.js:357:17)
    at require (module.js:376:17)

Commands

Config

{
  "core": {
    "disabledPackages": [
      "hex",
      "js-refactor",
      "local-server",
      "vertical-align",
      "vim-mode",
      "zentabs",
      "scope-inspector",
      "regex-railroad-diagram",
      "refactor",
      "project-colorize",
      "pomodoro",
      "neon-selection",
      "mobile-preview",
      "Zen",
      "block-travel",
      "git-difftool",
      "angularjs",
      "merge-conflicts",
      "language-objective-c",
      "archive-view",
      "background-tips",
      "dev-live-reload",
      "language-c",
      "language-clojure",
      "language-coffee-script",
      "language-csharp",
      "language-gfm",
      "language-go",
      "language-java",
      "language-mustache",
      "language-make",
      "language-perl",
      "language-php",
      "language-python",
      "language-ruby",
      "language-ruby-on-rails",
      "language-toml",
      "open-on-github",
      "package-generator",
      "welcome",
      "linter-gjslint"
    ]
  }
}

Installed Packages

# User
column-select, v0.2.0
highlight-selected, v0.9.3
linter, v0.12.6
linter-csslint, v0.0.13
linter-jscs, v1.12.0
linter-jshint, v0.1.6
linter-jsonlint, v0.1.4
linter-less, v0.5.0
linter-scss-lint, v1.0.4
open-recent, v2.2.4
quick-jump, v0.0.4
word-jumper, v0.3.0

# Dev
No dev packages

Sass/SCSS, alignment only works in Bracket context

Hi,

atom-aligner + atom-aligner-scss installed. I am not sure which package causes following behaviour:

Works:

.foo {
  // Class context, alignment works well with any <key|property> combination

  $table-padding:      $base-spacing-unit !default;
  $table-border-width: $base-font-size !default;
}

Fails:

// No context (e.g. declaring variables in a configuration.scss file)

$table-padding: $base-spacing-unit !default;
$table-border-width: $base-font-size !default;

Am i doing something stupid or is it intended behaviour? Thx for your answer.

Padding stops working for ":" character

I have both Left space for : and Right space for : checked and the Padding for : set to left

The only workaround currently is going into settings and re-toggling the Left space for : option. After awhile, the setting will be ignored and I am forced to do the workaround again.

Expected behavior:

var expected = {
  'one'   : 1,
  'five'  : 5,
  'seven' : 7
}

Actual behavior:

var actual = {
  'one': 1,
  'five': 5,
  'seven': 7
}

Align on brackets

I write my scss like so:

.parent      { color:red; width:100px;
  .child-a   { color:blue; width:50px; }
  .child-b   { color:green;
    .sub     { color:purple; }
  }
}

Would it be possible to write an aligner extension that accomplishes this? I've tried forking the scss package and aligning on the {, which works well for items that are indented to the same column, but doesn't work for lines that have different indentation.

Alignment issue with Babel ES6 Javascript

How can I make it so that aligner treats the Babel ES6 Javascript language from language-babel correctly?

Here's my original object.

var initialState = {
  a: [],
  bbb: null,
  ccccc: null,
  ddd: 11,
  eeeeeeee: [],
  fff: 0,
  gggg: {},
  hhh: null,
  iiii: null
};

If I'm set to Babel ES6 JavaScript from language-babel I get this alignment.

var initialState = {
  a: []       , 
  bbb: null   , 
  ccccc: null , 
  ddd: 11     , 
  eeeeeeee: [], 
  fff: 0      , 
  gggg: {}    , 
  hhh: null   , 
  iiii: null
};

If I set the language to JavaScript I get this (proper) alignment.

var initialState = {
  a:        [],
  bbb:      null,
  ccccc:    null,
  ddd:      11,
  eeeeeeee: [],
  fff:      0,
  gggg:     {},
  hhh:      null,
  iiii:     null
};

support for html - aligning attributes in html tags

It would be great if aligner could align attributes like this:
from:

    <item class="item" name="Johnn" value="10">10. John</item>
    <item class="item selected" name="Barbara" value="198">198. Barbara</item>
    <item class="item active" name="Paul" value="0">0. Paul</item>

to:

    <item class="item"          name="Johnn"    value="10"    >10. John</item>
    <item class="item selected" name="Barbara"  value="123456">123,456. Barbara</item>
    <item class="item active"   name="Paul"     value="0"     >0. Paul</item>

'undefined' was appended on the comment line when align across comments

Hi, I've tried the 'Allow across comments' option, two problems:
(1) when the selection include a comment at the first line, the aligner doesn't work.
(2) the aligner appends some 'undefined' at the end of comment line.
ex:

        // URL parameter missing
        UrlParameterMissing: 0x10000000,
        UserIdMissing:       0x10000001,
        CarIdMissing:     0x10000002,
        // Body parameter missing
        BodyParameterMissing: 0x11000000,
        MobileMissing:        0x11000001,
        PasswordMissing:   0x11000002,
        OtpMissing:         0x11000003,
        EmailMissing:     0x11000004,
        BirthdayMissing:      0x11000005,
        // Bad format
        BadMobileFormat:      0x12000001,
        BadOtpFormat:         0x12000002,
        BadEmailFormat:       0x12000003,
        BadBirthdayFormat:    0x12000004,

result:

        // URL parameter missing
        UrlParameterMissing:  0x10000000,
        UserIdMissing:        0x10000001,
        CarIdMissing:         0x10000002,
        // Body parameter missingundefined 
        BodyParameterMissing: 0x11000000,
        MobileMissing:        0x11000001,
        PasswordMissing:      0x11000002,
        OtpMissing:           0x11000003,
        EmailMissing:         0x11000004,
        BirthdayMissing:      0x11000005,
        // Bad formatundefined        
        BadMobileFormat:      0x12000001,
        BadOtpFormat:         0x12000002,
        BadEmailFormat:       0x12000003,
        BadBirthdayFormat:    0x12000004,

Aligning React Props

This used to work, but it recently broke for some reason:

Before:

<TableRow
    store = {store}
    columns = {columns} />

After:

<TableRow
    store   = {store}
    columns = {columns} />

WorkspaceView.getActivePaneItem is deprecated.

Use Workspace::getActivePaneItem instead

WorkspaceView.getActivePaneItem (/Applications/Atom.app/Contents/Resources/app/src/workspace-view.js:564:7)
HTMLDivElement.<anonymous> (/Users/adrian/.atom/packages/vertical-align/lib/vertical-align.coffee:69:37)
HTMLDivElement.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4676:9)
HTMLDivElement.elemData.handle (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4360:46)
KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:402:14)
KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:181:22)
HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:142:20)

Doesn't support ruby 1.9 hashes + CSS?

Hey guys, firstly, thank you for an awesome plugin! Secondly, thought I'll report an issue.

Apparently it doesn't work in ruby 1.9 syntax hashes. Which is a bit of a bummer. Try something like this

stuff = {
  oh: 1,
  noooo: 2
}

Shouldn't be too hard to support, i mean, it's practically the same as the javascript hashes.

Also, a feature request, can you make CSS/LESS work as well?

Thanks!

Failed to activate the aligner-php package

  1. Deactivate and activate aligner-php package

Atom Version: 1.2.4
System: Windows 7
Thrown From: aligner package, v0.17.2

Stack Trace

Failed to activate the aligner-php package

At aligner-php has already been activated

Error: aligner-php has already been activated
    at Error (native)
    at OperationConfig.add (D:\Users\%username%\.atom\packages\aligner\lib\operator-config.coffee:33:13)
    at ProviderManager.register (D:\Users\%username%\.atom\packages\aligner\lib\provider-manager.coffee:10:37)
    at Aligner.registerProviders (D:\Users\%username%\.atom\packages\aligner\lib\main.coffee:66:38)
    at Provider.module.exports.Provider.provide (C:\Users\%username%\AppData\Local\atom\app-1.2.4\resources\app.asar\node_modules\service-hub\lib\provider.js:30:52)
    at ServiceHub.module.exports.ServiceHub.provide (C:\Users\%username%\AppData\Local\atom\app-1.2.4\resources\app.asar\node_modules\service-hub\lib\service-hub.js:30:20)
    at Package.module.exports.Package.activateServices (C:\Users\%username%\AppData\Local\atom\app-1.2.4\resources\app.asar\src\package.js:330:71)
    at Package.module.exports.Package.activateNow (C:\Users\%username%\AppData\Local\atom\app-1.2.4\resources\app.asar\src\package.js:173:16)
    at C:\Users\%username%\AppData\Local\atom\app-1.2.4\resources\app.asar\src\package.js:150:32
    at Package.module.exports.Package.measure (C:\Users\%username%\AppData\Local\atom\app-1.2.4\resources\app.asar\src\package.js:92:15)
    at C:\Users\%username%\AppData\Local\atom\app-1.2.4\resources\app.asar\src\package.js:143:26
    at Package.module.exports.Package.activate (C:\Users\%username%\AppData\Local\atom\app-1.2.4\resources\app.asar\src\package.js:140:34)
    at PackageManager.module.exports.PackageManager.activatePackage (C:\Users\%username%\AppData\Local\atom\app-1.2.4\resources\app.asar\src\package-manager.js:512:21)
    at C:\Users\%username%\AppData\Local\atom\app-1.2.4\resources\app.asar\src\package-manager.js:333:19
    at C:\Users\%username%\AppData\Local\atom\app-1.2.4\resources\app.asar\src\config.js:588:20
    at Emitter.module.exports.Emitter.emit (C:\Users\%username%\AppData\Local\atom\app-1.2.4\resources\app.asar\node_modules\event-kit\lib\emitter.js:86:11)
    at Config.module.exports.Config.emitChangeEvent (C:\Users\%username%\AppData\Local\atom\app-1.2.4\resources\app.asar\src\config.js:773:29)
    at Config.module.exports.Config.setRawValue (C:\Users\%username%\AppData\Local\atom\app-1.2.4\resources\app.asar\src\config.js:565:19)
    at Config.module.exports.Config.set (C:\Users\%username%\AppData\Local\atom\app-1.2.4\resources\app.asar\src\config.js:226:14)
    at Config.module.exports.Config.removeAtKeyPath (C:\Users\%username%\AppData\Local\atom\app-1.2.4\resources\app.asar\src\config.js:343:12)
    at Package.module.exports.Package.enable (C:\Users\%username%\AppData\Local\atom\app-1.2.4\resources\app.asar\src\package.js:77:26)
    at PackageManager.module.exports.PackageManager.enablePackage (C:\Users\%username%\AppData\Local\atom\app-1.2.4\resources\app.asar\src\package-manager.js:162:14)
    at HTMLButtonElement.<anonymous> (C:\Users\%username%\AppData\Local\atom\app-1.2.4\resources\app.asar\node_modules\settings-view\lib\package-card.js:314:27)
    at HTMLButtonElement.jQuery.event.dispatch (C:\Users\%username%\AppData\Local\atom\app-1.2.4\resources\app.asar\node_modules\jquery\dist\jquery.js:4435:9)
    at HTMLButtonElement.elemData.handle (C:\Users\%username%\AppData\Local\atom\app-1.2.4\resources\app.asar\node_modules\jquery\dist\jquery.js:4121:28)

Commands

     -2:39.3.0 editor-stats:toggle (atom-workspace.workspace.scrollbars-visible-always)
     -0:29.4.0 window:toggle-dev-tools (atom-text-editor.editor.mini.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "autocomplete-emojis",
      "metrics",
      "package-cop",
      "markdown-table-formatter",
      "tree-view-breadcrumb"
    ],
    "themes": [
      "atom-dark-ui",
      "one-dark-syntax"
    ]
  }
}

Installed Packages

# User
aligner, v0.17.2
aligner-php, v1.0.0
aligner-scss, v1.1.0
[...]

# Dev
No dev packages

Support for tabs

Currently, any leading tabs are converted into spaces when the aligner is activated.

        a = 1
        b = 2
        c = 3


    a = 1
    b = 2
    c = 3

Bug? All my spaces are replaced with "ยท"

I'm not sure what has happened, when I first got this plugin it was working amazingly.... so ๐Ÿ‘ for that! However, for some reason it started also replacing all the spaces on the lines it aligned with "ยท" (Middle Dots).

I'm wondering if anyone has seen this before.

Anyway, I haven't dug in to find out why, but it is preventing me from using the plugin for now. If I find some time in the future I'll see if I can debug it more.

Thanks!

allow for aligning comments

Well done on the package, but there is one thing that seems missing. Being able to align comments together similarly to how variables are aligned.

From this:

var Apple      = require('apple'), // this is an apple
    Banana     = require('banana'), // this is a banana
    Grapefruit = require('grapefruit'); // grapefruit is best fruit

to something like this:

var Apple      = require('apple'),      // this is an apple
    Banana     = require('banana'),     // this is a banana
    Grapefruit = require('grapefruit'); // grapefruit is best fruit

Uncaught Error: Aligner: aligner-php has already been activated

[Enter steps to reproduce below:]

  1. ... install update
  2. ...

Atom Version: 1.0.19
System: Ubuntu 14.04.3
Thrown From: aligner package, v0.17.0

Stack Trace

Uncaught Error: Aligner: aligner-php has already been activated

At /home/christoph/.atom/packages/aligner/lib/provider-manager.coffee:5

Error: Aligner: aligner-php has already been activated
    at Error (native)
    at ProviderManager.register (/home/christoph/.atom/packages/aligner/lib/provider-manager.coffee:5:13)
    at Aligner.registerProviders (/home/christoph/.atom/packages/aligner/lib/main.coffee:49:77)
    at Provider.module.exports.Provider.provide (/opt/atom/resources/app.asar/node_modules/service-hub/lib/provider.js:30:52)
    at /opt/atom/resources/app.asar/node_modules/service-hub/lib/service-hub.js:55:26
    at doNTCallback0 (node.js:416:9)
    at process._tickCallback (node.js:345:13)

Commands

     -9:22.1.0 aligner:align (atom-text-editor.editor.is-focused)
     -9:13.4.0 core:save (atom-text-editor.editor.is-focused)
     -7:34.1.0 find-and-replace:show (atom-text-editor.editor.is-focused)
     -7:31.3.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -7:30.3.0 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
     -7:30.2.0 core:cancel (atom-text-editor.editor.mini.is-focused)
     -7:30 editor:consolidate-selections (atom-text-editor.editor.is-focused)
     -7:30 core:cancel (atom-text-editor.editor.is-focused)
     -7:29.9.0 editor:consolidate-selections (atom-text-editor.editor.is-focused)
     -7:29.9.0 core:cancel (atom-text-editor.editor.is-focused)
     -7:07.4.0 core:select-right (atom-text-editor.editor.is-focused)
     -0:14.4.0 settings-view:check-for-package-updates (atom-workspace.workspace.scrollbars-visible-always.theme-atom-monokai.theme-one-dark-ui)

Config

{
  "core": {
    "themes": [
      "one-dark-ui",
      "atom-monokai"
    ]
  }
}

Installed Packages

# User
aligner, v0.17.0
aligner-php, v1.0.0
aligner-puppet, v0.1.1
atom-monokai, v0.9.2
language-puppet, v0.14.0
save-session, v0.15.7

# Dev
No dev packages

Uncaught Error: Tried to create a gutter with a name that is already in use.

[Enter steps to reproduce below:]

  1. open a file, have at least two panes open
  2. drag one open file from one pane to the other

Atom Version: 1.0.19
System: Microsoft Windows 8.1 Pro
Thrown From: aligner package, v0.17.0

Stack Trace

Uncaught Error: Tried to create a gutter with a name that is already in use.

At C:\Users\sztanpet\AppData\Local\atom\app-1.0.19\resources\app.asar\src\gutter-container.js:36

Error: Tried to create a gutter with a name that is already in use.
  at GutterContainer.module.exports.GutterContainer.addGutter (C:\Users\sztanpet\AppData\Local\atom\app-1.0.19\resources\app.asar\src\gutter-container.js:36:15)
  at TextEditor.module.exports.TextEditor.addGutter (C:\Users\sztanpet\AppData\Local\atom\app-1.0.19\resources\app.asar\src\text-editor.js:2613:35)
  at EditorLinter.addGutter (f:\dropbox\atomsettings\packages\linter\lib\editor-linter.js:106:33)
  at EditorLinter.handleGutter (f:\dropbox\atomsettings\packages\linter\lib\editor-linter.js:99:14)
  at f:\dropbox\atomsettings\packages\linter\lib\editor-linter.js:50:13
  at Config.module.exports.Config.observeKeyPath (C:\Users\sztanpet\AppData\Local\atom\app-1.0.19\resources\app.asar\src\config.js:568:7)
  at Config.module.exports.Config.observe (C:\Users\sztanpet\AppData\Local\atom\app-1.0.19\resources\app.asar\src\config.js:135:21)
  at new EditorLinter (f:\dropbox\atomsettings\packages\linter\lib\editor-linter.js:48:40)
  at EditorRegistry.create (f:\dropbox\atomsettings\packages\linter\lib\editor-registry.coffee:13:24)
  at Linter.createEditorLinter (f:\dropbox\atomsettings\packages\linter\lib\linter.coffee:80:5)
  at f:\dropbox\atomsettings\packages\linter\lib\linter.coffee:36:71
  at C:\Users\sztanpet\AppData\Local\atom\app-1.0.19\resources\app.asar\src\workspace.js:281:16
  at C:\Users\sztanpet\AppData\Local\atom\app-1.0.19\resources\app.asar\src\workspace.js:342:18
  at Emitter.module.exports.Emitter.emit (C:\Users\sztanpet\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\event-kit\lib\emitter.js:82:11)
  at PaneContainer.module.exports.PaneContainer.addedPaneItem (C:\Users\sztanpet\AppData\Local\atom\app-1.0.19\resources\app.asar\src\pane-container.js:352:27)
  at C:\Users\sztanpet\AppData\Local\atom\app-1.0.19\resources\app.asar\src\pane-container.js:339:26
  at Emitter.module.exports.Emitter.emit (C:\Users\sztanpet\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\event-kit\lib\emitter.js:82:11)
  at Pane.module.exports.Pane.addItem (C:\Users\sztanpet\AppData\Local\atom\app-1.0.19\resources\app.asar\src\pane.js:345:20)
  at Pane.module.exports.Pane.moveItemToPane (C:\Users\sztanpet\AppData\Local\atom\app-1.0.19\resources\app.asar\src\pane.js:439:19)
  at TabBarView.module.exports.TabBarView.moveItemBetweenPanes (C:\Users\sztanpet\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\tabs\lib\tab-bar-view.js:706:20)
  at TabBarView.module.exports.TabBarView.onDrop (C:\Users\sztanpet\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\tabs\lib\tab-bar-view.js:632:23)
  at space-pen-ul.<anonymous> (C:\Users\sztanpet\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\tabs\lib\tab-bar-view.js:3:61)
  at space-pen-ul.jQuery.event.dispatch (C:\Users\sztanpet\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\jquery\dist\jquery.js:4435:9)
  at space-pen-ul.elemData.handle (C:\Users\sztanpet\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\jquery\dist\jquery.js:4121:28)

Commands

     -6:29.8.0 find-and-replace:show (atom-text-editor.editor.is-focused)
     -6:28 core:confirm (atom-text-editor.editor.mini.is-focused)
 17x -6:17.5.0 find-and-replace:find-next (atom-text-editor.editor.is-focused)
     -5:50 core:close (atom-text-editor.editor.is-focused)
     -5:46.1.0 core:save (atom-text-editor.editor.is-focused)
  3x -5:44.6.0 core:move-down (atom-text-editor.editor.is-focused)
     -5:39.3.0 core:backspace (atom-text-editor.editor.is-focused)
     -5:39 core:save (atom-text-editor.editor.is-focused)
  6x -3:54.1.0 find-and-replace:find-next (atom-text-editor.editor.is-focused)
     -3:36.4.0 core:close (atom-text-editor.editor.is-focused)
 12x -3:28.9.0 find-and-replace:find-next (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "solarized-dark-syntax"
    ],
    "projectHome": "F:\\Dropbox\\atomprojects",
    "excludeVcsIgnoredPaths": false,
    "disabledPackages": [
      "line-ending-selector",
      "language-clojure",
      "language-coffee-script",
      "language-csharp",
      "language-objective-c",
      "language-perl",
      "language-ruby",
      "language-ruby-on-rails",
      "open-on-github"
    ]
  }
}

Installed Packages

# User
aligner, v0.17.0
cursor-blink-interval, v0.3.1
go-plus, v3.5.1
go-runtime, v0.2.0
line-ending-selector-unix, v0.0.9
linter, v1.8.1
linter-php, v1.0.5
linter-phpmd, v1.2.1
project-manager, v2.6.1
Sublime-Style-Column-Selection, v1.3.0

# Dev
No dev packages

Handle multi-line var assignments

Given input like this:

var Apple = require('apple'),
    Banana = require('banana'),
    Grapefruit = require('grapefruit');

The first item isn't properly lined up, like so:

var Apple = require('apple'),
    Banana     = require('banana'),
    Grapefruit = require('grapefruit');

I would expect this:

var Apple      = require('apple'),
    Banana     = require('banana'),
    Grapefruit = require('grapefruit');

Name of package is misleading

"Vertical align" is a confusing name for this package. Vertical alignment, at least in the context of web development, means you are aligning things vertically along the y-axis. For example, these boxes are aligned vertically:

                       _________
      _________       |         |
  ---|---------|------|---------|---
      ยฏยฏยฏยฏยฏยฏยฏยฏยฏ       |         |
                       ยฏยฏยฏยฏยฏยฏยฏยฏยฏ

One replacement name suggestion might be "Aligner"

Uncaught TypeError: Cannot read property 'forEach' of undefined

[Enter steps to reproduce below:]

  1. Open a tab in a second pane. (in my case the markdown preview)
  2. Close it.

Atom Version: 1.4.1
System: Windows 7 x64
Thrown From: aligner package, v0.18.1

Stack Trace

Uncaught TypeError: Cannot read property 'forEach' of undefined

At C:\Users\%username%\AppData\Local\atom\app-1.4.1\resources\app.asar\node_modules\event-kit\lib\composite-disposable.js:24

TypeError: Cannot read property 'forEach' of undefined
    at module.exports.CompositeDisposable.dispose (C:\Users\%username%\AppData\Local\atom\app-1.4.1\resources\app.asar\node_modules\event-kit\lib\composite-disposable.js:24:25)
    at Function.module.exports.Emitter.simpleDispatch (C:\Users\%username%\AppData\Local\atom\app-1.4.1\resources\app.asar\node_modules\event-kit\lib\emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (C:\Users\%username%\AppData\Local\atom\app-1.4.1\resources\app.asar\node_modules\event-kit\lib\emitter.js:125:28)
    at Pane.module.exports.Pane.destroyed (C:\Users\%username%\AppData\Local\atom\app-1.4.1\resources\app.asar\src\pane.js:648:20)
    at Pane.module.exports.Model.destroy (C:\Users\%username%\AppData\Local\atom\app-1.4.1\resources\app.asar\src\model.js:31:58)
    at Pane.module.exports.Pane.destroy (C:\Users\%username%\AppData\Local\atom\app-1.4.1\resources\app.asar\src\pane.js:639:39)
    at Pane.module.exports.Pane.removeItem (C:\Users\%username%\AppData\Local\atom\app-1.4.1\resources\app.asar\src\pane.js:411:21)
    at Pane.module.exports.Pane.destroyItem (C:\Users\%username%\AppData\Local\atom\app-1.4.1\resources\app.asar\src\pane.js:453:16)
    at atom-tabs.TabBarView.onClick (C:\Users\%username%\AppData\Local\atom\app-1.4.1\resources\app.asar\node_modules\tabs\lib\tab-bar-view.js:695:17)

Commands

     -0:57 editor-stats:toggle (atom-workspace.workspace.scrollbars-visible-always)
     -0:14.3.0 command-palette:toggle (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
     -0:12.5.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -0:12.3.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:12.3.0 markdown-preview:toggle (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)

Config

{
  "core": {
    "disabledPackages": [
      "autocomplete-emojis",
      "metrics",
      "tree-view-background",
      "markdown-table-formatter",
      "atom-beautify",
      "linter-js-standard",
      "linter-flake8",
      "tree-view-breadcrumb",
      "copy-paste",
      "linter-jsonlint",
      "line-diff-details",
      "atom-autocomplete-php",
      "php-class-tree",
      "markdown-preview-opener"
    ],
    "packagesWithKeymapsDisabled": [
      "regex-railroad-diagram"
    ],
    "themes": [
      "atom-dark-ui",
      "one-dark-syntax"
    ]
  }
}

Installed Packages

# User
aligner, v0.18.1
aligner-php, v1.0.0
aligner-python, v1.0.1
aligner-scss, v1.1.0
atom-html-preview, v0.1.13
autoclose-html, v0.20.0
autocomplete-paths, v1.0.2
autocomplete-php, v0.3.7
autocomplete-python, v1.5.1
autocomplete-xml, v0.8.1
autohide-tree-view, v0.25.1
color-picker, v2.1.1
docblock-format-helper, v0.3.0
docs-snippets, v0.8.0
editor-stats, v0.17.0
emmet, v2.4.1
figlet, v0.5.3
file-icons, v1.6.14
foldername-tabs, v0.1.8
highlight-column, v0.5.0
highlight-selected, v0.11.1
keyboard-localization, v1.4.14
language-apache, v1.4.0
language-autoit, v0.2.1
language-batch, v0.3.3
language-ini, v1.14.0
language-nginx, v0.6.1
language-pascal, v0.17.0
language-patch, v0.1.0
line-count-status, v0.0.3
linter, v1.11.3
linter-alex, v1.7.0
linter-eslint, v6.0.0
linter-htmlhint, v1.0.2
linter-pep8, v1.2.1
linter-php, v1.1.7
linter-phpmd, v1.4.1
linter-pylama, v0.2.6
linter-tidy, v2.1.0
markdown-scroll-sync, v2.0.3
minimap, v4.19.0
minimap-bookmarks, v0.2.0
minimap-codeglance, v0.4.5
minimap-cursorline, v0.1.0
minimap-find-and-replace, v4.4.0
minimap-git-diff, v4.1.8
minimap-highlight-selected, v4.3.1
minimap-linter, v1.1.1
minimap-pigments, v0.1.7
minimap-selection, v4.3.1
minimap-split-diff, v0.3.0
opened-files, v0.2.8
package-cop, v0.2.10
php-cs-fixer, v2.5.2
php-debug, v0.2.1
pigments, v0.22.1
pretty-json, v0.4.1
python-isort, v0.0.7
python-tools, v0.6.7
python-yapf, v0.9.1
regex-railroad-diagram, v0.11.0
switcheroo, v1.1.0
tablr, v0.10.0
tabs-to-spaces, v1.0.1
tidy-markdown, v1.0.0

# Dev
No dev packages

[Enter steps to reproduce below:]

  1. Open a tab in a second pane. (in my case the markdown preview)
  2. Close it.

Atom Version: 1.4.1
System: Windows 7 x64
Thrown From: aligner package, v0.18.1

Stack Trace

Uncaught TypeError: Cannot read property 'forEach' of undefined

At C:\Users\%username%\AppData\Local\atom\app-1.4.1\resources\app.asar\node_modules\event-kit\lib\composite-disposable.js:24

TypeError: Cannot read property 'forEach' of undefined
    at module.exports.CompositeDisposable.dispose (C:\Users\%username%\AppData\Local\atom\app-1.4.1\resources\app.asar\node_modules\event-kit\lib\composite-disposable.js:24:25)
    at Function.module.exports.Emitter.simpleDispatch (C:\Users\%username%\AppData\Local\atom\app-1.4.1\resources\app.asar\node_modules\event-kit\lib\emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (C:\Users\%username%\AppData\Local\atom\app-1.4.1\resources\app.asar\node_modules\event-kit\lib\emitter.js:125:28)
    at Pane.module.exports.Pane.destroyed (C:\Users\%username%\AppData\Local\atom\app-1.4.1\resources\app.asar\src\pane.js:648:20)
    at Pane.module.exports.Model.destroy (C:\Users\%username%\AppData\Local\atom\app-1.4.1\resources\app.asar\src\model.js:31:58)
    at Pane.module.exports.Pane.destroy (C:\Users\%username%\AppData\Local\atom\app-1.4.1\resources\app.asar\src\pane.js:639:39)
    at Pane.module.exports.Pane.removeItem (C:\Users\%username%\AppData\Local\atom\app-1.4.1\resources\app.asar\src\pane.js:411:21)
    at Pane.module.exports.Pane.destroyItem (C:\Users\%username%\AppData\Local\atom\app-1.4.1\resources\app.asar\src\pane.js:453:16)
    at atom-tabs.TabBarView.onClick (C:\Users\%username%\AppData\Local\atom\app-1.4.1\resources\app.asar\node_modules\tabs\lib\tab-bar-view.js:695:17)

Commands

     -0:57 editor-stats:toggle (atom-workspace.workspace.scrollbars-visible-always)
     -0:14.3.0 command-palette:toggle (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
     -0:12.5.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -0:12.3.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:12.3.0 markdown-preview:toggle (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)

Config

{
  "core": {
    "disabledPackages": [
      "autocomplete-emojis",
      "metrics",
      "tree-view-background",
      "markdown-table-formatter",
      "atom-beautify",
      "linter-js-standard",
      "linter-flake8",
      "tree-view-breadcrumb",
      "copy-paste",
      "linter-jsonlint",
      "line-diff-details",
      "atom-autocomplete-php",
      "php-class-tree",
      "markdown-preview-opener"
    ],
    "packagesWithKeymapsDisabled": [
      "regex-railroad-diagram"
    ],
    "themes": [
      "atom-dark-ui",
      "one-dark-syntax"
    ]
  }
}

Installed Packages

# User
[...]

# Dev
No dev packages

Aligning object keys differently

I'd like to see an option to align objects keys like so:

var foo = {
    test    : 1,
    testing : 2
}

Instead of

var foo = {
    test:    1,
    testing: 2
}

Also, note that there is always at least 1 space before the colons. I would think this could pretty much copy the exact logic used for "="

How to specify `multiple` in a language plugin?

I'm trying to write an Aligner plugin for Gherkin. I would like to specify multiple as a property of the | character. However, because multiple seems to have to be a nested object rather than a simple string, every method I can think of fails, as follows:

1. Specify object within provider.coffee

# lib/provider.coffee
module.exports =
  config:
    '|-multiple':
      type: 'object'
      default:
        number:
          alignment: 'left'
        string:
          alignment: 'right'

Result: appears to display correctly on package settings screen, but operatorConfig.getConfig('|', '.text.gherkin.feature').multiple is {number: {}, string: {}}. Also, settings don't appear to save to ~/.atom/config.cson properly. Perhaps this is an Atom bug?

2. Use multiply hyphenated keys in provider.coffee

# lib/provider.coffee
module.exports =
  config:
    '|-multiple-number-alignment':
      type: 'string'
      default: 'left'
    '|-multiple-string-alignment':
      type: 'string'
      default: 'right'

Result: operatorConfig.getConfig('|', '.text.gherkin.feature').multiple is just the string right. Apparently Aligner, when splitting keys, discards everything after the second hyphen, so both of these keys are equivalent to |-multiple. I can try to submit a pull request to implement smarter splitting, if that seems like the right solution.

3. Specify object in package's config.cson file

This is actually the preferable choice for me, because the multiple option really shouldn't be user-configurable for my use case. Now if only I could get it to work!

# config.cson
setting:
  '|':
    multiple:
      number:
        alignment: 'left'
      string:
        alignment: 'right'

Result: This appears to be entirely ineffective (and likewise when I do the equivalent thing in JSON).

As you might imagine, I'm at my wits' end. What should I do here? Should I patch Atom or Aligner so that one of these works? @adrianlee44 Do you have any thoughts on which of these three methods is most compatible with Aligner's architecture?

I'm using Atom 0.188.0 on Mac OS X 10.10.

First line unnecessary tabulations

Hi !

I just noticed that when the alignment is done, the first one is not aligned with the others.

capture d ecran 2015-09-22 a 14 49 08

This is not a JavaScript specific issue.

I don't recall having this problem last month.

CSS/LESS selector with double-colon...

Selectors that require two colons (see example below) are improperly split apart. The second colon is incorrectly aligned with the rest of the css properties. The extra whitespace will break the LESS compiler. Specifically, this happens in LESS documents (.less). Thank you! :)

For example:

atom-text-editor::shadow .cursor {
}

Becomes this after applying Aligner:

atom-text-editor: (((((unintended blank white space here))))) :shadow .cursor {
}

Uncaught TypeError: path.extname is not a function

[Enter steps to reproduce below:]

  1. Go to the settings of a package with keybindings.
  2. At the keybindings, click on the 'copy' icon

Atom Version: 1.0.15
System: Windows 7
Thrown From: aligner package, v0.16.1

Stack Trace

Uncaught TypeError: path.extname is not a function

At C:\Users\%username%\AppData\Local\atom\app-1.0.15\resources\app.asar\node_modules\settings-view\lib\package-keymap-view.js:147

TypeError: path.extname is not a function
  at PackageKeymapView.module.exports.PackageKeymapView.writeKeyBindingToClipboard (C:\Users\%username%\AppData\Local\atom\app-1.0.15\resources\app.asar\node_modules\settings-view\lib\package-keymap-view.js:147:30)
  at HTMLSpanElement.<anonymous> (C:\Users\%username%\AppData\Local\atom\app-1.0.15\resources\app.asar\node_modules\settings-view\lib\package-keymap-view.js:139:24)
  at space-pen-section.jQuery.event.dispatch (C:\Users\%username%\AppData\Local\atom\app-1.0.15\resources\app.asar\node_modules\jquery\dist\jquery.js:4435:9)
  at space-pen-section.elemData.handle (C:\Users\%username%\AppData\Local\atom\app-1.0.15\resources\app.asar\node_modules\jquery\dist\jquery.js:4121:28)

Commands

     -1:59.2.0 editor:duplicate-lines (atom-text-editor.editor.is-focused)
     -1:57.7.0 editor:newline (atom-text-editor.editor.is-focused)
     -1:43.8.0 core:paste (atom-text-editor.editor.is-focused)
  3x -1:37.9.0 pane:show-next-item (atom-text-editor.editor.is-focused)
     -1:31.7.0 core:move-right (atom-text-editor.editor.is-focused.autocomplete-active)
     -1:31.2.0 core:delete (atom-text-editor.editor.is-focused)
     -1:29.1.0 core:save (atom-text-editor.editor.is-focused)
  5x -1:26.4.0 tree-view:toggle (atom-text-editor.editor.is-focused)
  4x -1:21.9.0 pane:show-next-item (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
     -0:46.9.0 core:save (atom-text-editor.editor.is-focused)
  3x -0:44.5.0 pane:show-next-item (atom-text-editor.editor.is-focused)
     -0:24.7.0 core:save (atom-text-editor.editor.is-focused)
  2x -0:23.8.0 core:redo (atom-text-editor.editor.is-focused)
     -0:22.6.0 core:save (atom-text-editor.editor.is-focused)
  2x -0:21.3.0 core:redo (div.settings-view.pane-item)
     -0:19.4.0 core:backspace (atom-text-editor.editor.mini.is-focused)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "one-dark-syntax"
    ],
    "projectHome": "D:\\Users\\%username%\\GitHub",
    "disabledPackages": [
      "autocomplete-emojis",
      "metrics"
    ],
    "packagesWithKeymapsDisabled": []
  }
}

Installed Packages

# User
aligner, v0.16.1
aligner-php, v1.0.0
aligner-scss, v1.1.0
[...]

# Dev
No dev packages

Old style Ruby hashes

Starting:

          :full_detail_url => fd_url,
          :chars_trad => chars_trad,
          :jyutping   => jyutping,
          :pinyin     => pinyin,
          :english    => english,
          :usage      => usage,

Results in (also loses indentation):

: full_detail_url => fd_url,
: chars_trad => chars_trad,
: jyutping   => jyutping,
: pinyin     => pinyin,
: english    => english,
: usage      => usage,

Thanks for all that you do with this plugin.

Aligner doesn't work in some cases with multi-block across comments

Hi, I had tried 0.15.0, here I still found some issues.
I'm not sure if there're same issue.

case 1 (not aligned yet)

    // comment 1
    x: 1,
    yyyy: 2,
    zz:3,

    // comment 2
    aaa: 4,
    bbbbbbbb:5,
    ccccc:6,

    // comment 3
    ddddd: 7,
    e:8,
    ff:9,

As you can see, there're 3 blocks, the aligner works if I align each block separately, but:
a. If I select from first line to the last line and press ctrl-cmd-/, only last block get aligned.
b. If I select from last line to the first line and press ctrl-cmd-/, nothing get aligned.

case 2 (already aligned)

    ggg:      0,
    g:        1,

    // comment 1
    x:        1,
    yyyy:     2,
    zz:       3,

    // comment 2
    aaa:      4,
    bbbbbbbb: 5,
    ccccc:    6,

    // comment 3
    ddddd:    7,
    e:        8,
    ff:       9,

In this case, the last block will be aligned itself.
That is, if I select from first line to the last line, I get:

    ggg:      0,
    g:        1,

    // comment 1
    x:        1,
    yyyy:     2,
    zz:       3,

    // comment 2
    aaa:      4,
    bbbbbbbb: 5,
    ccccc:    6,

    // comment 3
    ddddd: 7,
    e:     8,
    ff:    9,

Conversely, if I start select from the last line, I get:

    ggg: 0,
    g:   1,

    // comment 1
    x:        1,
    yyyy:     2,
    zz:       3,

    // comment 2
    aaa:      4,
    bbbbbbbb: 5,
    ccccc:    6,

    // comment 3
    ddddd:    7,
    e:        8,
    ff:       9,

Here are my environment:
MAC OS X: 10.10.4
Atom: 1.0.7

Failed to load the aligner package

On Atom startup, I'm getting:

Atom Version: 1.1.0
System: Mac OS X 10.11.3
Thrown From: aligner package, v0.19.0

Stack Trace

Failed to load the aligner package

At /Users/kstone/.atom/packages/aligner/lib/formatter.js:28
    range.getRows().forEach((currentRow) => {
                                       ^
missing ) after argument list

/Users/kstone/.atom/packages/aligner/lib/formatter.js:28
    range.getRows().forEach((currentRow) => {
                                       ^
SyntaxError: missing ) after argument list
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:411:25)
    at Object.defineProperty.value [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:169:21)
    at Module.load (module.js:353:32)
    at Function.Module._load (module.js:308:12)
    at Module.require (module.js:363:17)
    at require (module.js:382:17)
    at Object.<anonymous> (/Users/kstone/.atom/packages/aligner/lib/main.coffee:4:19)
    at Object.<anonymous> (/Users/kstone/.atom/packages/aligner/lib/main.coffee:1:1)
    at Module._compile (module.js:428:26)

Commands

Config

{
  "core": {
    "projectHome": "/Users/kstone/Documents",
    "themes": [
      "seti-ui",
      "seti-syntax"
    ],
    "disabledPackages": [
      "tree-view",
      "deprecation-cop",
      "fuzzy-finder",
      "metrics",
      "styleguide",
      "timecop",
      "fb-analytics-client",
      "emmet",
      "background-tips",
      "nuclide-language-hack"
    ]
  }
}

Installed Packages

# User
aligner, v0.19.0
aligner-php, v1.0.0
aligner-python, v1.0.1
auto-detect-indentation, v0.4.2
auto-update-packages, v1.0.0
autocomplete-python, v1.6.1
docblockr, v0.7.3
editorconfig, v1.2.4
haskell-grammar, v0.4.0
highlight-selected, v0.11.2
language-babel, v2.15.4
language-ini, v1.14.0
language-restructuredtext, v0.12.0
language-thrift, v1.0.2
minimap, v4.19.0
minimap-highlight-selected, v4.3.1
nuclide, v0.116.22040344
pigments, v0.24.1
project-manager, v2.7.5
seti-syntax, v0.4.1
seti-ui, v0.8.1
ssh-config, v0.10.1
tab-control, v0.6.9
tool-bar, v0.2.0
word-jumper, v0.3.0

# Dev
No dev packages

Uncaught Error: Aligner: aligner-ruby has already been activated

  1. Update to last version

Fail when updating, but update seems success

Atom Version: 1.0.19
System: Mac OS X 10.9.5
Thrown From: aligner package, v0.17.0

Stack Trace

Uncaught Error: Aligner: aligner-ruby has already been activated

At /Users/admin/.atom/packages/aligner/lib/provider-manager.coffee:5

Error: Aligner: aligner-ruby has already been activated
  at Error (native)
  at ProviderManager.register (/Users/admin/.atom/packages/aligner/lib/provider-manager.coffee:5:13)
  at Aligner.registerProviders (/Users/admin/.atom/packages/aligner/lib/main.coffee:49:77)
  at Provider.module.exports.Provider.provide (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/service-hub/lib/provider.js:30:52)
  at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/service-hub/lib/service-hub.js:55:26
  at doNTCallback0 (node.js:416:9)
  at process._tickCallback (node.js:345:13)

Commands

     -3:38.9.0 command-palette:toggle (atom-text-editor.editor.is-focused)
     -3:36.8.0 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
     -3:36.8.0 core:cancel (atom-text-editor.editor.mini.is-focused)
     -3:28.9.0 fuzzy-finder:toggle-file-finder (atom-text-editor.editor.is-focused)
     -3:28 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
     -3:28 core:cancel (atom-text-editor.editor.mini.is-focused)
     -3:22.8.0 command-palette:toggle (atom-text-editor.editor.is-focused)
  2x -3:15.2.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -3:14.3.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -3:14.3.0 settings-view:install-packages-and-themes (atom-text-editor.editor)
     -3:09.7.0 core:confirm (atom-text-editor.editor.mini.is-focused)
  3x -2:39.9.0 encoding-selector:show (atom-text-editor.editor)
     -0:20.4.0 settings-view:check-for-package-updates (atom-workspace.workspace.scrollbars-visible-always.theme-atom-dark-syntax.theme-atom-dark-ui)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "atom-dark-syntax"
    ],
    "destroyEmptyPanes": false,
    "disabledPackages": [
      "rails-snippets",
      "editor-background",
      "linter-ruby"
    ]
  }
}

Installed Packages

# User
aligner, v0.17.0
aligner-ruby, v1.4.0
aligner-scss, v1.1.0
atomatigit, v1.5.4
color-picker, v2.0.12
duplicate-line-or-selection, v0.5.0
highlight-selected, v0.10.1
language-asp, v1.0.0
language-diff, v0.3.1
minimap, v4.13.4
pigments, v0.15.0
project-manager, v2.6.1
rails-i18n, v0.1.3
recent-projects, v0.8.8
ruby-block, v0.3.5
ruby-slim, v0.2.0
tree-view-open-files, v0.2.4

# Dev
No dev packages

Uncaught Error: Aligner: Package has already been activated

[Enter steps to reproduce below:]

  1. Installing latest update
  2. In my case I went to a php file
  3. Ctrl+Shift+P and select align there.

Atom Version: 1.0.11
System: Windows 7
Thrown From: aligner package, v0.16.0

Stack Trace

Uncaught Error: Aligner: Package has already been activated

At C:\Users\%username%\.atom\packages\aligner\lib\provider-manager.coffee:19

Error: Aligner: Package has already been activated
  at Error (native)
  at ProviderManager.register (C:\Users\%username%\.atom\packages\aligner\lib\provider-manager.coffee:13:13)
  at Aligner.registerProviders (C:\Users\%username%\.atom\packages\aligner\lib\main.coffee:1:1)
  at Provider.module.exports.Provider.provide (C:\Users\%username%\AppData\Local\atom\app-1.0.11\resources\app.asar\node_modules\service-hub\lib\provider.js:30:52)
  at C:\Users\%username%\AppData\Local\atom\app-1.0.11\resources\app.asar\node_modules\service-hub\lib\service-hub.js:55:26
  at process._tickCallback (node.js:357:13)

Commands

     -4:50.1.0 editor-stats:toggle (atom-workspace.workspace.scrollbars-visible-always)
     -3:27.2.0 settings-view:check-for-package-updates (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-atom-dark-ui)
     -0:28.7.0 core:backspace (input.hidden-input)
     -0:11.5.0 editor:copy-path (input.hidden-input)
     -0:10.5.0 command-palette:toggle (input.hidden-input)
     -0:08.6.0 core:confirm (input.hidden-input)
     -0:08.6.0 aligner:align (input.hidden-input)

Config

{
  "core": {
    "projectHome": "D:\\Users\\%username%\\GitHub",
    "disabledPackages": [
      "metrics",
      "autocomplete-emojis",
      "highlight-column",
      "tab-rename",
      "character-table",
      "placeholder-text"
    ],
    "themes": [
      "atom-dark-ui",
      "one-dark-syntax"
    ]
  }
}

Installed Packages

# User
aligner, v0.16.0
aligner-php, v1.0.0
[...]

# Dev
No dev packages

line messed with "="

Great package !
However I have this

var connect = require('gulp-connect');
var coffee = require('gulp-coffee');

transformed in

var conn =  = require('gulp-connect');
var cof  =  = require('gulp-coffee');

Cannot align across multilines with comment

Hello,

Thanks for the awesome work, it's very useful for me to beautify codes.
I would like to suggest an enhancement if possible. If I have few lines like

var something = {
  // URL parameter missing
  UrlParameterMissing: 0x10000000,
  UserIdMissing: 0x10000001,
  CarIdMissing: 0x10000002,
  // Body parameter missing
  BodyParameterMissing: 0x11000000,
  MobileMissing: 0x11000001,
  OtpMissing: 0x11000002,
  EmailMissing: 0x11000003,
  BirthdayMissing: 0x11000004,
  // Bad format
  BadMobileFormat: 0x12000001,
  BadOtpFormat: 0x12000002,
  BadEmailFormat: 0x12000003,
  BadBirthdayFormat: 0x12000004
}

The aligner seems couldn't work while I select line from the first comment (even the first property) to the last properties since some of the selected lines doesn't contain a colon symbol.

What I expect is:

var something = {
  // URL parameter missing
  UrlParameterMissing:  0x10000000,
  UserIdMissing:        0x10000001,
  CarIdMissing:         0x10000002,
  // Body parameter missing
  BodyParameterMissing: 0x11000000,
  MobileMissing:        0x11000001,
  OtpMissing:           0x11000002,
  EmailMissing:         0x11000003,
  BirthdayMissing:      0x11000004,
  // Bad format
  BadMobileFormat:      0x12000001,
  BadOtpFormat:         0x12000002,
  BadEmailFormat:       0x12000003,
  BadBirthdayFormat:    0x12000004,
}

I'm wondering if this could be enhanced in the future? Thanks!

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.