Any particular reason this is None?
import sublime
print(sublime.active_window().active_view())
Any particular reason this is None?
import sublime
print(sublime.active_window().active_view())
[quote=“jps”]
Yep, it’s intentional: the version number is being emphasized less now. The whole “Sublime Text 2” came about from the original name, “Sublime Text X”, which was the initial experimental cross platform version. From there, it made the most sense to just turn the X into a 2. Long term, it’s better for the application to simply be “Sublime Text”.[/quote]
The upside of the version suffix is that, on Windows, when I right click a file I have clear version marked options to open the file in when I have two versions installed side by side. Granted, it is mostly an issue for us who are running a production version next to a beta.
It works across all open files, and all files listed in the side bar. It sounds like you need to add the relevant folder to the side bar, either by dragging the folder onto the window, or using the “Project/Add Folder to Project” menu.
[quote=“j0k”]About the follow_symlinks option, where should I add it ? In the .sublime-project ? Like that:
[code]{
“folders”:
{
"path": "/Z/myproject"
}
],
“follow_symlinks”: true
}[/code][/quote]
follow_symlinks should be placed next to the “path” element, there’s an example at sublimetext.com/docs/3/projects.html. Please be careful with this, and don’t place a symlink such that your entire hdd gets indexed.
And also any reason this returns None?
import sublime
s = sublime.load_settings("Test.sublime-settings")
print(s.get("test_value", -1))
// Test.sublime-settings
{
"test_value": 1
}
[quote=“quarnster”]Any particular reason this is None?
import sublime
print(sublime.active_window().active_view())
[/quote]
I need to add this to the porting guide. The sublime module isn’t generally available at the top level of a module, due to startup works:
This is all done so that the application isn’t blocked on plugins doing IO at startup.
Is there some “load_finished” event or similar so that we know it’s now possible to use the sublime module?
[quote=“jps”]The symbol indexing relies on the .tmLanguage file defining symbols. In general, if you see symbols via Goto Symbol (Ctrl+R / Command+R), then the same symbols should be getting indexed.
If the symbols are showing up in Goto Symbol, but aren’t getting indexed, then a couple of preferences will need to be set in a .tmPreferences file. I’ll happily explain what’s required if this is what you’re seeing.[/quote]
Yeah. That is what is happening. The Goto Symbol works fine as usual, but Goto Definition returns: ‘Unable to find X’
How can I make this work?
Thanks, Jonas.
Congrats for this new release Jon, so far looks like a high quality build as ever.
For ST3 (Windows) after a quick look at the portable version:
- Overal speed look way better when comparing both portable version of ST.
- Goto Symbol speed is now up to view.find_by_selector speed, and even quicker compared to ST2.
- show_quick_panel has a new on_highlight callback ! Yeah !!! thanks Jon.
- Still no way to know what’s modified on the on_modified event…
- Looks like plugin are loaded in a logical order now (first Default, next builtins followed by user installed and User at last)
- Still no way to add custom information in the status bar (like indentation and syntax) ?
Need to port all my plugins now
JSP, I’m a bit disappointed for the short life-cycle of Sublime Text 2. I bought a licence for it when it was at the latest beta stages after I used it for a while. But I’m not willing to pay a licence every few months or every year. Giving access to 3 beta is good thing, but after going through the list of improvements some of them make more sense as a minor updates to the second version. Improved start-up time for example. Performance improvements are something users are expecting as fixes and updates. New functionality, major improvements of the architecture, internal structure or other major components of the software are valid reasons for releasing new major version of our products, not performance updates. No one knows how long will this beta stage continue, and how long we will receive “updates” for it.
I’m looking forward to read your thoughts and plans for the future Sublime Text.
[quote=“jboner”]Yeah. That is what is happening. The Goto Symbol works fine as usual, but Goto Definition returns: ‘Unable to find X’
How can I make this work?[/quote]
Firstly, you can see what symbols will be indexed for the current file via entering this in the console:
view.indexed_symbols()
You can also do view.symbols() to see what will be shown in the regular symbol view.
Indexed symbols are controlled by the showInIndexedSymbolList preference, which is defined in .tmPreferences files. Most syntax definitions are covered by the contents of Default/Symbols.tmPreferences, but the scala syntax definition appears to assign scope names differently.
In short, you need to edit “Packages/Scala/Symbols.tmPreferences” and change it to:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Symbol List</string>
<key>scope</key>
<string>entity.name.function.declaration, entity.name.class.declaration, entity.name.val.declaration, entity.name.type.declaration</string>
<key>settings</key>
<dict>
<key>showInSymbolList</key>
<integer>1</integer>
<key>showInIndexedSymbolList</key>
<integer>1</integer>
</dict>
<key>uuid</key>
<string>31262BFB-520A-4253-A81C-60023C0CFC8B</string>
</dict>
</plist>
The changed lines above are just adding the value for showInIndexedSymbolList. I’ll make this change for the next build, but you can make it locally in the mean time. You’ll need to save the above contents into the Packages/Scala/Symbols.tmPreferences file. This will then override the version that’s stored in Scala.sublime-package.
I agree with lyubenblagoev’s sentiment - I understand you’ve been hard at work on the new features for ST3 and appreciate what you’ve been working on, but it does seem that ST2 was beta for a long, long time - got released and now we’re basically paying for another beta period where potentially the app will have issues and not be stable. And I’d say apart from the work you’ve done on symbol loading, many of the features do seem more like a 2.1 release rather than a whole 3.0 release.
Edit: and on top that, most useful plugins won’t be initially compatible, and we’ll have to wait until the author can, or even will, get round to porting these (and that a new version of package manager is made available to support this). Overall it doesn’t feel right that at least some of these improvements aren’t back-ported into ST2.
With that in mid, I’ve already found one bug with HTML autocomplete that will stop be using it for now. I’ve included a screenshot to show it: cl.ly/image/1Z1a2m063A0s
This happens where I type <h and then press tab.
The first version of Sublime Text 2 was available to registered users on September 17, 2010, with the most recent build being on September 18, 2012. 2 years of continuous updates is a massive amount. In reality, counting should start from January 18, 2008, as everyone who purchased then received updates until September 2012, four and a half years later.
How to make a smooth jump? After copying the Library (complete) and change any reference from /Applications/Sublime Text 2.app to /Applications/Sublime Text.app most of my keyboard shortcuts do not work nor latex build… etc.
I meant the life cycle of a full featured release, which is meant to be the final version, the major release.
Since a code editor is something all of us uses all the time I’m not interested in using beta, unstable versions of this kind of software. As I noted I bought V2 after it was in beta for a long time. So how long it took to get to a stable release is not something that users appreciate when they give their money for something.
I don’t understand that. If you don’t want a unstable version you can use the stable st2 you paid for. It’s not going away and I’m sure it will get bug fixes when needed.
I’ve not read anything about an end of life of st2… was there something in the announcement I overread ? I think there are more people still using python 2 and nobody forces anyone on using python 3 … isn’t it the same with st2 and st3 ?
One thing I have noticed: I can’t “Hide” the sidebar until I show something in it. The menu item is disabled.
In fact, this folder is already in the project.
Once the file isn’t open anymore, it can’t find the symbol. But if I open the file, it can find the symbol.
Thanx jps, i just installed ST3 and I see: the upsetting line break problem has been solved, this is essential to me as I use ST for prose writing!!!
Nice sanx a lot to John
Greetz
[quote=“lyubenblagoev”]I meant the life cycle of a full featured release, which is meant to be the final version, the major release.
Since a code editor is something all of us uses all the time I’m not interested in using beta, unstable versions of this kind of software. As I noted I bought V2 after it was in beta for a long time. So how long it took to get to a stable release is not something that users appreciate when they give their money for something.[/quote]
I somewhat agree with your feeling as it looks like there’s no more support for ST2.
But OTOH, as a long times user of ST2 back to early beta, I can say that every beta builds of ST2 was more stable than most final builds of most other software.
Maybe it’s a little early now to jump in the ST3 wagon but wait a few weeks and I’m pretty sure the ST3 builds will be perfectly usable as your main editor (if we do not take into account missing plugins).
[quote=“dafire”]
I agree with lyubenblagoev’s sentiment - I understand you’ve been hard at work on the new features for ST3 and appreciate what you’ve been working on, but it does seem that ST2 was beta for a long, long time - got released and now we’re basically paying for another beta period where potentially the app will have issues and not be stable.
I don’t understand that. If you don’t want a unstable version you can use the stable st2 you paid for. It’s not going away and I’m sure it will get bug fixes when needed.
I’ve not read anything about an end of life of st2… was there something in the announcement I overread ? I think there are more people still using python 2 and nobody forces anyone on using python 3 … isn’t it the same with st2 and st3 ?[/quote]
There was no mention of anything to do with ST2’s life cycle and that’s kind of the point - we don’t know that, as users who paid during during the beta period, if we’re getting any new 2.x features - for example:
“Speed. Sublime Text has always had speed as a feature, but version 3 addresses some weak points. Startup time is now virtually immediate, and plugins no longer have the opportunity to bring this down. Replace All performance is also significantly faster.”
That to me reads more like ‘I found a bunch of bugs and I’ve fixed the plugin system to it doesn’t crash as much’.