Not signed in (Sign In)

Categories

Vanilla 1.1.1 is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthorJack Sleight
    • CommentTimeJan 7th 2007 edited
     permalink

    When you hit ESC to cancel/leave the snippet mode, I think it work be more useful if the cursor moved to the end point, rather than just staying where it is.

    Also, it would be useful if the keywords used for activating a snippet were case insensitive.

  1.  permalink

    Ok, I’ll think about it…

  2.  permalink

    Case insensitivity should be language specific if it is implemented at all.

    • CommentAuthorIAIHMB
    • CommentTimeJan 7th 2007
     permalink

    I like things the way they are. :\

  3.  permalink

    Yeah, the case insensitivity is only a minor thing, but think the ESC function is important (even if it was just an optional setting). The way I see it, you would only hit ESC when you no longer want to edit any of the areas in the snippet, much like when you have tabbed through them all. So the most logical place for the cursor to go, whenever the snippet is finished with, is the end point, as that’s where you are most likely to continue typing from.

    Just my opinion, but please make it an option at least.

    • CommentAuthorBrendonKoz
    • CommentTimeJan 8th 2007 edited
     permalink

    Does ESC actually have any specific use while in snippets “mode”? Perhaps I wasn’t actually in that mode, because I didn’t notice anything. However, snippets mode (if I was in it) doesn’t stop you from moving from outside the current set, and using directional keys or the HOME/END keys.

    • CommentAuthori
    • CommentTimeJan 8th 2007
     permalink

    Well, ESC cancels snippets mode. In snippets mode, pressing TAB will select the next item of interest. While TAB in “normal” mode indents..

  4.  permalink

    Ah, I see the importance then. Thanks. :)

    • CommentAuthorcorelon
    • CommentTimeJan 9th 2007
     permalink
    By the way I just noticed a good use of the ESC key while in snippets mode (although the specific case is more of a "bug").
    I am using Python bundle which when typing "class" then Tab it creates a class skeleton. The final Tab press in this case will guide you just after the class. The problem is the following: in Python bundle when pressing "." then Tab the "self." snippet gets called. In the case of the class snippet I mentioned you would only need "self." within the __init__ method that gets created automatically. But as it happens to be the one before last position, when I press "." and then Tab instead of getting "self." I get out of the class!
    This is obviously an issue of "nesting" snippets, i.e. calling one snippet while being within another snippet. Is this possible? Or will it be in the future? As you can imagine there can be quite a few cases where this would be convenient (or even important)
    •  
      CommentAuthorFrederick
    • CommentTimeJan 9th 2007
     permalink

    Somehow I got it in my head that nesting snippets was already possible, but clearly it isn’t. Consider it requested as hell.

    • CommentAuthori
    • CommentTimeJan 9th 2007 edited
     permalink

    Mmm… slightly different, but.. i like the idea of typing something like “html.head” and “body.form” and have it expand it all automatically. The subsequent snippets could be expanded at the $0 position of the previous snippet. We could perhaps extend that idea to including a “skip” character so that we can do this: “html.head/.body.form” with the / character meaning to break out of the current nesting one level (ie, put the cursor at the end of the current snippet, instead of at the tab $0 position) while two // goes up two levels.

    Frederick and corelon: I’ve added it under Snippets

    • CommentAuthormartincohen
    • CommentTimeJan 10th 2007 edited
     permalink

    Something very similar will be possible with scripting.

    •  
      CommentAuthorFrederick
    • CommentTimeJan 10th 2007 edited
     permalink

    At first thought it sounds almost bloated, but maybe it would be useful and could possibly be executed in a rather usable fashion. I’d like to explore it further when scripting support arrives.

  5.  permalink

    Ok, I deciced to implement the original idea. The ESC key will move caret to end point. Feature has been added to our feature list.