Home Download Buy Blog Forum Support

Sublime Text X 20101217

Sublime Text X 20101217

Postby jps on Fri Dec 17, 2010 3:30 am

20101217 is out now, with auto complete support. From the UI perspective, auto complete works a bit differently than what's in Sublime Text: Press Ctrl+Space (all platforms) to activate auto complete, this will insert the most likely option, and show a list of the other available completions. Press Ctrl+Space again or Ctrl+Shift+Space to cycle through the available options.

It's worth noting that apart from escape, no other keys are hijacked when the auto complete list is displayed: the arrow keys will move the cursor, and not select different options in the auto complete list. Auto complete will work with multiple selections, but only if each selection has the same text before it.

There are a few other changes too: a duplicate line command, pressing F3 to go the next find result will centre the result on screen, rather than having it near the edge of the screen (the same change will also effect bookmarks and goto symbol when they're implemented), and Ctrl+F4/Ctrl+w will now close transient views (i.e, what you get when single clicking on a file in the project).
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: Sublime Text X 20101217

Postby jps on Fri Dec 17, 2010 11:33 am

What do you mean by that?
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: Sublime Text X 20101217

Postby jps on Sat Dec 18, 2010 12:04 pm

Being able to type with the auto complete window up implies that another key press to confirm the choice is required - typically enter is hijacked for this, meaning it has to be pressed twice while the window is up.

I'm not committed to the way the auto complete UI currently works, it could be changed if the current implementation isn't popular.
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: Sublime Text X 20101217

Postby mikeb on Mon Dec 20, 2010 3:54 am

Noticed an issue with autocomplete on mac osx in python. When ctrl+space is pressed, the match is completed but there is no popup window, nor do additional presses of spacebar cycle through the other options. Also it appears that it does complete local function names, and variables, but not stuff like "print" from the python libraries.

As an example, when I attempt to complete "pr" it doesn't popup or complete anything in an empty python file, but if I have a variable name pram1, it completes that. I am on OSX 10.6, python 2.6.1 and STX 20101217.

On windows I tried out the completion and it worked just as described and works fine. As for whether using ctrl+space to choose options, I'm not sure yet, but want to give it a chance and use it a bit. Immediately it wasn't what I expected coming from different editors where completion usually narrows the list as characters are added, and you can select a choice via tab or by pressing dot if access class members.

The new method does make sense in that it's fewer keys and probably less complex to implement. The only downside I can see is if there were a very long list of options.
mikeb
 
Posts: 31
Joined: Mon Sep 07, 2009 12:33 am

Re: Sublime Text X 20101217

Postby jhawk28 on Mon Dec 20, 2010 4:42 pm

I am used to the ctrl-space for autocompletion, but I find the selection of word using the up/down arrow keys more intuitive.
jhawk28
 
Posts: 26
Joined: Sat Jun 13, 2009 2:17 pm

Re: Sublime Text X 20101217

Postby jps on Wed Dec 22, 2010 11:25 pm

mikeb wrote:Noticed an issue with autocomplete on mac osx in python. When ctrl+space is pressed, the match is completed but there is no popup window, nor do additional presses of spacebar cycle through the other options.


If there's only one possible match, then it will be inserted with no window popup - it sounds like this is what's happening here?

mikeb wrote:Also it appears that it does complete local function names, and variables, but not stuff like "print" from the python libraries.

As an example, when I attempt to complete "pr" it doesn't popup or complete anything in an empty python file, but if I have a variable name pram1, it completes that. I am on OSX 10.6, python 2.6.1 and STX 20101217.


The completions are sourced only from what's present in the current buffer - this will be expanded in the future.
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: Sublime Text X 20101217

Postby mikeb on Thu Dec 23, 2010 2:56 am

If there's only one possible match, then it will be inserted with no window popup - it sounds like this is what's happening here?


Now that I look at it again, I think so... was just comparing the completion list that showed up in windows version to the mac version, and so in fact it's working normally with the exception that mac doesn't have quite as complete of a list items to pop up.

Also wanted to clarify my earlier comment where I wasn't explicit in that ctrl+space is what I have found used in all other editors to initiate the autocomplete list to drop-down.

One question, are packages like zoom enabled in x yet?

mike

ps Thanks for an awesome editor!
mikeb
 
Posts: 31
Joined: Mon Sep 07, 2009 12:33 am


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 33 guests