unify m
and M
for surround deletion and change, but not insertion
- Surround
- Embrace
- Which-key
- Snipe
if you use the cons
definition in the envs-alist
, you need to include the
\n
’s in order for it to format correctly. This not only breaks the newline
variable convention, it also causes which-key
to bug out as it takes \n
to
be part of the name
for [foo]
’s after a newline that are considered inputs here.
currently we have an-over
and in-over
, right-over
and left-over
might
make more sense in some cases.
Its more fluent in elisp. Nothing to do anymore, because evil-surround
doesn’t
call the functions it reads interactively so
Particularly the one under define-minor-mode
.
Also probably delete test.tex
Restructure. Maybe move appendix to seperate file, maybe add recomended plugins section.
when on the bolded bracket of \frac{N!}{(N-i+1 )
!(i+1)!}, TeX-find-macro-start
returns nil
which ruins the command text object sometimes
- Implement it ourselves?
- Send bug report / contribute to auctex
- Work around, detecting if its nil and and if so go back a few chars
Take a copy of Itai’s main.tex
and make sure everything works as expected on a
real document
For environments, commands/macros, inline & display math
Steal evil-latex-textobjects
Currently the newline behavior is erratic. \begin{…} \end{…} should always appear in lines of their own.
m
would still match \], but when changing something to a math env m
would be for
inline math and M
for display.
m
is only for inline; use the flag.
m
would only insert inline, for display insert an equation env*, and with
the flag it would result in a \].
Redundant with:
- The
M
txt obj: user would just presscsmM
This is the csd/cse/tsd/tse
commands from vimtex
Just through a prompt. That would be through the minibuffer in Emacs.
texmathp-environments
is useful so I put it here. After doing cse
you would will
be able to enter one letter aliases to immediately change the enviornment, e.g.
csea
for changing to align
, or cseE
for changing to equation*
.
- One mapping, e.g.
csez
, will be reserved for entering a prompt so you can
fully type out the thing.
- This is a very vimish way: i.e
csea
would be mapped toalign
environment - Aliases would be customizable
- Have a Menu for an overview of the aliases
change inside/around sub/superscript ci^ ci_
which would jump to the closest
sub/superscript
- Would not work with surround-stuff, only
c/d
commands. Just thought it might be useful (Say you quickly want to change a sigma index…)
- Use
tsm
to toggle betweenbegin{align}
andbegin{equation}
(It already toggles between\(\)
and\[\]
)I don’t use
begin{equation}
at all, only\[\]
. In amsmath,\[\]
are defined just to yield abegin{equation*}...
. If we support toggling onlyequation
andalign
, getting from\[\]
toalign
wouldn’t be nice.
Itai: I thought we agreed that it would be best to just have a way for the user to decide how this acts because there is no good universal option.
Would be hard as currently it’s implemented with surround which deletes the surrounding delimiters (doesn’t mark them). This is exactly what evil-goggles does. We can either:
- Just add a similar functionality to our plugin
- Add an optional integration to evil-goggles in this repo
- Add an integration with goggles in the goggles plugin (this sounds odd but goggles has built-in integration with evil-surround and other plugins)
I’m not so sure of the interactive use of this, as cio
(change inner symbol)
would be the same as csm
(change surrounding macro). However, there are other
things that use symbol-at-point
(such as project search), which is why it might
be useful
Mode | Keybind | Action |
---|---|---|
Normal | csd | Change surrounding delimiter (see id/ad) |
cse | Change environment | |
csc | Change command (should be acessable from any brace e.g. ==\frac{}{:}==) | |
tsd | Toggle surrounding delimiter, e.g. (f:oo) <===> \left(f:oo\right) | |
tse | For surrounding environment, equation <==> equation*, or align <==> align* | |
tsm | For surrounding math, \(\) <==> \[\] | |
dse | Delete surrounding environment | |
dsc | Delete surrounding command, \tilde{a} > =a | |
Text objects | ie , ae | Select inside/around environment |
ic , ac | Select inside/around command (macro) | |
im , am | Select inside/around math | |
id , ad | Select inside/around delimiter (math parentheses), e.g. () , [] , \left[\right] . | |
Insert | ? | Brace movement |
would define bindings and advices for TeX-fold
Doom has its own folding module, which tries hideshow
, outline-minor-mode
, and
vimish-fold
. We should probably override its keybinds, as we know whats best for
LaTeX.
- [ ] Show labels on folds
Auctex configure outline-minor-mode
(which is part of Emacs). We just need to
hook outline and set a keybind to try to fold using outline.
Done in doom-emacs/#2818.
latex-extra does it, but it only uses outline for section folding (not env).