Hot answers tagged

10 votes

Hide certain lines completely (not folding)

I don't know how to achieve exactly what you want, only a part. You want to hide some text inside ~/.vimrc (for example). First we need to know which highlight group handles the text you want to ...
user avatar
  • 6,466
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 ...
user avatar
  • 33.1k
10 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 ...
user avatar
  • 387
9 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']
user avatar
  • 701
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 ...
user avatar
  • 28.3k
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:...
user avatar
7 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 /\*/ ...
user avatar
  • 355
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 ...
user avatar
  • 23.9k
5 votes
Accepted

Adding conceal to already existing syntax highlighting?

The problem in your case is, that the syntax highlighting script for package uses a keyword (:h syn-keyword) and that always has priority before any of the syn-match or syn-region rules. In your case,...
user avatar
5 votes
Accepted

Mathematical expressions in TeX files are displayed in a human-readable way

This functionality comes from the internal LaTeX plugin. See :h tex-conceal and :h g:tex_conceal. You can turn it off either by setting conceallevel=0 or by letting g:tex_conceal=''. To be more ...
user avatar
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. ...
user avatar
5 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 ...
user avatar
  • 28.3k
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....
user avatar
  • 8,675
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 ...
user avatar
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 ...
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 (...
user avatar
  • 17k
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 ...
user avatar
  • 21.5k
4 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 ...
user avatar
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 ...
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 ...
user avatar
  • 2,673
3 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 ...
user avatar
  • 18.4k
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. ...
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 ...
user avatar
  • 5,934
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 ...
user avatar
3 votes

How do I hide a TeX macro and highlight the arguments?

You could: :highlight GreekHyphen guifg=green ctermfg=green :syn region GreekHyphen matchgroup=GreekHyphenMark start='\\textgreek{' end='}' concealends You need to use matchgroup for concealends to ...
user avatar
  • 23.9k
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.
user avatar
  • 266
3 votes

Vimtex conceal not working properly

try: hi clear Conceal at the bottom of your vimrc.
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 ...
user avatar
  • 221
3 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/...
user avatar
  • 28.3k

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