randy3k / AlignTab

An alignment plugin for Sublime Text using regular expression

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding new named pattern to users settings file doesn't work

webdevbrian opened this issue · comments

Hi,

Attempting to add a new pattern to align by (in this case a left open curly bracket) - after modifying the users settings file (as you cannot modify the default settings file) results in nothing happening.

{
"named_patterns": {
"first_equal": "=/f",
"first_comma": ",/f",
"first_colon": ":/f",
"first_period": "./f",
"first_bracket": "{/f"
},
// disable auto_match in the input panel
"auto_match_enabled": false
}

It works for me. Where did you save your file? You should save it to Packages/User/AlignTab.sublime-settings

I'm going to Package Settings -> AlignTab -> Settings - User

Added my new named pattern, hit save, no dice. I can even go back into that file and my changes are there, AlignTab just doesn't add anything based off the file it seems.

http://d.pr/i/j3dO/2WsJPX3m

I also uninstalled it, and reinstalled -- same thing. Any ideas?

You are confused between context menu and named pattern.

To use named pattern, you type first_bracket instead of {/f in the input panel.
To change the context menu, you have to change Context.sublime-menu.

Ah ha - where is that located? Thanks for the help on this Randy.

I have updated the package documentation and some setting to make this easier.
However, it may take some time for package control to cache the update. You may either wait a little while, or install it via git clone.

If you have any problems to follow the documentation, please tell me.

Awesome! This worked like a peach with the new context menu:

      {
      "caption" : "First {",
      "command" : "align_tab",
      "args"    : {"user_input" : "\\{"}
      }

Thanks Randy!