Home Download Buy Blog Forum Support

Dev Build 2162

Re: Dev Build 2162

Postby tito on Mon Jan 09, 2012 1:40 pm

There is some people complaining that "title case" command is not working properly.

on transform.py

I changed the class

Code: Select all
class TitleCaseCommand(Transformer):
    transformer = lambda s: string.capwords(s, " "),


to:

Code: Select all
class TitleCaseCommand(Transformer):
    transformer = unicode.title,


works as expected. Tested on clean profile. I'm not sure if this will get problems with views on different encodings.
Give APIs, let the community build the rest!
https://github.com/titoBouzout
tito
 
Posts: 706
Joined: Thu Sep 29, 2011 2:27 pm
Location: Montevideo, Uruguay

Re: Dev Build 2162

Postby tito on Mon Jan 09, 2012 1:40 pm

castles_made_of_sand wrote:`window.get_view_index(view)` returns the group index, and index within that group for each view. The group index indexes each `cell` in the active layout, also corresponding to the `group` in the `focus_group` and `move_to_group` commands. Jon, late last year, added a whole heap of APIS for very precise scrolling for when you want something beyond view.show(view.visible_region())

If I'm understanding you correctly all the APIs you need should be there.

I will take a look.. Thanks :)
Give APIs, let the community build the rest!
https://github.com/titoBouzout
tito
 
Posts: 706
Joined: Thu Sep 29, 2011 2:27 pm
Location: Montevideo, Uruguay

Re: Dev Build 2162

Postby weslly on Mon Jan 09, 2012 1:41 pm

I've noticed a bug since the last build, when I do the following on OSX, sublime crashes:

> set syntax to html

>type the following:
html:<tab><backspace><backspace><tab><tab><super+z><tab>


EDIT: It stopped happening when I disabled the html5 package, which have a snippet with the same tab-trigger
Last edited by weslly on Mon Jan 09, 2012 1:57 pm, edited 1 time in total.
weslly
 
Posts: 198
Joined: Sun Aug 28, 2011 3:57 am
Location: Brazil

Re: Dev Build 2162

Postby deadark on Mon Jan 09, 2012 1:42 pm

About the completions using the tab rather than using Enter...what about adding a config to define the key that every one want to use for that?

Also, in the CSS autocomplete I found that after adding some property, now don't show autocomplete options.

#id { display: <--- may show block, inline, none, etc...


In previous DEV versions it was working well.

Thanks!
deadark
 
Posts: 9
Joined: Tue Sep 06, 2011 11:37 pm

Re: Dev Build 2162

Postby sublimator on Mon Jan 09, 2012 1:45 pm

Should probably use `self.transformer.im_func` instead of `self.transformer[0]` whichs run that risk of syntactic ambiguity.

unbound method shmethod :)

eg.

Code: Select all
class Transformer(sublime_plugin.TextCommand):
    def run(self, edit):
        self.transform(self.transformer.im_func, self.view, edit)

    def transform(self, f, view, edit):
        for s in view.sel():
            if s.empty():
                s = view.word(s)

            txt = f(view.substr(s))
            view.replace(edit, s, txt)

class SwapCaseCommand(Transformer):
    transformer = string.swapcase

class UpperCaseCommand(Transformer):
    transformer = string.upper

class LowerCaseCommand(Transformer):
    transformer = string.lower
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
sublimator
 
Posts: 648
Joined: Thu Mar 20, 2008 5:41 am

Re: Dev Build 2162

Postby fjl on Mon Jan 09, 2012 2:32 pm

This is kind of a long standing issue, the autocomplete window will be displayed off screen if the cursor is near the lower edge of the monitor.
Attachments
sublime-completion-offscreen.png
a screen shot right off the egde of my screen (transparency is compiz being quicker than the screenshot tool, nevermind)
sublime-completion-offscreen.png (46.89 KiB) Viewed 987 times
fjl
 
Posts: 36
Joined: Wed Dec 28, 2011 12:41 am

Re: Dev Build 2162

Postby C0D312 on Mon Jan 09, 2012 4:10 pm

Awesome!

- This build seems to have fixed the ZenCoding plugin.
- The new menu organization threw me off for a bit, then I remembered that I use keyboard shortcuts for everything :)
- This build seems to have changed the keybinding for "build" to F7 on OSX instead of command+b. Was this on purpose to keep it standard across platforms?
- The new autocomplete is perfect; it's much more straight forward as to what will happen when I press a certain key.

I'm interested in seeing castles_made_of_sand's plugin that he needed window.get_view_index() for.
Last edited by C0D312 on Mon Jan 09, 2012 4:17 pm, edited 2 times in total.
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: Dev Build 2162

Postby handycam on Mon Jan 09, 2012 4:17 pm

C0D312 wrote:Awesome!
- This build seems to have fixed the ZenCoding plugin.


Sweet. Awesome, thanks!
Mac OS 10.8.5
ST 3 (3053)
handycam
 
Posts: 269
Joined: Tue Jan 03, 2012 2:42 pm

Re: Dev Build 2162

Postby CaptainCrowbar on Mon Jan 09, 2012 4:30 pm

I hate to nag, but four bugs I reported over the last few months are still unfixed (on the Mac version; I don't have a Windows box on hand to check):

* ST always opens a new window when it restarts at login, even if there was no window open before.

* The Preferences > Browse Packages menu item is disabled when no window is open.

* The File > Open Recent list is empty when no window is open.

* The File > Open Recent list doesn't show recent folders any more. (This may have been a deliberate change, but if so I'd like it back, please.)
CaptainCrowbar
 
Posts: 24
Joined: Tue Aug 02, 2011 4:31 am

Re: Dev Build 2162

Postby C0D312 on Mon Jan 09, 2012 4:44 pm

CaptainCrowbar wrote:I hate to nag, but four bugs I reported over the last few months are still unfixed (on the Mac version; I don't have a Windows box on hand to check):

* ST always opens a new window when it restarts at login, even if there was no window open before.

* The Preferences > Browse Packages menu item is disabled when no window is open.

* The File > Open Recent list is empty when no window is open.

* The File > Open Recent list doesn't show recent folders any more. (This may have been a deliberate change, but if so I'd like it back, please.)


The only one of these that I can reproduce is the Browse Packages being disabled. However, I don't really mind because I rarely use that button.
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: Exabot [Bot], mlf and 13 guests

cron