Comments (10)
Could you explain why it should be xmap
instead of vmap
(why should it not also work for selection mode)?
And to see if I understand: You mean that the inner part of the environment should not contain a command following the \begin{...}
such as a \label{...}
? When I do vie
for the following example:
\begin{test}\label{a:test}
asd[cursor here]
asd
\end{test}
Then everything between (and including) \label{a:test}
and the last asd
is selected.
Oh, and btw: This is vim-latex, not LaTeX-Box, so the mapping you are referring to is
vnoremap <silent><buffer> ie :<c-u>call latex#motion#sel_environment(1)<cr>
from vimtex.
In Sélection mode, hitting a printable character is supposed to replace the selection.
Yep, that's what I meant. Does it sound reasonable? Over here it always gets in the way, for example when indenting the inner environment. Give it a try.
Yep, I accidently pasted from Latexbox..
from vimtex.
Ah, I see. Changed to xmap
now.
I still don't really understand the problem here. To me it seems natural to select everything inside the environment as it is done. However, I might change my mind if I understand the problem better. I propose that you provide a full example where you explain what you do, what happens, and what you expected should happen.
from vimtex.
For example, consider the array environment that takes mandatory arguments.
Then, in my eyes, (rcl) belongs to the delimiting part in
begin(array)(rcl)
...
end(array)
from vimtex.
Then hitting >ie at... would indent the line begin(array) (rcl) too. Expected is only the indenting of ...
from vimtex.
Agreed, that's a valid example. I'll see what I can do.
from vimtex.
The last commit should improve this for your given example.
from vimtex.
Ok, so when I read the changed vim reg correctly the last example could convince you, thanks for fixing it...
but the label keeps being considered part of the inner environment. For me it belongs to the declarative part of the environment and the beginning line in
\begin{test}\label{a:test}
asd[cursor here]
asd
\end{test}
should not be indented when hitting >ie
at asd, but I have no technical argument at hand and leave it at that until I can come up with one.
from vimtex.
Yes, I am still convinced that the \label{...}
part should be a part of the inner environment. I've never seen it specified that one is supposed to place the \label
just after opening an environment. And for the figure
environment, one is even adviced to put the \label
command after the \caption
command, see here.
Personally, I often format my labelled environments like this:
\begin{test}
\label{a:test}
...
\end{test}
or like this:
\begin{test}
...
\label{a:test}
\end{test}
from vimtex.
Ok I leave it at that.
from vimtex.
Related Issues (20)
- zathura_simple on wayland not outputting pdf HOT 7
- Contents on Zathura are not recoganizable when doing forward search if the cursor stays on an equation environment HOT 1
- Disregard contents of "comment" environment HOT 6
- Errors E716 E116 when running :VimtexTocOpen in a file containing a \label HOT 3
- Item Option highlight group and concealing HOT 3
- How to replace deprecated option 'vimtex_view_general_options_latexmk'? HOT 4
- Setting Out Dir Using Funcref and Subfiles HOT 8
- Synctex doesn't work properly on Mac (Zathura or Skim) HOT 28
- VimTex not working when configured to load on "event = "BufEnter *.tex"" in Lazy.nvim HOT 1
- What is warnings.pm? HOT 2
- Use new synctex interactive mode to speed up synctex HOT 5
- Toggle to revert changes made in issue 2401 HOT 2
- Mainfile detection fails when \input is in enumerate environment HOT 4
- l:file not defined in function vimtex#compiler#compile_selected(type) HOT 4
- Setup text argument in user-defined command HOT 3
- Wrong TeXMathZone result from `vimtex#syntax#stack()` HOT 5
- Compilation failed when using xelatex HOT 2
- Compilation fail with option "-c" HOT 10
- Can't open .tex files... sort of? HOT 3
- Zathura issues with finding Window ID HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vimtex.