Sublime Forum

Dev Build 2162

#2

Great works. This is the right auto completemethod and tab key is easier to touch than Enter.

The auto complete system is almost perfect. But I still found Sublime text 2 lack of calltips feature. I like this feature very much.

komodo codeintel plugin can show the tips in the statusbar, but a popup windows with tips is a better way to do such thing.

0 Likes

#3

Thanks for the update.
There is a small issue with autocompletion. Let’s say we have this block of code:

[code]

<?php $is -> ?>

is bookable? [/code]

If im pressing tab after $is, the autocompletion works as expected. But if i’m pressing tab again… nothing happens (should add a tab char, no?).

0 Likes

#4

[quote=“iamntz”]Thanks for the update.
There is a small issue with autocompletion. Let’s say we have this block of code:

[code]

<?php $is -> ?>

is bookable? [/code]

If im pressing tab after $is, the autocompletion works as expected. But if i’m pressing tab again… nothing happens (should add a tab char, no?).[/quote]

Happening if you press tab before the completion window appear, the log is:

command: insert_best_completion {"default": " ", "exact": false} command: replace_completion_with_next_completion
If you wait the window, the log is:

command: commit_completion command: insert_best_completion {"default": " ", "exact": false}

0 Likes

#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