adrianlee44 / atom-aligner

Easily align multi-line with support for different operators and custom configurations
https://atom.io/packages/aligner
MIT License
78 stars 3 forks source link

different from file vue and file js #72

Closed semi-xi closed 7 years ago

semi-xi commented 7 years ago

a.vue

<template lang="html">
  <div class="">

  </div>
</template>

<script>
export default {
    data ()[
        return {
            a:  1,
            b    :2,
        }
    ]
}
</script>

<style lang="css">
</style>

when i select the text

{
     a :  1,
     b     :2,
}

and run the plugin ,it can't be what i want

{
        a : 1,
        b : 2
}

but if the same jsonin file js it can what i want.

//a.js
var c = {
    a         : 1,
    b :     2    
}
semi-xi commented 7 years ago

i remember the previous version is ok ,but ,when i update it's not work as i want

adrianlee44 commented 7 years ago

The updated version of aligner doesn't come with any language support. It seems like you have downloaded atom-aligner-javascript? Which language package are you using for Vue syntax highlight?

semi-xi commented 7 years ago

@adrianlee44
i use language-vuevue-autocompileandvue2-autocomplete. i check all my atom package and uninstall all the aligner package which name is indexOf 'aligner' .

after that i install atom-aligner,it let me install the dependent package aligner-javascript

adrianlee44 commented 7 years ago

Did downloading the latest version (v1.2.0) of aligner-javascript fix the issue for you?

semi-xi commented 7 years ago

@adrianlee44 the same as before, no working. Finally, no way, I decided to manually align -)

adrianlee44 commented 7 years ago

Hm... I just installed language-vue with the code sample you provided above and i was able to align

<script>
export default {
    data ()[
        return {
            a:  1,
            b    :2,
        }
    ]
}
</script>

to

<script>
export default {
    data ()[
        return {
            a: 1,
            b: 2,
        }
    ]
}
</script>

If you do apm list --packages, what shows up under "Community Packages"?

semi-xi commented 7 years ago

@adrianlee44 ORZ, it seems work,but i don't konw what happen. maybe some plugins conflict . i have no idea. but the result looks good :)

adrianlee44 commented 7 years ago

:) Good to hear! Going to close this for now. Let me know if you are still experiencing issues.