Skip to content

Conversation

@kerbyfc
Copy link

@kerbyfc kerbyfc commented Jan 1, 2015

Hi, i know nothing about sublime text plugin architecture, but i'll be happy to have an ability to use codo with this plugin. There are minimal (but may be not valid) changes to make it possible.

My use case for codo:
  #<enter>
  render: ->
    <div>LDAP VIEW</div>

  # becomes

  #
  # [render description]
  # @return {[type]} [description]
  #
  render: ->
    <div>LDAP VIEW</div> 
Keymap:
    // open a docblock with enter
    {
        "keys": [
            "enter"
        ], 
        "command": "jsdocs",
        "args": {
            "prefix": "#",
            "options": {
                "commentCloser": "#"
            }
        },
        "context": [
            { 
                "key": "setting.auto_indent",
                "operator": "equal",
                "operand": true,
                "match_all": true 
            },
            { 
                "key": "selection_empty",
                "operator": "equal",          
                "operand": true,                         
                "match_all": true 
            },
            { 
                "key": "auto_complete_visible", 
                "operator": "equal",          
                "operand": false,                        
                "match_all": true 
            },
            { 
                "key": "selector", 
                "operator": "equal", 
                "operand": "source.coffee" 
            },
            { 
                "key": "preceding_text",        
                "operator": "regex_contains", 
                "operand": "^\\s*(#)\\s*$", 
                "match_all": true 
            }
        ]
    }

Thanks, anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant