- Code: Select all
import sublime
print(sublime.active_window().active_view())
import sublime
print(sublime.active_window().active_view())jps wrote:xeno.by wrote:@jps Is the new name for the app on OSX ("Sublime Text", without a version number) intentional? It's great that I can install the new beta side-by-side with ST2, but there's a small inconsistency in naming. Maybe "Sublime Text 3" would sound better? (Sure I can rename the installation folder, but still).
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".
j0k wrote:Does Symbol Indexing works only for opened files? It seems that if I close a file, Goto Symbol in Project doesn't find any functions that are inside the closed file. Is there an option to enabled/not enabled?
j0k wrote:About the follow_symlinks option, where should I add it ? In the .sublime-project ? Like that:
- Code: Select all
{
"folders":
[
{
"path": "/Z/myproject"
}
],
"follow_symlinks": true
}
import sublime
s = sublime.load_settings("Test.sublime-settings")
print(s.get("test_value", -1))// Test.sublime-settings
{
"test_value": 1
}
quarnster wrote:Any particular reason this is None?
- Code: Select all
import sublime
print(sublime.active_window().active_view())
jps wrote: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.
jboner wrote: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?
view.indexed_symbols()
<?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>
Users browsing this forum: No registered users and 5 guests