0

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

Robert
  • 2,342
  • 2
  • 24
  • 41

2 Answers2

0

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

a user
  • 23,300
  • 6
  • 58
  • 90
  • i find a solution, coping my text to clipboard and then ask it to paste it :D – Robert Dec 27 '16 at 01:04
  • but if you can write a code to do that i will really appreciate it, cause my code just add not remove text – Robert Dec 27 '16 at 01:09
0

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

Robert
  • 2,342
  • 2
  • 24
  • 41