Your comments

Is it possible to delete the 'trigger'. I know it is 'code completion', but?

This is going quite well...

In case anyone else is reading this, it turns out to be possible to have strings like :

" UnitWord{${1:unitname}} $0",


Which highlights "unit name" for you to overtype, and then on tab jumps to the $0 location.


One more question if I may: is it possible to delete the 'trigger'. I know it is 'code completion', but I suppose what I am really doing here is creating a snippet system. If not I can do a regex replace after writing, but I wondered if there was anything like $COMPLETION that might do the trick? Thanks again.

Thank you. It did—both platforms.


Now to get more adventurous—but tomorrow—there is quite a bit of the pml to shift from and implementation in the ACE online editor

Thanks Alexander:


I was trying it out on the Mac, where it is here:



So: /Users/Ian/Library/Containers/com.textasticapp.textastic-mac/Data/Library/Application Support/Textastic/CodeCompletion/pmlSimples.JSON


I'm afraid I got fed up with restarting the app to test my iterative attempts, so posted here. Glad at least the JSON is fine.


I've just copied it over to an iPad, and popped it in the correct folder, but still no joy. There is something weird going on here I tried renaming it to pm.JSON, and a copy and paste from this web page, in case either introduced gremlins.

Maybe just me. However for reference the Mac version is Version 3.2 (30) & the IoS version is whatever the latest update to version 6 is. html code completion works fine on either. Mystery. I'll come back to it later, I think. For now, I am out of ideas...At least the format looks tractable and you've given me some confidence that I might manage to bend it to my will.




I feel I should be able to do this, but there is a rising link. I'd like, as a first step, juts to be able to inert strings anywhere in a markdown file (scope text.html.markdown, apparently). Then I seem to need at least one completionSet and one Context. So, working with a minimal set, my JSON file in the CodeCompletion folder is:



{
"description": "Textastic Code Completion for pml simples",
"uuid": "2F13083A-0CA1-4211-A392-EBCD4AF5FAF8",

"completionSets": [
{
"name": "pml-metadata",
"defaultAppend": "XX",
"strings": [
{"string": "WebTitle: "},
{"string": "FileName: "}
]
}
],

"contexts": [
{
"description": "pml language",
"scope": "text.html.markdown",
"pattern": "~([a-zA-Z0-9]*)",
"completionCaptureIndex": 1,
"completionSetNames": [
"pml-metadata"
]
}
]
}


Bit no action? I understand this is not documented yet, but I am having a hard time looking at the few examples and tying to guess my way out of trouble.


At the moment I have the 'trigger' as '~', but I quite fancy 'pml': I cannot even tell if that is possible.


Thanks in anticipation