Sublime Forum

Dev Build 2150

#1

Dev Build 2150 is out now, with a collection of misc changes - details are on the dev build page

0 Likes

#2

Wow, development again at full throttle :smiley:
Thanks for the last builds with all great features added.

Now don’t you think that at least the main page of the ST web site need some work ?
The new bold/italic syntax support is gorgeous and the screenshots of the site need to be updated (with larger images).

0 Likes

#3

With a plugin, I try to change the encoding of file at opening when the file contains only ASCII chars.
This is the relevant part of the plugin:

[code]class AutoOpenDefaultEncodingListener(sublime_plugin.EventListener):
def on_load(self, view):
def_encoding = view.settings().get(“default_encoding”, “UTF-8”)
# if default_encoding is not UTF-8 and actual encoding is UTF-8
if def_encoding != “UTF-8” and view.encoding() == “UTF-8”:
# Check if buffer contains only printable ASCII char.
if not view.find("^ -~\s]", 0):
# Only ASCII char. -> Reopen file with default_encoding
sublime.set_timeout(functools.partial(self.switch_encoding, view, def_encoding), 0)

def switch_encoding(self, view, req_enc):
    if view.is_dirty():
        # some other plugins has modified this
        # file on_load, ignore encoding switch
        return
    sel = list(view.sel())
    view.run_command("reopen", {'encoding': req_enc})
    sublime.set_timeout(functools.partial(self.restore_selection, view, sel), 0)

def restore_selection(self, view, sel):
    view.sel().clear()
    for s in sel:
        view.sel().add(s)[/code]

It work well except for the previewed files (ctrl+p):
Running the reopen command on the preview file act like a change in this file and it result that the file is opened for ‘real’ (new tab) what I don’t want.

Any idea on how achieve what I want ?

BTW, on previous build when the file is reopened the modified icon mark is briefly showed in the sidebar, not anymore in this build (which is good).

Thanks for your help.

PS: Part of this code come from http://bitbucket.org/wuub/subarwe

0 Likes

#4

Amazes me how quick JPS is in developing SublimeText!

0 Likes

#5

yessss

0 Likes

#6

Thank You. Thank You. Thank You. Thank You. Thank You. Thank You. Thank You. Thank You. Thank You. Thank You. Thank You. Thank You. Thank You. Thank You. Thank You. Thank You. Thank You. Thank You. Thank You. Thank You. Thank You. Thank You. Thank You. Thank You. Thank You.

0 Likes

#7

I am excited!

0 Likes

#8

Could we have Sublime load plugins in nested folders of the User package?

0 Likes

#9

If you’re planning on doing some work on the side bar, can i recommend the ability to hover the side bar over the editor, or an auto-hide side bar option?
For quick peeks. For instance, say I press ctrl+0 the side bar should pop up and when I select a file perhaps it could close again.
The command palette is great, but sometimes it’s nice to visualize the file hierarchy of the project to quickly find the file I need.

Also, really nice editor - thanks :smile:

0 Likes

#10

Thank you! The way you develop ST is amazing and is an inspiration to me. Please keep your vision and don’t let myriads of various suggestions coming from everyone to distort it :smile:

0 Likes

#11

What will adding this feature enable users to do?

0 Likes

#12

[quote=“MrMartineau”] API: Added window.get_layout() and window.set_layout()

What will adding this feature enable users to do?
[/quote]

http://retortrecords.com/sounds/patterns-jerry.png

More seriously, have you ever used tmux? Rotating the tiles and resizing the cells/views via keyboard? All possible now.
Have you ever had a twin vertical layout setup then switched to single panel and lost your tab organisation when you went back to a twin V layout?

By adding those APIs Jon empowers the community to empower ourselves.
With just a few more APIs (available in ST1 but not yet in ST2) you could do some pretty cool stuff:

window.active_view_in_group( … )
window.get_view_position( … )
window.views_in_group( … )

With an API to get a cells (rows, cols) dimensions (characters) you could create (v|h)split at cursor plugins.

0 Likes

#13

I imagine we could see some interesting plugins allowing side-by-side file comparisons. Certain VCSs come to mind :smiley:

0 Likes

#14

I wonder, would it be possible to tweak the new “view as hexadecimal” behavior a bit. As far as I understand, hex-mode triggers when the “0” byte is found within the file, but it is usually not the case for, e.g. pdf files: these have loads of non-printable characters, but no nil byte, hence they display not-so-properly. Maybe a wider range of characters for hex-mode trigger could be used?

0 Likes

#15

Thank you!

0 Likes