Closed samholmes closed 10 years ago
I tested toggling that option, and it works for me here. Can you tell me what version of sublime you are using, and on what platform so I might be able to reproduce. Also - could the file be compiled by another plugin/process - or is it definitely done by this plugin?
Also, in addition to the version of Sublime Text you use, cand you list all the packages you have installed ? (content of your Installed Packages
, Packages
and Packages/User
)
If you're using Sublime Text 2, chances are that another plugin (better coffeescript ?) has another compileOnSave setting that collides with Stylus's one. Sublime Text 3 is not affected by this issue I checked, but I don't know for ST2.
I was having this issue in ST2 as well, and checked other packages but found no suspicious compilation settings. Upgrading to ST3Beta fixed the issue.
I'm using Sublime Text 3, build 3059. Mac OS X 10.9.3.
Installed Packages:
drwx------ 10 holmes staff 340 Jul 14 12:13 .
drwx------ 9 holmes staff 306 Mar 16 03:28 ..
-rw-r--r-- 1 holmes staff 35515 May 17 13:19 AdvancedNewFile.sublime-package
-rw-r--r-- 1 holmes staff 7733 Apr 6 15:00 File Navigator.sublime-package
-rw-r--r-- 1 holmes staff 27844 Jul 14 12:13 Git.sublime-package
-rw-r--r-- 1 holmes staff 7909 Apr 11 16:06 Origami.sublime-package
-rw-r--r-- 1 holmes staff 132375 Mar 16 01:40 Package Control.sublime-package
-rw-r--r-- 1 holmes staff 1034417 Jun 21 15:19 Predawn.sublime-package
-rw-r--r-- 1 holmes staff 1027658 Mar 16 01:45 Theme - Flatland.sublime-package
-rw-r--r-- 1 holmes staff 338413 May 7 16:37 Theme - Soda.sublime-package
Packages:
total 40
drwx------ 73 holmes staff 2482 Apr 6 14:51 .
drwx------ 9 holmes staff 306 Mar 16 03:28 ..
-rw-r--r--@ 1 holmes staff 15364 Jul 22 13:57 .DS_Store
drwxr-xr-x 6 holmes staff 204 Dec 24 2012 ASP
drwxr-xr-x 4 holmes staff 136 Dec 24 2012 ActionScript
drwxr-xr-x 4 holmes staff 136 Dec 24 2012 AppleScript
drwxr-xr-x 4 holmes staff 136 Dec 24 2012 Batch File
drwxr-xr-x 6 holmes staff 204 Dec 24 2012 C#
drwxr-xr-x 38 holmes staff 1292 Dec 24 2012 C++
drwxr-xr-x 16 holmes staff 544 Dec 24 2012 CSS
drwxr-xr-x 9 holmes staff 306 Mar 16 01:44 Calculate
drwxr-xr-x 8 holmes staff 272 Dec 24 2012 Clojure
drwxr-xr-x 13 holmes staff 442 Jul 21 14:47 Color Highlighter
drwxr-xr-x 38 holmes staff 1292 Jan 5 2013 Color Scheme - Default
drwxr-xr-x 10 holmes staff 340 Mar 15 20:41 ColorPick
drwxr-xr-x 42 holmes staff 1428 Dec 24 2012 D
drwxr-xr-x 8 holmes staff 272 Dec 24 2012 Diff
drwxr-xr-x 25 holmes staff 850 Apr 12 19:25 DocBlockr
drwxr-xr-x 9 holmes staff 306 Jun 30 13:24 EJS
drwxr-xr-x 22 holmes staff 748 Jun 21 15:18 Emmet
drwxr-xr-x 36 holmes staff 1224 Dec 24 2012 Erlang
drwxr-xr-x@ 25 holmes staff 850 Jul 23 13:36 Floobits
drwxr-xr-x 18 holmes staff 612 Dec 24 2012 Go
drwxr-xr-x 4 holmes staff 136 Dec 24 2012 Graphviz
drwxr-xr-x 134 holmes staff 4556 Dec 24 2012 Groovy
drwxr-xr-x 16 holmes staff 544 Dec 24 2012 HTML
drwxr-xr-x 11 holmes staff 374 Aug 23 2013 HTML2Jade
drwxr-xr-x 14 holmes staff 476 Jul 21 14:47 HTMLBeautify
drwxr-xr-x 18 holmes staff 612 Dec 24 2012 Haskell
drwxr-xr-x 13 holmes staff 442 Nov 9 2013 Hipster Ipsum
drwxr-xr-x 11 holmes staff 374 Jun 30 13:24 Indent XML
drwxr-xr-x 10 holmes staff 340 May 5 11:40 Jade
drwxr-xr-x 72 holmes staff 2448 Dec 24 2012 Java
drwxrwxrwx 38 holmes staff 1292 Dec 26 2012 JavaScript
drwxr-xr-x 17 holmes staff 578 May 16 10:00 JsFormat
drwxr-xr-x 41 holmes staff 1394 Dec 24 2012 LaTeX
drwxr-xr-x 8 holmes staff 272 Dec 24 2012 Language - English
drwxr-xr-x 17 holmes staff 578 Dec 24 2012 Lisp
drwxr-xr-x 7 holmes staff 238 Jan 11 2014 LoremPixel
drwxr-xr-x 16 holmes staff 544 Dec 24 2012 Lua
drwxr-xr-x 8 holmes staff 272 Dec 24 2012 Makefile
drwxr-xr-x 10 holmes staff 340 Dec 24 2012 Markdown
drwxr-xr-x 27 holmes staff 918 Jul 23 13:39 Markdown Preview
drwxr-xr-x 40 holmes staff 1360 Dec 24 2012 Matlab
drwxr-xr-x 77 holmes staff 2618 Dec 24 2012 OCaml
drwxr-xr-x 6 holmes staff 204 Dec 24 2012 Objective-C
drwxr-xr-x 66 holmes staff 2244 Dec 24 2012 PHP
drwxr-xr-x 22 holmes staff 748 Dec 24 2012 Perl
drwxr-xr-x 10 holmes staff 340 Aug 21 2013 PlistJsonConverter
drwxr-xr-x 15 holmes staff 510 Jun 21 15:19 Pretty JSON
drwxr-xr-x 4 holmes staff 136 Dec 26 2012 PyV8
drwxr-xr-x 29 holmes staff 986 Dec 24 2012 Python
drwxr-xr-x 32 holmes staff 1088 Dec 24 2012 R
drwxr-xr-x 212 holmes staff 7208 Dec 24 2012 Rails
drwxr-xr-x 4 holmes staff 136 Dec 24 2012 Regular Expressions
drwxr-xr-x 6 holmes staff 204 Dec 24 2012 RestructuredText
drwxr-xr-x 155 holmes staff 5270 Dec 24 2012 Ruby
drwxr-xr-x 23 holmes staff 782 Mar 16 01:44 SFTP
drwxr-xr-x 8 holmes staff 272 Dec 24 2012 SQL
drwxr-xr-x 38 holmes staff 1292 Dec 24 2012 Scala
drwxr-xr-x 16 holmes staff 544 Dec 24 2012 ShellScript
drwxr-xr-x 20 holmes staff 680 Jul 16 13:45 Stylus
lrwxr-xr-x 1 holmes staff 35 Apr 10 2013 SumHours -> /Users/holmes/Code/github/SumHours/
drwxr-xr-x 14 holmes staff 476 Dec 24 2012 TCL
drwxr-xr-x 5 holmes staff 170 Dec 24 2012 Text
drwxr-xr-x 14 holmes staff 476 Dec 24 2012 Textile
drwxr-xr-x 85 holmes staff 2890 Dec 20 2013 Theme - Default
drwxr-xr-x 21 holmes staff 714 Jul 1 2013 Tita - Titanium Mobile
drwxr-xr-x 12 holmes staff 408 Jul 21 14:47 Titanium Build
drwxr-xr-x 24 holmes staff 816 Jul 22 13:57 User
drwxr-xr-x 16 holmes staff 544 Dec 24 2012 Vintage
drwxr-xr-x 18 holmes staff 612 Dec 24 2012 XML
drwxr-xr-x 6 holmes staff 204 Dec 24 2012 YAML
Packages/User:
total 1008
drwxr-xr-x 24 holmes staff 816 Jul 22 13:57 .
drwx------ 73 holmes staff 2482 Apr 6 14:51 ..
-rw-r--r-- 1 holmes staff 12292 Apr 23 2013 .DS_Store
-rw-r--r-- 1 holmes staff 346 Mar 31 2013 Accounts.sublime-settings
-rw-r--r-- 1 holmes staff 40 Mar 19 2013 Base File.sublime-settings
drwxr-xr-x 5 holmes staff 170 Jul 22 13:57 Color Highlighter
-rw-r--r-- 1 holmes staff 4 Dec 24 2012 Default (Linux).sublime-keymap
-rw-r--r-- 1 holmes staff 29492 Mar 16 03:29 Default (OSX).sublime-keymap
-rw-r--r-- 1 holmes staff 4 Dec 24 2012 Default (Windows).sublime-keymap
-rw-r--r--@ 1 holmes staff 28113 Mar 27 02:23 Espresso Soda.tmTheme
-rw-r--r-- 1 holmes staff 1715 Mar 15 13:50 Espresso Soda.tmTheme.cache
-rw-r--r-- 1 holmes staff 21843 Mar 2 2013 Espresso Soda.tmTheme.chback
-rw-r--r-- 1 holmes staff 169 May 19 00:25 File Navigator.history
-rw-r--r-- 1 holmes staff 101 Mar 31 2013 Floobits.sublime-settings
-rw-r--r--@ 1 holmes staff 10783 Mar 2 2013 Monokai Soda.tmTheme
-rw-r--r-- 1 holmes staff 913 Mar 2 2013 Monokai Soda.tmTheme.cache
-rw-r--r-- 1 holmes staff 10783 Feb 13 2013 Monokai Soda.tmTheme.chback
drwxr-xr-x 4 holmes staff 136 Jul 21 14:46 Package Control.cache
-rw-r--r-- 1 holmes staff 10 Jul 23 13:36 Package Control.last-run
-rw-r--r-- 1 holmes staff 529 Jul 23 13:39 Package Control.sublime-settings
-rw-r--r-- 1 holmes staff 339810 Jul 21 14:46 Package Control.system-ca-bundle
-rw-r--r-- 1 holmes staff 877 Jul 23 13:39 Preferences.sublime-settings
-rw-r--r-- 1 holmes staff 471 Oct 14 2013 SFTP.errors.log
drwxr-xr-x 3 holmes staff 102 Apr 3 2013 sftp_servers
I fixed it myself by returning out of the function that causes the compile.
class CaptureEditing(sublime_plugin.EventListener):
def is_enabled(self, view):
return isStylus(view)
def on_post_save(self, view):
# Remove this feature manually
return
if not self.is_enabled(view):
return
compile_on_save = settings_get('compileOnSave', True)
if compile_on_save is True:
print("Compiling on save...")
view.run_command("styluscompile")
Didn't mean to close this issue..
Failed to reproduce this. I deleted my .config/sublime-text-3 folder to get a clean install, then install Package Control and all the packages listed in your directory. Then Install Stylus, restarted, open a .styl file, it is recognized as 'Stylus'. Modify. Save. The file in not compiled.
Are you sure you use the latest package ?
Oh, you Packages directory should NOT contain those directory. Sublime 2 unzipped its package in that location, but that's no longer the case with ST3. My Packages directory only contain the "User" subdirectory.
My guess is that your Packages
directory is conflicting with the newer ones from Sublime Text 3. Those packages are probably outdated Sublime Text 2 packages.
@gbouthenot Where is the ST3 version of the Stylus package located then? I don't see any other folder other than the one in Packages
. I don't see it in Packages/User
. In fact, most of the packages I have installed with package manager are located in Packages
. Is my Package Manager outdated?
On my Installation, installed package by sublime package go to Installed Packages
.
The files are never unzipped. The Stylus
directory under Packages
might be a directory created by Sublime 2. That's just a guess, and that's how it works on my system (Linux).
To be sure, rename your .config/sublime-text-3 directory to .config/sublime-text-3-BACKUP
and restart from a fresh install. You'll be able to rollback by renaming back the directory.
I propose that we change
compile_on_save = settings_get('compileOnSave', True)
to
compile_on_save = settings_get('compileOnSave', False)
Since it's False
by default anyway, but in case options get corrupted or go missing the user will still not have weird behavior that wasn't explicitly requested.
I don't like the compileOnSave feature. I'd like to disable it. I went into the Stylus.sublime-settings file and checked compileOnSave. It was already set to false. But, it's still compiling when I save.