Sublime-Text-2-BIDI
Sublime-Text-2-BIDI copied to clipboard
New text written after using Ctrl+B is not formatted correctly
- type in Arabic text. (X)
- use Ctrl+B // formatted correctly
- type new text (Z) // formatted incorrectly
- use Ctrl+B // X formatted incorrectly, Z formatted correctly
I have added the ability to run the bidi only on selection (or multiple selections) as a workaround (pull request pending) I have been thinking about this for a while now... My main idea is to modify the bidirectional algorithm implementation used by the plugin, to support some kind of in memory representation per sublime view of text previously reversed by the plugin. (mabe a list of words or just chars) I can compare the new arabic/hebrew text send to the plugin when it is activated next with text previously reversed. There are a few issues with this, when text that has already been reversed is copy-pasted only the first instance of the text can be ignored, there are similar issues with cut and pasting. Another way to do this is to add bidi markers (such as the unicode invisible rtl chars) here there also issues of copying exsiting markers from external sources or other views. Mabe it needs to be a combination of both and the workaround, any ideas?