Sublime Forum

Dev Build 2069

#1

Dev Build 2060 is out now.

One of the new features is the Command Palette (accessible via the Tools menu), which provides a keyboard driven way to select commands usually relegated to the menu - it’s especially useful for switching the currently active syntax highlighting mode. It’s driven by *.sublime-commands files, of which there’s currently only one, in the Default package. It’s fairly spartan; I’m more than happy to receive any patches here.

Also new in this build is the long awaited quick panel API, allowing plugins to present lists to the user. A short example that presents two items, each with 2 bits of secondary information to the user:

import sublime, sublime_plugin

class QuickPanelExampleCommand(sublime_plugin.WindowCommand):
    def callback(self, index):
        print "selected index:", index

    def run(self):
        items = "Item 1", "Subtext 1a", "Subtext 1b"], "Item 2", "Subtext 2a", "Subtext 2b"]]
        self.window.show_quick_panel(items, self.callback)
0 Likes

#2

Yippeeeeeeeeee !!!

You make my day Jon !
Quick panel look great and I like the new Command Palette very much, great idea !
Is there a way to customize the content of the Command Palette using the Syntax Type of the active view (to have per file type command) ? Like context:selector ?

Thanks for these blazing fast releases with lot of great things.

0 Likes

#3

First little bug:
The Clone command does nothing for me when called from the Command Palette, it work when called from the File menu.

startup, version: 2069 windows x64 channel: dev

0 Likes

#4

Good find - it’s a typo in the Default.subime-commands file, where the command is listed as “clone” instead of the correct “clone_file”.

0 Likes

#5

Awesome!!!

Just what I was after!

Thanks for adding this Jon. It’s made using Sublime truly Sublime :smile:

0 Likes

#6

@jps: Now that we have the quick panel, is there a way of getting a list of the recently used files so a plugin could display a list to the user?

0 Likes

#7

You could combine it with the OpenLastFile plugin, which I believe keeps a list of files. Omnom.

0 Likes

#8

True, but it looks like each project maintains it’s own recently used list of files which would provide a much richer user experience.

0 Likes

#9

One annoying thing with the quick panel is that it selects an item by default. I couldn’t see a switch to turn this off?

Also, can a quick panel show a “group”, as in, a list of a list?

0 Likes

#10

For the love of bejeezus, that Command Palette is good.

Ctrl+Shift+P he [enter]

So good.

0 Likes

#11

Ctrl+Alt+P opens the projects picker now. This used to be the shortcut for showing the current scope. How do we show scope now?

0 Likes

#12
{ "keys": "ctrl+alt+shift+p"], "command": "show_scope_name" }

Always look on the bright side of the life !
:smile:
Euh non:
Always look at the Default (XXX).sublime-keymap

0 Likes

#13

Not sure which update this occurred in (I know it wasn’t this one), but can lines be highlighted again when there’s a selection? Makes it easier to spot where selections are.

0 Likes

#14

S2 has always worked the same way - a line highlight will only be displayed in the gutter when the selection is non-empty. You may want to change the selection colour to make them easier to spot.

0 Likes

#15

Was it maybe a bug then? I am positive I was getting line highlights during selection in 2058 which I was just using a few days ago. Maybe not when the selection spanned multiple lines, but I clearly remember using ctrl+d and find all on a word and scrolling through a file fast and using the line highlights to find the selections.

0 Likes

#16

Another “example” plugin using the quick panel API.

0 Likes

#17

It has a -1 value if nothing is selected. My bad!

0 Likes

#18

I noticed a weird bug in 2069 (this might be a bug from previous builds, I’m not sure). I did a search for a word with CTRL + F to fix a typo, then copied a portion of text and wanted to paste it, but instead of my initial copied text I got this:

img577.imageshack.us/img577/6701/sublime.png

0 Likes