Sublime Forum

Dev Build 3067

#42

After upgrading to 3067 I get very high CPU usage all the time :frowning:

Tried restarting sublime 3 times… I’m on Mavericks 10.9.5

cl.ly/image/3Q3I2C1q0s1i

Anyone else seeing this? What could I do?

0 Likes

#43

Well, I’ll throw this out there – we’ll see what happens.

I’m part of a team maintaining a very old, large (several million lines) C code base. The standard indent is 2 spaces, but many of the files have a mix of tabs and spaces in the indentation, where a tab is assumed to be 8 spaces. This means that there are a very large number of files don’t display correctly in ST3 if I set the indent to 2 spaces. If I set it to 8 spaces, then the files display correctly, but indenting doesn’t work right and has to be done manually.

The development team has already had a number of discussions about reformatting the files. The long and short of it is, it’s not going to happen. So, it would be really nice if the displayed tab width and indent size were handled separately. As it is, it’s very difficult to use ST3 when editing this code base. Most of the time, I have to use something else (Emacs, vi, even Eclipse has separate settings).

If this is already available, I certainly haven’t seen how to control it. All I can find is a setting for tab_size.

0 Likes

#44

Something seems to have changed about the way scopes are determined.

Right after installing 3067 I started getting hangs in YAML files which turned out to be BracketHighlighter choking. (BracketHighlighter is a Package Control “Top 25” package with nearly a half-million installations.) This was reproducible on a clean install.

The package author was able to create a similar hang in JSON files. Might be something to do with scopes at the end of files?

There’s a ticket going with more details over here: github.com/facelessuser/Bracket … issues/220

0 Likes

#45

Thanks for all the replies! A few specific responses are below:

@jbrooksuk: “Show the project name (like the sidebar) in the window, not just the root folder.” Can you expand on this? If you have a .sublime-project file open, its name is already displayed in the window title.

@wladzynski, @ahojnnesp: Goto Definition already exists for C family languages, I use it frequently. You can find the key binding in the ‘Goto’ menu.

@martian: The “always_prompt_for_file_reload” setting will do what you’re after.

@evulfson: You can bind the “diff_changes” command to a key for this. For reference, all context menu items can be bound to keys, you can find out the relevant command names by entering “sublime.log_commands(True)” in the Console.

@phyllisstein. There were changes to the quote auto pairing logic in the previous build, 3066. If you can come up with a reproducible test case, I’ll take a look at it.

@gregor.hoch: The auto complete window doesn’t cycle from bottom to top by design. It’s important not to do so when the AC window pops up automatically: it’s not uncommon that the window is still showing (often with only a single entry) when the user wants to navigate to the next or previous lines, and this behavior leads to less frustration. I can see the justification for this if the AC window was explicitly requested, but not if it was shown automatically.

@davidhq: it looks like Sublime Text is indexing files, if so there will be a subtle percent complete indicator in the status bar. You can see more information by entering “sublime.log_indexing(True)” in the Console.

@joemaller: there has indeed been a change to selector matching at EOF: previously it would return the default scope, whereas now it returns whatever scope is used by the last character. This improves auto complete behavior when typing at EOF, and is more in line with general expectations, e.g., consider a Python file consisting of nothing but the 3 characters ‘#foo’: the scope returned when querying at EOF now indicates that EOF is in a comment, whereas before it would just indicate ‘source.python’.

A couple of more general items:

Forum Software: I agree that there are, err, limitations, with the current forum. I just can’t justify putting any time into it right now (Sublime Text itself has to come first), perhaps later this year though.

Tooltip API. A few people have mentioned this, I’d appreciate it if you expanded on it a bit: how you see it being used, and what capabilities you’d expect.

0 Likes

#46

Tooltip API: Obviously, the general idea would be to show some information about a function such as the arguments, short description etc. I think a lot of implementation get in the way. Personally, I would prefer a tooltip that doesn’t pop up automatically but instead is triggered by the user (of course, that can be driven by options). I like the three finger pop-up on Mac OX for word definitions (see attached screenshot). I did something similar once by misusing the ST autocomplete window (screenshot attached). Very cumbersome, of course. No formatting, no automatic line breaks, a mess to trigger etc etc. The window opens when I double click on a function or object name while holding the option key and shows some basic documentation. Clicking F1 was supposed to open a webpage with the full documentation but I never got to that point. Proving a more convenient API method that opens a tooltip similar to the OS X dictionary popup at a given location would be great. Maybe the curser/selection position by default with the option to specify the location. Some formatting options, automatic wrapping etc would be pretty important (at least bold and italic). But I am sure others have better ideas about a good implementation.


0 Likes

#47

[quote=“jps”]Dev Build 3067 is out now, with a few bits of polish.

Development work on Sublime Text was very quiet in 2014. I don’t intend for that to be the case in 2015.

The next dev build is due out in 2 or 3 weeks. I’m planning on making some changes to the way Build Systems work for that build (see upcoming thread for details), but as a thank you to all the dedicated forum members, I’d like to take some suggestions for what else should go in the next build(s). Please post the feature or two that you’d most like to see, and I’ll see what I can do about it. Features will be loosely ranked by:

(number_of_posts) * (feature_benefit) * (number_of_users_who_will_use_feature) * (1/implementation_time)

Where number_of_posts is your post count on the forum, and feature_benefit is arbitrarily assigned by me, unless you can convince me otherwise :smile:[/quote]

Oh, finally hearing from you. Welcome back!

New features are good. But could you please solve a existing serious bug first. It push me away from upgrading to Sublime Text 3. I posted about this bug 2 months ago.


github.com/SublimeTextIssues/Core/issues/571

0 Likes

#48

Is this really the case? I tested this by deleting Python.tmLanguage, and only got the “Error loading syntax file…” error dialog once, despite having several Python files open. Looking at the code, this is what I’d expect: the syntax definition objects are shared amongst the text buffers, and will only be loaded once, even if that attempt results in an error.

0 Likes

#49

This is hopefully fixed in BH. It was freezing Sublime, so it was a pretty critical to get fixed since so many people use BH. As soon as your Package Control sees the new version, hopefully things will be normal.

0 Likes

#50

Also, I forgot to mention in the release notes that there are a couple of new API functions in 3067, View.window_to_layout(self, xy) and View.window_to_text(self, xy), which convert from window coordinates to layout and text coordinates, respectively. These can be used to lookup the position in the buffer where the context menu was shown, as used by open_context_url.py in the Default package. To receive the ‘event’ argument in your command, you’ll need to override the want_event() function (see previous example).

FYI, these have been added to the documentation, but the updated documentation isn’t live yet.

An abbreviated version of open_context_url.py:

class OpenContextUrlCommand(sublime_plugin.TextCommand):
    def run(self, edit, event):
        url = self.find_url(event)
        ...

    def find_url(self, event):
        pt = self.view.window_to_text((event"x"], event"y"]))
        line = self.view.line(pt)
        ...

    def want_event(self):
        return True
0 Likes

Detecting line number bar click
Hover/click events in gutter?
#51

Hi Jon,

Big fan of Sublime Text, and happy to hear 2015 will be more active. A few things off the top of my head, some can be handled by plugins but I think should be part of the application itself:

1- Select text in quotes to make it easy to copy paste string content
2- Navigate between tags, like the brackets one (ctrl-M in Windows). I use expand selection to tag (ctrl-shift-A in Windows) and then left or right arrow, but it’ could be more intuitive.
3- A native color highlighter for html hexadecimal or rgb codes (a colored underline is preferable to using the gutter)
4- I love the extra IDE-like functions in Sublime Text 3 (goto definition for functions, css classes, etc), so anything that adds a bit more in the intellisense direction without a heavy price with performance is great.
5- An option to disable syntax color schemes when handling very large files (like 1gb + sql dump files), when you want to keep it fast and don’t care about presentation
6- When doing a wide Search and Replace on project files, an option to do it silently, as in not open the affected files and having to save manually, just some feedback about how many were changed.
7- I think there something close to it in the latest dev build, but a way to simply click (or some key shortcut) a filename / url in the code to open it, instead of copying the name and using the Goto Everything

Thanks a lot!

0 Likes

#52

As I said before, installing Discourse is a matter of minutes. Upgrading it’s a matter of seconds, every now and then.

But as long as you have any activity on the forum and don’t repeat 2014 in terms of communication, I guess we can start even a mailing list :smiley:

Think this way: a thing that can be shown via API, that’s clickable, allow basic formatting (font size, bold, italic, links), follow text cursor position and that doesn’t allow keyboard interaction (any manipulation of the tooltip would be managed via API) nor any keyboard blocking.

The obvious usage would be for any kind of intellisense. The problem with current solutions (one is posted by gregor.hoch above, the other one would be something similar to this of the intelliDocs) is that displaying such a popup will block your keyboard in a way or another (in first example you can’t use up/down arrows, in the second you can only use up/down arrows)


@Koan: few of the problems you raised can be done via plugins already!

  1. Selecting text in quotes is possible by pressing ctrl+shift+space (by default, no package installed). It’s a bit quirky on commented texts though…
  2. Emmet does that. The option is called Go to Matching Pair
  3. this plugin does what you ask
0 Likes

#53

I’m sure that I don’t have near the activity on this forum that the rest of you do, since I’m a genuine lurker, so this one may never get done. But if it were, it would be great for me:

  • Better handling of (rather large) plain-text files.

Large files cause ST3 to slow down dramatically and often crash. It’s not the load time that bothers me–nothing can be done about that–it’s the indexing or whatever magic ST3 is doing in the background. It’s not source code, so it doesn’t need indexing.

Also:

  • Find all in current file

Same separate window output as find all in files, but just search the current file. That would be awesome.

Welcome back!

0 Likes

#54

[quote]

[quote]guillermooo wrote:
Now you will get a modal error dialog warning you that the Python.tmLanguage file does not exist. If you have 20 or 200 Python files open, you will see as many error dialogs.[/quote]

Is this really the case? I tested this by deleting Python.tmLanguage, and only got the “Error loading syntax file…” error dialog once, despite having several Python files open. Looking at the code, this is what I’d expect: the syntax definition objects are shared amongst the text buffers, and will only be loaded once, even if that attempt results in an error.[/quote]

Hm. No, you’re right, it’s not exactly the case. Just tried and got a single error dialog displayed. But I get many dialogs occasionally. Don’t know which conditions trigger this case.

0 Likes

#55

Another behavior that I don’t quite understand:

$ subl .
[close ST]
$ cd some/other/dir
$ subl .

Now two projects open. I would expect only one to be opened. Sometimes it’s useful to have all recent projects open, but not usually.

0 Likes

#56

About the syntax defs missing, it must be because the package uses multiple syntax def files. So I suppose that if I rename them or delete them by mistake, I start getting a separate error for each syntax def. I almost never stop to read the error dialog, so I always thought the number of dialogs was equal to the buffers using the syntax def.

Anyway, it’s pretty annoying when it happens :slight_smile:

0 Likes

#57
  • FreeBSD 10+ support.

Thanks)

0 Likes

#58

In the .sublime-project file you can specify a “name” key/value pair, right? Well if I change my project name to be something that isn’t the folder name, the sidebar updates but the window title doesn’t.

See how the sidebar shows “Cachet Core” but the window title is “cachet”?

Please try to invest some time in this, Sublime is important, but so is the platform in which Sublime is discussed and communicated via you.

[quote=“jps”]
Tooltip API. A few people have mentioned this, I’d appreciate it if you expanded on it a bit: how you see it being used, and what capabilities you’d expect.[/quote]

I don’t think I have more to add on this other than what’s been said already.

0 Likes

#59

Good to hear from you, Jon.

A stable forum and an official bug/feature tracker would be great – more beneficial for more users than this or that feature.

Oh, and there seems to be some crashing going on with the latest build (on Ubuntu 64)

0 Likes

#60

Hi Jon,
and here my wishes :wink:

  • add Event: “OnCloseST”, that fires before SublimeText will shut down. That would be very useful to make final adjustments in plugins.

  • Other Events (not so important, but helpful): “OnKey”, that fires if a key was pressed, but before this message is given to the operating system. Should be give the key code of the pressed key and the states of SHIFT-, CTRL-, ALT-, WIN/CMD- Keys too, with the ability to discard the entered character.
    “OnChar”, that fires if a key was pressed and after the operating system has processed the message. With the same informations like before.
    If you know some Scintilla based editors - there will this events used and this is very, very useful in plugins.

  • Put all the libraries from a basic Python installation into ST. The’d us almost unlimited possibilities for expanding the plugin functionality offer. For example, Tkinter could be very effectively used for user interactions; in Windows system you would have access to registry informations and much, much more.

0 Likes

#61

Hello Jon,

thanks for your work!

Most important things:

  • official github org, why? Its easy and convenient way to fill a bug report, set priority and get it fixed :exclamation:, community members will help for sure to manage it
  • fixing old bugs, see github.com/SublimeTextIssues/ some of them already fixed but ppl need to apply them manually
  • include package control by default
  • often bugfix releases for ST, then new features
  • extended gutter api would be nice
0 Likes