Sublime Forum

Dev Build 2162

#5

window.get_view_index()

w00t! Jon, your a scholar and a gentleman and all that jazz!

0 Likes

#6

It would be nice to get

window.get_view_row()
window.get_view_col()

To update bufferscroll and properly restore views.

0 Likes

#7

Very stilistic thing with auto_complete is that remains open even when you typed the whole word and there is no other options.

0 Likes

#8

window.get_view_row()
window.get_view_col()

What are you wanting to do?

0 Likes

#9

For example:
I have the same view(a clone) opened left, right and above. all with different selections and scroll position.

What I want, is a way to save the scroll and selections of each view, restoring these the next time I open the file.

0 Likes

#10

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.

0 Likes

#11

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

on transform.py

I changed the class

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

to:

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.

0 Likes

#12

[quote=“castles_made_of_sand”]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.[/quote]

I will take a look… Thanks :smile:

0 Likes

#13

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:<super+z>

EDIT: It stopped happening when I disabled the html5 package, which have a snippet with the same tab-trigger

0 Likes

#14

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!

0 Likes

#15

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

unbound method shmethod :smile:

eg.

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
0 Likes

#16

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.

0 Likes

#17

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 :smile:
  • 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.

0 Likes

#18

[quote=“C0D312”]Awesome!

  • This build seems to have fixed the ZenCoding plugin.
    [/quote]

Sweet. Awesome, thanks!

0 Likes

#19

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.)

0 Likes

#20

[quote=“CaptainCrowbar”]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.)[/quote]

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.

0 Likes

#21

Jon, I love you for fixing the paste and indent :smile:
The only slight irritation now is the tab to insert completion, but I’ll give it a fair shake at working my muscle memory to it :smile:

Thanks for fixing that pasting thing!

0 Likes

#22

Sweet!

I keep getting tripped up by the tab/enter auto complete though :smiling_imp: I totally understand why though, so it’s a good thing!

0 Likes

#23

[quote=“jps”]Dev Build 2162 is out now. The next beta version should be out this week, so please let me know of any unresolved issues introduced in this series of dev builds.
[/quote]

“auto_match_enabled” works kind of funky: Suppose you have an empty buffer, type “))” and now place the cursor at the begging of the text (ie: “|))”, where | marks the cursor pos). Now try to insert a new parenthesis. You have to hit three times in order for the intended character to appear “)))|”, because each time you press “)” in that situation, it only moves the cursor one character to the left.

I’m not quite sure, but I think this used to work on early builds (< 2138 perhaps?).

I know the example is a bit weird, is just to make the problem obvious.
It usually bugs me when I need to add a closing parenthesis, square bracket, etc, just to the left of one of those characters. Example: “some_func((“missing parenthesis here->”|)”.

0 Likes

#24

This bugs me when inserting parentheses, too. For me it makes the most sense to use this keybinding: [code] { “keys”: “enter”], “command”: “move”, “args”: {“by”: “characters”, “forward”: true}, “context”:

    { "key": "following_text", "operator": "regex_contains", "operand": "^)\"\\]]", "match_all": true },
    { "key": "auto_complete_visible", "operator": "equal", "operand": false }
]   

}[/code]

instead of overriding the behavior of ", ), and ].

0 Likes