Home Download Buy Blog Forum Support

Sublime Text X 20101208

Re: Sublime Text X 20101208

Postby oats on Tue Dec 14, 2010 4:21 pm

Thanks for your continued work on this! I'm particularly looking forward to a full OS X version.

I know you are working on adding features gradually, one thing that would help me be more productive using it is the middle button select. You know, clicking the scoll button to do column highlighting, etc. I tend to do that a lot, love that feature.

Also, any way to hide the minimap? The position change throws me off a bit, and I'd like to hide it - I tend to not use it anyway since I can't click on it to jump around.
oats
 
Posts: 101
Joined: Mon Nov 09, 2009 4:39 pm

Re: Sublime Text X 20101208

Postby jps on Tue Dec 14, 2010 10:02 pm

hnrch wrote:Thanks a lot Jon! buffer selector is fixed, but select_lines command not working on Ubuntu yet.


select_lines works, but on Ubuntu the window manager eats the ctrl+alt+arrow keys combination; it just needs a different key binding.

oats wrote:one thing that would help me be more productive using it is the middle button select.


You can column select using shift+right mouse button drag (works under Sublime Text 1.x too). The middle mouse button is already spoken for under X windows, which is why I'm no longer using it for column select.

There's no way to hide the minimap yet, but there will be in the future.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: Sublime Text X 20101208

Postby oats on Wed Dec 15, 2010 5:37 pm

jps wrote:The middle mouse button is already spoken for under X windows, which is why I'm no longer using it for column select.

Oh no! I've become addicted to using the middle button... any chance you could support an option to map the middle button to shift-click for those not using Xwin?
oats
 
Posts: 101
Joined: Mon Nov 09, 2009 4:39 pm

Re: Sublime Text X 20101208

Postby noonat on Wed Dec 15, 2010 6:20 pm

Some bugs in build 20101210:
  • Sublime crashes then continues to crash indefinitely, until I delete Session.sublime_session. I tried to diff and track down what's causing it, but couldn't. All the crashes seem to be one of the following four stack traces, though:
  • Clicking on a file in the project section of the sidebar opens it, but doesn't actually add it to a group. The file is not closeable (you have to switch to another file).
  • Similar bug with multiple columns. When opening a file using cmd+p or cmd+shift+o, the files are previewed while you are typing. If a file is previewed in column 1, but the final file that you open opens in column 2, the previewed file is left open in column 1, and is not closeable.
  • Fullscreen window doesn't react to resolution changes. This shows up most often when I close the laptop at home, then go to work and plugin an external monitor -- window is in fullscreen mode but not fullscreen.
  • cmd+a doesn't work to select all the text in the quick file open popups.
noonat
 
Posts: 4
Joined: Thu Dec 09, 2010 9:05 pm

Re: Sublime Text X 20101208

Postby jps on Wed Dec 15, 2010 9:09 pm

noonat wrote:Clicking on a file in the project section of the sidebar opens it, but doesn't actually add it to a group. The file is not closeable (you have to switch to another file).


That's a feature, not a bug. It allows you to browse files in a project without cluttering your list of open files. To add the file to the list of open files, either double click instead of single click, or start editing.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: Sublime Text X 20101208

Postby jps on Wed Dec 15, 2010 9:20 pm

noonat wrote:Some bugs in build 20101210:


Thanks for the crash reports, by the way. I know what's going on with one of the four, but the others I'm not immediately sure about. If it happens again, and you aren't editing any sensitive files (the contents of every modified file is stored in the session), would you be up for email the .sublime-session file to me?
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: Sublime Text X 20101208

Postby jps on Wed Dec 15, 2010 10:21 pm

sublimator wrote:Look at the new API, it seems commands are referencing 'self.view' which implies having a command instance per view.

Code: Select all
def create_text_commands(view):
    cmds = []
    for class_ in text_command_classes:
        cmds.append(class_(view))
    return cmds

class TextCommand(Command):
    def __init__(self, view):
        self.view = view


Can you give us some info on the life cycle of commands in X? I'm interested to know the reasoning behind this change. Does each view get every command primed for it at 'some point'?


Yep, there's one instance of the command per-view. They get created for a particular view the first time any command is run on that view. The reasoning is simply because that's how things work within the C++ UI toolkit (aka 'hydra'), so it makes things a little simpler this way. I think that if you do need to write a stateful command (to be avoided where possible, so that the command works properly with macros), life is a bit simpler this way, compared to having only global state available.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: Sublime Text X 20101208

Postby noonat on Thu Dec 16, 2010 1:12 am

jps wrote:That's a feature, not a bug. It allows you to browse files in a project without cluttering your list of open files. To add the file to the list of open files, either double click instead of single click, or start editing.

Ah, that's cool. I guess it just felt like a bug because the normal action to get rid of a buffer I don't want (cmd+w, for me) didn't do anything... so it felt "stuck" there.

jsp wrote:If it happens again, ... would you be up for emailing the .sublime-session file to me?

Will do.
noonat
 
Posts: 4
Joined: Thu Dec 09, 2010 9:05 pm

Re: Sublime Text X 20101208

Postby gpfsmurf on Tue Dec 21, 2010 5:27 pm

jps wrote:Yep, there's one instance of the command per-view. They get created for a particular view the first time any command is run on that view. The reasoning is simply because that's how things work within the C++ UI toolkit (aka 'hydra'), so it makes things a little simpler this way. I think that if you do need to write a stateful command (to be avoided where possible, so that the command works properly with macros), life is a bit simpler this way, compared to having only global state available.


Makes sense, but what if a particular command needs to maintain a single state for a file or a whole window, what would be the best way to achieve this?
gpfsmurf
 
Posts: 211
Joined: Mon Jun 23, 2008 6:31 pm

Re: Sublime Text X 20101208

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

oats wrote:Oh no! I've become addicted to using the middle button... any chance you could support an option to map the middle button to shift-click for those not using Xwin?


I'll add it to the todo list.

gpfsmurf wrote:Makes sense, but what if a particular command needs to maintain a single state for a file or a whole window, what would be the best way to achieve this?


- For state associated with a single view, use object scoped variables in the command
- For state associated with a single buffer, either use the regions API if appropriate, otherwise store in a (global) buffer id keyed dictionary
- For state associated with a window, use a (global) window id keyed dictionary

Window ids aren't yet present in the X api, but they will be in the future.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

PreviousNext

Return to General Discussion

Who is online

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