neovim
neovim copied to clipboard
Concealed text causes line to wrap before window width
- nvim --version
NVIM v0.4.4
Build type: Release
LuaJIT 2.1.0-beta3
Compilation:
Compiled by _nixbld2
Features: +acl +iconv +tui
- OS: Macos X Catalina v10.15.7
- Terminal emulator: iterm2
- $TERM: xterm-256color
Actually this issue is already marked wontfix in vim (https://github.com/vim/vim/issues/260), but I was wondering if it was possible to fix it in nvim…
Steps to reproduce using nvim -u NORC
nvim -u NORC
reduce the window to a small width (like 80)
write "The quick fox jumps over the lazy dog." 2 or 3 times
:setlocal conceallevel=3
:syn match Foo /brown/ conceal
Actual behaviour
The line is cut before the end of the window, as shown in picture
Expected behaviour
I would expect line wrapping to be aware of conceal and wrap at the end of the window
https://github.com/vim/vim/issues/260
It is very useful when the text is supposed to be concealed in all modes concealcursor=nvic
. It is not uncommon for me to view and edit files that are littered with UUIDs that are long enough to throw the layout when used with conceal. Although conceal-Aware layout may affect the performance, it is a common feature of most editors, with Emacs having the best implementation.
This behavior basically renders markdown's URL hiding useless. With vim-markdown, if I have a link with long URL, and set conceallevel=2
, I got multiple lines wrapped due to it. See screenshot:
Actually this issue is already marked wontfix in vim (vim/vim#260), but I was wondering if it was possible to fix it in nvim…
Not necessarily planned for conceal, but there is work on a more generalized conceal informally called "anticonceal": https://github.com/neovim/neovim/pull/9496
Chiming in as another who would greatly appreciate this functionality. I would put it to use in my long form writing setup. Markdown links, notes to self on edits, I see a great many uses for the to conceal multiple wrapped lines of text.
I would like to also vote for an implementation of this feature that conceals long lines of text. This is very important for long form writing setup. There is no reason why Neovim should restrict itself as tool for writing code when it is great for writing text of all forms including notes to self, technical writing, blogs, etc.
This is the one feature that gets on the way when working with markup text. Sometimes I will open such texts in Emacs just for readability purposes.
Just another vote for implementing this feature. I recently switched back to Neovim after trying out Emacs for a few months. Overall, I couldn't be happier with Neovim, but I still find myself using Emacs for Markdown and Org files most of the time. Being able to conceal links and still have properly wrapped lines is a huge advantage: you rarely need to bother with a separate document viewer.