Sublime Forum

Saving files you don't have permission for

#1

There are two features I really miss from TextMate. The first is aligning on equals (or whatever). I’ve tried the Alignment plugin in ST2 (removing and installing it quite a few times over the last month), but it NEVER works.

The other is if you open a file you don’t have permission to save, TM will prompt for a sudo password. I keep editing apache conf files or hosts files and then remembering that I can’t save them in ST2 and have to redo it in Nano (as I’ve removed TM since moving to ST2).

Any chance of adding this?

0 Likes

#2

a) Alignment plugin does work. If you think there is a bug, report it to the author.
b) The question about saving files you don’t have permissions to write to has already been asked numerous times. It has never been properly answered, though.

0 Likes

#3

a) OK, if it’s working for other people, I’ll try emailing the author with my specific steps to see if it’s a bug or if I don’t know what I’m doing (do you happen to know who the author is - Package Install doesn’t show author name/email)

b) It has just been answered :smile: https://forum.sublimetext.com/t/dev-build-2147/3429/1 It’s in the new dev build!

0 Likes

#4

While I try and find the author’s details, this is what I’ve tried:

  1. Install Alignment via Package:Install

  2. Create a Ruby file containing the following:

key1 = "foo", longer_key = "bar"

  1. Select that text

  2. I tried using Ctrl+Cmd+a, nothing happened

  3. I changed the key binding in Preferences | Key Binding User to:

{ “keys”: “super+ctrl+]”], “command”: “alignment” }

  1. I tried Ctrl+Cmd+], nothing happened

  2. I opened the console and ran:

view.run_command('alignment')

Nothing happened…

Also tried it using a JSON file as it apparently adds a “:” for JSON files, that didn’t work either.

0 Likes

#5

Echoing the same issues with alignment plugin - nothing seems to happen when I press the correct key sequence or run the command via console

0 Likes

#6

To find the author of a plugin in package control, use Package Control: Discover Packages and choose the correct package. This will take you to the plugins homepage.

In this case, the page is http://wbond.net/sublime_packages/alignment.

0 Likes

#7

Thanks tretretre, didn’t know about that command. I’ve actually raised an issue on GitHub and the author is responding, so fingers crossed I’ll be able to be using it soon.

github.com/wbond/sublime_alignment/issues/8

@gavsim, welcome to post a +1 on there and maybe help provide your debug info so Will can track down the problem easier.

0 Likes

#8

Hi Andy,

Was just about to +1 your github issue but decided to give it one more try in Sublime and guess what it worked!?!? I’ve not changed anything since yesterday so clueless as to what has fixed the issue. Now works both via the shortcut key and also the view run command? Weird.

0 Likes

#9

Thanks gavsim, at least I know it’s working for someone so fingers crossed I can get my issue fixed and it will work for me.

0 Likes