clifford-github / sublime-ansible

Syntax highlighting for Ansible
MIT License
135 stars 11 forks source link

Goto Symbol for tasks #22

Closed brx75 closed 1 year ago

brx75 commented 8 years ago

Hi, I found very useful Sublime Text feature Goto Symbol (Ctrl + R).

I just did a very simple patch to have this working:

A new file Ansible.tmPreferences

<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
    <key>name</key>
    <string>Symbol List: Tasks</string>
    <key>scope</key>
    <string>source.ansible keyword.other.ansible.task</string>
    <key>settings</key>
    <dict>
        <key>showInSymbolList</key>
        <integer>1</integer>
    </dict>
</dict>
</plist>

and a small change to tmLanguage:

- name: keyword.other.ansible.task
  match: \- (name\:|include\:) (.*)|(^(-)\w+\:)
  captures:
    '2': {name: string.quoted.double.ansible}

- name: keyword.other.ansible
  match: (^(\s*)\w+\:)
  captures:
    '2': {name: string.quoted.double.ansible}

`

killua99 commented 1 year ago

I'm closing this issue since the package as been rewritten from scratch. Feel free open a new issue when the new package hit mainstream