Sublime Forum

Automatically add list item


Hi, newbie question here. When creating a long list, it’s a pain to have to type in the

  • tag at the beginning of each list item. Is it possible to set thing up so that a new li tag pair appears automatically after hitting ENTER at the completion of the previous list item?


    So I guess I should have done more searching before posting here because I found this answer:

    So what I did was record a macro at the end of a list item text entry: >>>>>[RETURN]<li[RETURN] and saved it as Add List Item. Then I created a user key shortcut from the Preferences/Keybinding menu that allows me to launch the macro using Alt+Command+l key combination. The keymap entry is as follows:

    { “keys”: [“command+alt+l”], “command”: “run_macro_file”, “args”: {“file”: “Packages/User/Add List Item.sublime-macro”} }

    1 Like