wbond / sublime_alignment

Easy alignment of multiple selections and multi-line selections
http://wbond.net/sublime_packages/alignment
521 stars 110 forks source link

Working with Less files (not just CSS) #65

Open erikflowers opened 10 years ago

erikflowers commented 10 years ago

It would be great to have this work with Less. I don't write CSS any longer, and I assume there are a lot of people that use Less, Sass, etc.

I don't know how to change the addon myself or I'd try, but I thought I'd add an issue regarding CSS preprocessors.

lombardi-gux commented 10 years ago

+1

wbond commented 10 years ago

What issues are you running into aligning things with LESS?

lombardi-gux commented 10 years ago

This block, for example, in CSS:

  font-size: 20px;
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  text-align: center;
  width: 100%;
  height: 100%;
  padding-top: 35%;

aligns as expected to

  font-size  : 20px;
  position   : absolute;
  top        : 0;
  left       : 0;
  display    : block;
  text-align : center;
  width      : 100%;
  height     : 100%;
  padding-top: 35%;

In a less file with the same code, I hit the key command but nothing happens.

ariona commented 10 years ago

Maybe this will help. Open Preferences > Browse Package menu, open the alignment package folder. You can see there is a file called CSS.sublime-settings.

In my case i just copy the file and name it after the file type you need. So i rename it to Sass.sublime-settings , and now i can use alignment in my sass file.

The file name is based on Syntax type (you can see all available syntax from the view > syntax ). and note that the filename is case sensitive i think.

lombardi-gux commented 10 years ago

Thanks, but he packages are no longer in folders, they are zipped (sublime-package) files. I suppose I could edit the zip file, but I'd prefer either a "fix" or a solution I can confine to my user folder.

On May 20, 2014, at 5:14 AM, Rian Ariona notifications@github.com<mailto:notifications@github.com> wrote:

Maybe this will help. Open Preferences > Browse Package menu, open the alignment package folder. You can see there is a file called CSS.sublime-settings.

In my case i just copy the file and name it after the file type you need. So i rename it to Sass.sublime-settings , and now i can use alignment in my sass file.

The file name is based on Syntax type (you can see all available syntax from the view > syntax ). and note that the filename is case sensitive i think.

— Reply to this email directly or view it on GitHubhttps://github.com/wbond/sublime_alignment/issues/65#issuecomment-43602972.


wbond commented 10 years ago

Well, that file can be in any folder. Ideally it is in your Packages/User/ folder so if you sync your packages to another machine, you get it also.

Of note, in ST3, you can create a folder named Packages/{package name}/ and override files from the package. It can be handy for little customizations!