But then its much more than reading the word from a conf file.
You need to keep state, and ideally also know if the caret was moved.
In detail:
* A)
If you start with an "i", then you go to "integer", now your macro can find the list, which contains "integer" and it can go to "int", but now it must go back to "i". Where is that stored?
Macros have no memory between calls.
That also means that the list will need to be loaded each time (slow).
You would need to add some storage for this.
1) per editor, since several editors in different windows can all be in different rotations at the same time.
2) global, to store the file you loaded.
* B)
Ideally but not 100% necessary you want to know if the caret was moved.
If it was the current word surely should become permanent?
The caret movement callback I do not see happening in macros (not anytime soon).
The rest I am happy to answer question, and possibilities for acceptable patches can be found.
However I think there is an easier route for you.
Write a SynEditPlugin.
You can write your own package. Use the API provided by IDEIntf.
If I am right it has a unit SourceEditorIntf, where you can register a callback that tells you about each SynEdit created. And there you can add your plugin to it. (No need to destroy, SynEdit can do that if it is destroyed)
The plugin can register new commands for the keystrokes. And you can get callbacks from SynEdit on caret moves.
You can write any code you want inside.
There are already a few plugins that can serve as sample. Just search for the class name.