Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

added tab-as-spaces replacement for the codemirror textarea #173

wants to merge 1 commit into


None yet
1 participant

Pomax commented Jan 18, 2013

This fixes tabs at 2 spaces, and replaces tabulation codes inserted by the tab key with two spaces, as well. The replacement code is an undocumented use of replaceSelection/2 in CodeMirror, but it was suggested by Marijn in https://groups.google.com/forum/?fromgroups=#!topic/codemirror/E9ti769jBng so thats pretty much the highest authority we can rely on. It replaces the insertion from "tab" with the two spaces, then cancels the "text select" that the replaceSelection call usually effects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment