Skip to main content
Share Your Experience: Take the 2024 Developer Survey
11 votes

Markdown in Neovim: which plugin sets conceallevel=2?

Ok, I found the plugin involved into this: is indentLine. It is reported in its README: it does not work if conceallevel is not set to 1 or 2, so it set this parameter to 2 by default. The side ...
caneta's user avatar
  • 427
11 votes
Accepted

Conceal passwords in configuration files but maintain password length

I would recommend to use matchadd() function for this, because it is independent of syntax highlighting and a bit more flexible. For your particular use case, the following should work: call matchadd('...
Christian Brabandt's user avatar
10 votes
Accepted

Get which plugin sets a specified variable?

You can use :help :verbose to inspect the value of an option (they are "options", not "variables") and see where it was last defined: :verbose set conceallevel? Note that you must use the question ...
romainl's user avatar
  • 41k
10 votes

Markdown in Neovim: which plugin sets conceallevel=2?

Like @caneta, the indentLine plugin was the culprit for me too. I solved it by disabling it for markdown files like this: let g:indentLine_fileTypeExclude = ['markdown']
Sheharyar's user avatar
  • 761
9 votes
Accepted

how to conceal filename and line number in quickfix window

You can use the conceal feature for this. Add the following to the file ~/.vim/after/syntax/qf.vim (first creating the file if necessary): syntax match ConcealedDetails /\v^[^|]*\|[^|]*\| / conceal ...
Rich's user avatar
  • 32.1k
8 votes

change how a character is displayed

So as suggested I will give the solution I found. After having set conceallevel=1 set concealcursor=ni there are two ways to achieve the result: 1) using :syntax match :syntax match Conceal /\*/ ...
nicmus's user avatar
  • 365
8 votes
Accepted

How to force vimtex to display \textbf and \textit in insert/normal mode?

This is not due to vimtex directly, but due to the conceal feature in Vim. vimtex only adds to the syntax plugin that ships with Vim/neovim, and it adhers to the relevant option, see :help g:...
Karl Yngve Lervåg's user avatar
6 votes

How to show math equations or formula in markdown file

Mathematical equations cannot be displayed in Vim in this way: Vim has no means of rendering them, as @BLayer explains in his answer. However, mathematical symbols you can indeed display using Vim's ...
Rich's user avatar
  • 32.1k
6 votes
Accepted

Vim conceal indentation. Replace indentation spaces with utf-8 chars

With the following: set conceallevel=2 syn match IndentWS '\v(^( {4}|\t)*)@<=( {4}|\t)' conceal cchar=▶ I get: The regex \v(^( {4}|\t)*)@<=( {4}|\t): uses very magic \v matches a sets of 4 ...
muru's user avatar
  • 24.9k
5 votes

Vim conceal indentation. Replace indentation spaces with utf-8 chars

This could be used call matchadd('Conceal', '\s\{'.&ts.'\}', 10, -1, {'conceal': '►'}) This uses the matchadd() function to conceal parts of your text, which needs a 7.4.500 release or something. ...
Christian Brabandt's user avatar
5 votes
Accepted

Conceal initially ignored

First regarding your second example: The match Test /hi/ is not syntax highlighting, but "match highlighting". This are two different things. The hi is still highlighted after you executed :syntax off....
Ralf's user avatar
  • 9,247
5 votes
Accepted

Yank the characters that replace concealed strings?

Concealing characters is just a visual representation of the physical text. Vim commands however work with the actual text, so that yanking actually yanks what is in the buffer and not what is ...
Christian Brabandt's user avatar
5 votes
Accepted

Weird nvim error: "Error detected while processing BufWinEnter Autocommands" due to indentLine plugin

I believe you should set the variable to a value that is compatible with the conceal option. It should be a string that is a combination of n, v, i, c. More information :help 'concealcursor' '...
Vivian De Smedt's user avatar
5 votes

Conceal passwords in configuration files but maintain password length

Working solution 1 :syn match SecretKeys /\(^.*_KEY=\)\@<=.*$/ contains=SecretKeyChars :syn match SecretKeyChars /.\ze\_./ conceal contained cchar=* :setl cole=2 cocu=nvc The SecretKeys group ...
Paul Parker's user avatar
4 votes

How to show math equations or formula in markdown file

My interpretation is that the OP is looking for rendering of markup into fancy, graphical depictions of equations and formulae. If instead the question is about simple substitutions of Unicode ...
B Layer's user avatar
  • 19.9k
4 votes

VIM conceal doesn't work

The reason removing augroup remember_folds helped was given here: https://github.com/vim/vim/issues/4175. Basically neither mkview nor loadview remember filetype nor syntax. Quick fix to that problem ...
Michał Syposz's user avatar
4 votes

how to conceal filename and line number in quickfix window

While the other answers here have all the necessary pointers ever needed, I think there is lacking a comprehensive solution IMHO. Below is a ready-to-paste in your .vimrc (or equivalent) au ...
Loves Probability's user avatar
4 votes
Accepted

How to disable ligatures "inside the editor" while using vim for latex documents?

This is a part of standard filetype plugin, see :h tex.vim for a complete info. That particular feature is controlled by :h g:tex_conceal So it's enough to add let g:tex_conceal = '' to your vimrc (...
Matt's user avatar
  • 20.8k
4 votes

Latex Subscripts Rendering Weirdly

The problem is that the subscript for g doesn't exist, and those for h and i look "off." As noted, you can either turn off the conceal feature altogether (set conceallevel=0) turn off conceal in tex ...
D. Ben Knoble's user avatar
  • 26.4k
4 votes
Accepted

Conceal markdown links and extensions

One approach is to overwrite the existing markdownLinkText syntax item with one that conceals the [ and ] delimiters: This item is currently defined with the following line from $VIMRUNTIME/syntax/...
Rich's user avatar
  • 32.1k
4 votes
Accepted

Issues with concealing latex

I suspect the Conceal highlighting is overriden by your colorscheme os something like that. You will see where it is defined with :verbose highlight Conceal, which should show an output similar to ...
Karl Yngve Lervåg's user avatar
4 votes
Accepted

Highlight Unicode Characters

With the help from Konfekt/vim-unicode-homoglyphs and the answers here I found this solution that works quite well and has (almost?) no performance impact: augroup Hiunicode autocmd! autocmd ...
laktak's user avatar
  • 2,943
3 votes
Accepted

How to conceal zerowidth special characters like <U200C>

:syntax match ZeroWidthNonJoiner "[\u200c]" conceal cchar=😄 You need to check :h conceallevel, I set it to 2 personally. Otherwise, you may not get conceal to work as you expect.
oblitum's user avatar
  • 276
3 votes
Accepted

How to make linebreak play along with conceal

No it is not possible. Wrapping occurs on the real characters on the line and not on the concealed characters. Note, that if this would be possible, this would cause kind of "wobbling" effect just by ...
Christian Brabandt's user avatar
3 votes

How to display hyphens as □ in taskpaper files?

The conceal feature will let you do this. Following the example here, I came up with this solution. :call matchadd('Conceal', '^-', 10, -1, {'conceal': '□'}) :set conceallevel=2 concealcursor=nv ...
garyjohn's user avatar
  • 6,349
3 votes

How can I hide blank lines in vim without actually removing them from the text I am editing?

Here is a possibility which uses foldexpressions: fu! FoldEmptyLines(lnum) if !empty(getline(a:lnum)) && a:lnum+1 < line('$') && empty(getline(a:lnum+1)) return 1 ...
Christian Brabandt's user avatar
3 votes

How do I search only the displayed part of concealed text?

This is not really possible, as concealing was meant as a sole method for displaying chars instead of the actual content. In the same sense, you can't really search for what has been folded or signs. ...
Christian Brabandt's user avatar
3 votes

Vimtex conceal not working properly

try: hi clear Conceal at the bottom of your vimrc.
user25735's user avatar
3 votes
Accepted

How to conceal multiple characters without making text dance upon hovering?

Instead of matching all duplicate "a"s in a single match, try concealing each extra "a" in its own, concealed group: syn match HideAa "a\zea" conceal Because this conceals only a single "a" with its ...
nickspoon's user avatar
  • 231

Only top scored, non community-wiki answers of a minimum length are eligible