You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
GhostText is very nice feature but please make a example of how to use it properly.
Am using it like:
var ghostTextArray = ["foo", "bar"];
//Find Match Text
editor.on('input', function(){
var position = editor.getCursorPosition();
var token = editor.session.getTokenAt(position.row, position.column);
for(var i = 0; i < ghostTextArray.length; i++){
//If Match
if(ghostTextArray[i].startsWith(tokenVal)){
editor.setGhostText(ghostTextArray[i].slice(tokenVal.length), position);
break;
};
};
});
But what if i want to select the suggestion (By Pressing Tab)
Also how would i enable inline autocompletion as it's a part of ghostText?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
GhostText is very nice feature but please make a example of how to use it properly.
Am using it like:
But what if i want to select the suggestion (By Pressing Tab)
Also how would i enable inline autocompletion as it's a part of ghostText?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions