s-a / sublime-text-refactor

A Sublime Text Refactor Plugin for Javascript Code
213 stars 12 forks source link

ST Freeze or do nothing after refactor action on non Windows systems #4

Closed s-a closed 11 years ago

s-a commented 11 years ago

Just tried to use the plugin on Ubuntu and it was not possible because the plugin reads and writes files on hard disc to do its work.

Traceback (most recent call last):
  File "./sublime_plugin.py", line 362, in run_
  File "./Refactor.py", line 68, in run
  File "./Refactor.py", line 86, in ExtractmethodCommand
  File "./Refactor.py", line 51, in writeTextFile
IOError: [Errno 13] Permission denied: '/home/sa/.config/sublime-text-2/Packages/sublime-text-refactor/tmp.txt.js'

So I tried to start sublime with root rights::

sudo '/home/sa/Sublime Text 2/sublime_text' 

But now every refactor action is freezing sublime text. This is one reason why I' m not using Macintosh or Linux, because I always spend too much of time with system configuration and security or permission problems.

So any help out there by experts of Unix-based systems would be wonderful.