Edit the code in the opened tab

28 views Asked by At

im doing a plugin to the cloud 9 sdk its basically a simple autocomplete for c language

my issue is that when i complete the name of the function the ide doesn't reserve the change meaning the next time he edit the line it will go back to before the line was edited

for example if i write pri then selected printf then pressed space it will be "pri " not "printf "

here is my code

2

There are 2 answers

0
Robert On BEST ANSWER

here is what i found

ace.scrollTo(row, column);
clipboard.clipboardData.setData("text/plain", "text to add");
clipboard.paste();

you will need to include clipboard and ace to consumes for that code to work

2
a user On

modifying html inside ace won't work. If you want to create a new completer, create a lnaguage handler https://cloud9-sdk.readme.io/docs/customizing-code-completers which will use built in completer popup