Sublime Forum

Build 3009

#17

Is there anyway, to say, add a python virtualenv to the symbol index, but have it NOT show up in the goto anything panel (ctrl+p )?

0 Likes

#18

@castles_made_of_sand: You mean like providing “Goto Definition” support but not “Symbol List”?

0 Likes

#19

No, but I can see how that might be nice too

0 Likes

#20

Then what? I don’t really understand.

And slightly going OT here, but it seems like the forum’s server’s clock is about 1:20min ahead despite selecting the correct timezone in preferences.

Edit: Something I just discovered: When I opened ST3 portable for the first time it displayed the sidebar. I could not close the sidebar (using “ctrl+k, ctrl+b”) until I selected “View > Side Bar > Show open files”, after that it works as expected.

0 Likes

#21

Yes, I noticed that too. Ctrl+k, Ctrl+b seems not work without enabling view open files, but it’s also stopped working for me on a few other occasions.

0 Likes

#22

@jps

view.insert in ST2 had this description:

Inserts the given string in the buffer at the specified point. Returns the number of characters inserted: this may be different if tabs are being translated into spaces in the current buffer.

In ST3 view.insert returns nothing. Is there a reason for this, and can we get it to return the characters inserted again?

0 Likes

#23

Note: This post is courtesy of boredom, I guess.

I reviewed the “sublime.py” file, mostly adjusting it to match pep8, add a few “isinstance” checks, removed a typo, added some blank lines to separate (probably similar) constants and removed the call of “sublime_api.settings_get” respectively. Check the revisions for the changes I made, the first commit was the original file.
gist.github.com/4694665

Edit: Updated magic for Selection class because as it works now there is no way that comparing two Selection instances of the same view construct different lists due to their wrapper nature. The only possibilities that these could differ are 1. that the selection is changed by some other thread between evaluating the two operands and 2. Selection instances of different views. Thus, comparing the view_id attributes seems more accurate/reliable. “lt” cannot really be implemented. “strcan be used to compare older Selection objects with an updated one due to wrapper nature. See also.

0 Likes

#24

I’m using plugin_loaded() to import a module which is working fine, but I’m getting an error

"sublime_plugin.py", line 133, in on_api_ready
    for m in sys.modules.values():
RuntimeError: dictionary changed size during iteration

Is there any way to avoid this?

0 Likes

#25

Can’t you just import the module the normal way? plugin_loaded is only required for API calls, it’s best to do module imports before that, so the application isn’t blocking on IO

0 Likes

#26

[quote=“jps”]

Can’t you just import the module the normal way? plugin_loaded is only required for API calls, it’s best to do module imports before that, so the application isn’t blocking on IO[/quote]

I’m using a string from the package’s sublime-settings file to load the module which only contains completions.

If that’s a really bad idea, I’d love some recommendations.

0 Likes

#27

The most direct solution would be to use set_timeout or set_timeout_async. The latter will run the passed in function in a separate thread, so is preferable if it’s not going to cause trouble elsewhere. Module importing in Python is threadsafe, although I don’t know off the top of my head if custom importers need to do anything to maintain this guarantee. All plugins are loaded through a custom importer, MultizipImporter in sublime_plugin.py.

0 Likes

#28

jps, what is your stance on the smart_indent issue described here: smart_indent bug? ?

Without any knowledge of ST internals I’m daring to assume that this is an easy fix. Is it possible to get it in ST3? This is a blocker for me and, I’m sure, for some other people as well. Using ST for languages without braces and some other editor for braced languages will be… awkard.

I tried to do a proper workaround by adjusting the Default keymap, but it seems that anything that does \n insertion is a suspect (i.e. “o”/“O” commands in Vintage and probably other things) - not to mention unindent on “}”.

0 Likes

#29

small bug i think

https://gist.github.com/a068888801aaac1b050e

I like emacs keybindings so I plan to reconfigure my bindings to match. I’m starting with ctrl-g, which is basically escape.
There are a few instances where hitting ctrl-g doesn’t have the effects of esc.

show_files overlay => calling ctrl-g closes the box, but leaves the preview of the file open, which is very strange… hitting esc has the correct action
prompt_select_workspace => ctrl-g does nothing, only escape works (more than likely because this is a popup window… anyway to unify?)

a good example of where this behavior is correct is in the “goto definition”. the keybinding in fact is honored here and kills the preview properly.

on a side note: how do you go about altering the built in packages? I want to change some of the syntax for the lisp package but it appears the packages are not easily accessible for updating, and even if I could, would get overwritten with a version update.

and what about clearing the console? :smiley:

0 Likes

#30

Could just be in my head but the last build seems to be more laggy than the previous builds ( Ubuntu x64 Linux 3.7.5-030705-generic )

0 Likes

#31

The prefered way is to extract the relevant file from the archive, place it in the User package and modify it there. Chances are, that the old “base” file is overridden by loading precedence (considering the filename) or by using the same uuid - not sure how this works exactly.

0 Likes

#32

Buil: 3009
OS: OS X 10.8.2
Bug: “shift_tab_unindent”: false - this setting does not work
Expected behaviour: Shift + tab should insert tab-character

This is obviously bad, as it makes e.g editing Makefiles hard.

0 Likes

#33

whenever i try using subprocess.Popen i get strange error:

[quote]p = subprocess.Popen(“echo”, “1”], stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=cwd, shell=True)
result, err = p.communicate()
print(result)
print(err)[/quote]

[quote]b’’
b’dyld: lazy symbol binding failed: Symbol not found: _dirfd\n Referenced from: /Applications/Sublime Text.app/Contents/MacOS/plugin_host\n Expected in: /usr/lib/libSystem.B.dylib\n\ndyld: Symbol not found: _dirfd\n Referenced from: /Applications/Sublime Text.app/Contents/MacOS/plugin_host\n Expected in: /usr/lib/libSystem.B.dylib\n\n’[/quote]

i get this disregarding setting shell and cwd
any ideas?
EDIT: osx 10.7.5

0 Likes

#34

In ST2, when creating a region you could give a relative path to “Theme - Default” for the gutter icon. In ST3, this still seems to work for Windows but it is broken in OSX…I do not know about Linux.

0 Likes

#35

I can’t seem to extract the contents out of the built-in sublime-package file so I have no idea how to update the tmLanguage file

0 Likes

#36

“.sublime-package” is in fact a costum extension for a Zip-Archive. If you have problems extracting, just rename the file (or copy it first).

0 Likes