-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: tab-substitution of LaTeX symbols in Emacs julia-mode #6920
Conversation
@stevengj – you are amazingly thorough. |
I just found that I was so spoiled by the new REPL behavior that I couldn't bear to live without it in Emacs. |
(The poor souls who don't use Emacs are on their own, though.) |
As I mentioned, there's a Sublime Text package for this. I guess someone will have to hack this into vi. |
Why not use the
where |
Are you referring to this plugin for Sublime? That one goes a bit further and converts to Unicode when you hit the space bar. |
@BobPortmann, my thinking on
With my implementation, the symbol substitutions are a "Julian idiom" orthogonal to |
@stevengj OK, I am fine with your way but a few comments:
|
If there is a variable called |
The fact that space just gets expanded during normal typing is precisely why space-substitution is more aggressive and more intrusive than tab-substitution. As Jeff pointed out, you might want to type I wasn't aware of the |
Well on my 1st try to type something that should expand in |
JuliaEditorSupport/julia-vim#21 (β-testers welcome) |
…EPL, and allow a wider range of chars (for things like JuliaLang#6927)
Ultimately, this is a matter of taste, but my feeling is that for new users it would be too confusing to have substitutions performed by the spacebar. In any case, we should be consistent between the REPL, IJulia, and It would be easy to add a spacebar binding later, or as an option. |
Is this okay to merge? |
Since @JeffBezanson is the one who's ok you're probably waiting for and he probably won't be able to check anything out until Sunday, you may want to just merge it and then undo it later if there are objections. Fortunately editor modes are not a big concern for code compatibility issues ;-) |
Ah, excellent plan. Make such a mess of the code base that @JeffBezanson will never dare to be offline for any extended period of time again. |
Exactly ;-) But seriously, given that this patch introduces a single contiguous block of code, independent of everything else, I don't think that's a huge issue. |
RFC: tab-substitution of LaTeX symbols in Emacs julia-mode
Similar to the new REPL and IJulia behavior implemented in #6911, this allows you to type e.g.
\alpha<TAB>
in Emacs and getα
. The list of substitutions is the same. When a Unicode substitution is not performed, the tab character indents as usual, so the change should be fairly unobtrusive.