Sublime Forum

Sublime Text 3 Beta

#26

jps: ok, got it.

Are (displayname, insertname) style auto completions no longer supported, or just not working yet? This code

import sublime_plugin import sublime class EVL(sublime_plugin.EventListener): def on_query_completions(self, view, prefix, locations): return (("Hello(world)\tint", "Hello(${1:world})")], 0)
inserts “Hello(world) int” (ie, the first item)

0 Likes

#27

on_query_completions is intended to be backwards compatible, so it’s likely a bug. I’ll take a look at it.

0 Likes

#28

Is there any option to open each project in different process / thread?
I’m working with a huge project on PHP (thousands of files) and sublime text going to be crazy when tryed to index that. Even after close project and window tab associated with, other windows with other project still has performance issues until restart of sublime text.

This problem exists both on 2 and 3 versions.

0 Likes

#29

>>> import sqlite3 Traceback (most recent call last): File "<string>", line 1, in <module> File "X/sqlite3/__init__.py", line 23, in <module> File "X/sqlite3/dbapi2.py", line 26, in <module> ImportError: No module named '_sqlite3'

Is there a reason why sqlite3 is still not available?

Could this possibly enable building external C libraries for SublimeText? Working pyzmq is something that I dream about :smile:

EDIT3:
Can plugin_host be launched separately from the editor? Unit testing plugins would be great.

0 Likes

#30

Great news!

JPS, can you comment on the upgrade process (OSX)? I understand that plugins will probably be broken. But what about user settings, key bindings, macros, etc.? Is it possible to install ST3 separately?

Thanx!!

0 Likes

#31

I just (mostly) ported sublimelint. Looks like view.set_status() is broken?
It won’t trigger reliably for me inside on_selection_modified() every other view I select. On odd views, it just swallows the status update. Even the built-in line/column number won’t update.

So if I select views 1, 2, 3, 4 in order it’ll only work for views 1, 3 or 2, 4. If I then select 1, 3, 2, 4 in order? It’ll only work for 1, 2 or 3, 4.

I’m on OSX with build 3006.

0 Likes

#32

Indexing is fully asynchronous, and does no work in the main thread. I do most of my testing using the chromium project (>100k files), and observe no slowdowns.

0 Likes

#33

Unfortunately It’s not possible, as plugin_host isn’t responsible for the implementation of the API, just for communication with the main sublime_text process over shared memory.

0 Likes

#34

@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).

0 Likes

#35

Sublime Text 3 is entirely independent from Sublime Text 2, they use different data directory locations, and you can both be run at the same time.

Everything other than plugins should work more or less the same. However, don’t simply copy your entire Packages directory from Sublime Text 2 to Sublime Text 3, as that will override all the new and updated resources in Sublime Text 3, resulting in various things not working.

0 Likes

#36

Great news that ST is going forward! Congrats!

@jps Could you please consider expanding ST3 API with window.open_project()?
sublimetext.userecho.com/topic/1 … n_project/

0 Likes

#37

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”.

0 Likes

#38

@jps Is indexing for Scala supported or going to be supported? twitter.com/jboner/status/296167901403160576

0 Likes

#39

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?

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]

0 Likes

#40

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.

0 Likes

#41

Any particular reason this is None?

import sublime print(sublime.active_window().active_view())

0 Likes

#42

[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.

0 Likes

#43

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.

0 Likes

#44

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
}
0 Likes

#45

[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:

  1. Sublime Text starts up, restores the previous session
  2. Sublime Text starts the plugin_host
  3. Once the plugin_host has started and initialized Python, it tells sublime_text that it’s ready
  4. sublime_text tells the plugin_host which modules to load
  5. plugin_host loads all the modules
  6. plugin_host tells sublime_text that startup has finished. sublime_text will now start servicing the sublime_api module, which means the sublime module is only now available for use.

This is all done so that the application isn’t blocked on plugins doing IO at startup.

0 Likes