Questions tagged [conceal]

The 'conceal' feature allows to hide or replace some part of a buffer thanks to Vim's syntax highlighting mechanism.

Filter by
Sorted by
Tagged with
1
vote
1answer
36 views

Conceal HTML span and highlight content

I am currently writing some Anki cards in NeoVim. Anki supports HTML and I can therefore write cards in the following format. Forumlate the <span class="highlight">Central Limit ...
0
votes
1answer
48 views

Toggle specific highlight group

Is it possible to temporarily disable the text highlight under cursor? The current highlight group can be obtained by synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name'). How to clear it to ...
2
votes
1answer
98 views

How to set more than 52 marks?

Possible marks are {a-zA-Z'}. Is there a mechanism to set more of them? The goal is to track certain (modifiable) lines and detect when they are deleted (e.g. with dd). Background I am building a UI ...
2
votes
2answers
273 views

Highlight Unicode Characters

Is it possible to highlight unicode characters? When I copy/paste a code sample I sometimes run into problems because the website uses ‐, ‑, ‒ or – instead of - or some other characters that are hard ...
1
vote
1answer
52 views

test_conceal.vim failed: strange, why is that?

Here is the make test result: ------------------------------- Executed: 3788 Tests Skipped: 57 Tests FAILED: 1 Tests Failures: From test_conceal.vim: Found errors in ...
0
votes
1answer
44 views

Conceal subscripts in Coq syntax

Some context and setup I've been using Coq lately and the excellent coqtail plugin for syntax and proof development. I've seen some folks using Proof General in Emacs for a similar environment, and it ...
1
vote
1answer
116 views

clicking on a line with concealed characters

Let's say I have a latex file with a line $\nabla_Y Z = \nabla_X Y$ If I set conceallevel=2 this becomes ∇_Y Z = ∇_X Y which is nice. If I have my cursor on another line and want to change the Z I ...
1
vote
1answer
457 views

Issues with concealing latex

I am playing around with conceal options in latex, and I would appreciate some help. I am using neovim os OS X if that makes a difference. I have the following settings in my config file Plug 'lervag/...
1
vote
1answer
56 views

Latex: smaller Greek letters in math mode

In init.vim, I use vimtex and text-conceal, but it seems Greek letters and math operators look smaller. Here is an example: But when the cursor moves away, the math mode looks like this: . From this, ...
2
votes
1answer
87 views

Yank the characters that replace concealed strings?

For example, in .tex files, the expression $\sum$ is replaced with ∑. I would like to yank ∑, but when I try I get one of the characters that compose $\sum$, even when I set concealcursor. What is the ...
1
vote
0answers
143 views

Vimtex in Spacevim: conceal persists even on cursor line

I am new to (space)vim and I tried to make vimtex work in spacevim. Following the documentation, I added the layer: [[layers]] name = 'lang#latex' in init.toml. Opening a .tex document then the math ...
0
votes
2answers
63 views

conceal function not working in tmux

Version: vim 8.1 Problem: Latex objects like \int, ^, \alpha, \beta, etc, all get replaced by _ in tmux when using conceallevel=1,2. Expected: correct concealment, as it happens in normal terminal, ...
2
votes
0answers
52 views

How to make certain conceal symbols get highlighted differently than others?

I’ve recently tried to make my python more readable using the conceal functionality. So now I went from this to this . Now what really bugs me here is that ƒ, ¶,the ¥ sign, the ℤ and 𝕊 symbols and ...
1
vote
1answer
138 views

syn-keyword with control characters?

(I know the goals are dumb, and I know I could set ffs=unix,dos to not see ^M; I'm just trying to understand more about vim). I was playing around with vim keywords, because I want to conceal certain ...
3
votes
1answer
804 views

Conceal markdown links and extensions

I wish to fully conceal markdown links, even if they have extensions. For example: [Anchor text](http://whatever...) [Anchor text](http://whatever...){:rel="nofollow noopener noreferrer" ...
-1
votes
1answer
362 views

How to overwrite the conceal background color with line color?

I've started using coc for NeoVim and I've setup a highlight for a line with error using the following: hi CocErrorLine guibg=#ce2c28 However, when the error line has a concealed character, it has a ...
0
votes
0answers
28 views

How can I display text differently from how it is actually stored?

I am making a custom syntax partially based on Markdown. I want to display links differently from how they are stored in the file. For example, [About me](about.md) in the file should be displayed as ...
1
vote
2answers
242 views

JSON quotes not hiding and I *want* them to

TL;DR What I Want: JSON files to hide their double quotes (") until I enter insert mode on a line, in which event the quotes reappear. I had this behavior on another machine, but I cannot replicate ...
1
vote
1answer
266 views

No highlighting for replacement text using conceal

I just discovered Vim's conceal feature. I've added the following to ~/.vim/after/syntax/haskell.vim: syntax match haskOperator "->" conceal cchar=→ syntax match haskOperator "<-" conceal ...
1
vote
0answers
96 views

Conceal with the highlighting of matching begin/end latex environment

I want to use vim conceal feature with the highlighting of matching begin/end latex environment (vimtex plugin). When I use the following code syn match texStatement '\\begin{itemize}' contained ...
2
votes
0answers
46 views

Concealing \begin and \end lines in latex with MathZone

I'm trying to get the lines that have \begin{equation} and \end{equation} to be concealed. I've tried using call matchadd('Conceal','\\begin{equation\*}', 10,13,{'conceal':' '}) and it works, but it ...
0
votes
0answers
103 views

GVim extremely slow with plugins for long docs

I am using gvim with vimtex (this) with UltiSnips (this) and with conceallevel set to 2. I use the above set-up to write my LaTeX documents. In general, this is slow but if my document is large then ...
2
votes
2answers
81 views

Is there a simple way to remove a single keyword from a syntax group (or otherwise override it in a match)?

I occasionally like to tinker with syntax files (especially conceals; I use λ for anonymous functions (lambda:, fn) in several languages). However, one complaint with conceal is that I can only use a ...
2
votes
1answer
180 views

Concealing the code for `braket` package for LaTeX with vimtex + `tex-conceal`

I am using vimtex with latexmk and using conceal setting provided by vim and extending it with an additional plug-in : KeitaNakamura/tex-conceal.vim. Additionally, I use a package braket to encode \...
2
votes
2answers
268 views

Latex Subscripts Rendering Weirdly [duplicate]

I'm trying to type the following latex in nvim: f_{high}=\{1209,1336,1477,1633\}Hz. For some reason, nvim is rendering this as: fₕᵢgₕ= \{ 1209, 1336, 1477, 1633\}\si{Hz} How do I fix this?
1
vote
1answer
217 views

Concealment causes color highlighting to not apply

Following my previous question, I have the same string aaabbbb that I am colorizing in the same way, except with the addition that I am now also trying to conceal the as. Here is the best that I got ...
2
votes
1answer
507 views

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

I'm using vim for writing LaTeX documents. I also have vim-latex installed. While I'm writing my documents in the editor, I get ligatures for that piece of text which is meaningful for the LaTeX ...
1
vote
1answer
209 views

Unable to use conceal with vim-javascript plugin

editor: NVIM v0.4.3 I have the following syntax file at ~/.config/nvim/after/syntax/javascript.vim syntax clear javaScriptFunction syntax match javaScriptFunction /\<module.exports\>/ ...
1
vote
2answers
431 views

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

Say that I have pattern aaaaapple in my text file, and say that I configured vim so that it conceals a\+. What will happen is that, if conceallevel=1, then aaaaapple will become _pple. Note that ...
0
votes
1answer
2k views

Vimtex conceal not working properly

Hi I am seeing the following on my .tex files. My .vimrc file looks like this let mapleader =" " call plug#begin('~/.vim/plugged') Plug 'lervag/vimtex' let g:tex_flavor='latex' let g:...
1
vote
1answer
38 views

How to conceal zerowidth special characters like <U200C>

That character is used so much in Persian writing. And it makes the text difficult to read. I tried to make my terminal display it correctly but I couldn't I was wondering maybe I could use vim syntax ...
3
votes
0answers
367 views

Vimtex conceal doesn't recognize new command math environment

I recently added the vimtex plugin which includes a conceal feature which I really like; however, I found it doesn't work in custom math environments such as \newcommand{\beq}{\begin{equation}} \...
0
votes
0answers
43 views

Use combining characters in concealment character

Are combining characters allowed in a concealment character? The following does not seem to work: syntax match underdot "a\." conceal cchar=ạ The underdot is U+0323. This syntax conceals a. simply ...
1
vote
1answer
825 views

Conceal initially ignored

I'm just trying to get conceal working, so I've created a simple test case. I have a clean .vimrc file with only the following lines: set conceallevel=2 syn match Conceal /syn/ conceal cchar=+ ...
1
vote
2answers
1k views

VIM conceal doesn't work

VIM doesn't conceal text, for example tex. Here's my vimrc: "commands for vim-plug "PlugInstall - installs plugs "PlugUpdate - updates plugs "PlugClean - remove unused directories "PlugUpgrade -...
1
vote
0answers
63 views

How to stop vim from automatically displaying latex formatting? [duplicate]

I have a latex file I am editing in vim. Something annoying that I'm running into is that vim seems to auto display things that I am typesetting in math mode. Here is an example. Say I write the ...
1
vote
0answers
196 views

Add conceal in function

Trying to maintain add conceals to the generated location list, but I can not figure it out. The current workaround is to add it manually everytime through the vim commandline, like: : set ...
1
vote
0answers
108 views

Why does this autocommand works on neovim but not on vim?

I have this little augroup that contains a simple autocommand that hides the /home/devs/ text on top of nerdtree: augroup HideHOME autocmd! FileType nerdtree autocmd FileType nerdtree syntax ...
0
votes
1answer
67 views

Display the first line of some file instead of an identifier

Is there some way to display an identifier as something else? Imagine the following setup: You have a readme file: * <<123456>> * <<789078>> This readme file is inside of a ...
2
votes
3answers
607 views

how to conceal filename and line number in quickfix window

Context Say in vim, after :grep text *, then :copen, then cursor in a quickfix window, which has contents like below some-very-very-very-long-path/file1.txt|1 col 46| some text some-very-very-very-...
4
votes
2answers
1k views

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

When I add \textbf{} or \textit{} before a word in vimtex the terminal shows the word but strangely hides the commands. I can only see them in the visual mode (see pictures below). Is there a way to ...
4
votes
1answer
357 views

How to conceal Markdown syntax per-word, rather than per-paragraph?

I want to use Vim to write markdown in a sort-of-WYSIWYG manner (for use with an audience). For example, typing **Bold** should display Bold in bold font, with the asterisks automatically hidden as ...
1
vote
1answer
343 views

Persistent conceal settings through Vim / Neovim restarts

I can successfully toggle between different conceal levels in Neovim, which is rather handy when working with markdown documents. Also, when working with with multiple documents in a Neovim session, ...
2
votes
2answers
2k views

How to show math equations or formula in markdown file

I like to write notes in markdown file. Most of the times my notes are about coding, but sometimes I need to write some math equations or symbols. I would like to see the equations directly in the vim,...
7
votes
1answer
75 views

Why are tabs adjacent to concealed tabs displayed wider than a single tabstop?

I just wrote the following code in an answer to another question: syntax match HideTwoIndents /\v^\t(\t)?/ conceal set conceallevel=2 This works great if 'list' is set and if 'listchars' does not ...
7
votes
1answer
2k views

change how a character is displayed

Is it possible to change how a character is displayed? I explain better, I want to replace the character '*' with math unicode '∗' [U+2217]. This should affect only the way the character is displayed ...
3
votes
0answers
90 views

Can I change the highlight of specific conceals?

I'm using :syn-cchar to replace certain syntactic elements with Unicode characters (à la vim-haskellConcealPlus). Since I'm replacing several different elements, I'd like to be able to highlight some ...
3
votes
1answer
439 views

How to make linebreak play along with conceal

I am using vimwiki with and conceal the long URLs as links like this: [[http://a-really-long-long-url|Link]] rest of text Under my configuration (conceallevel=2 concealcursor=nc linebreak) it should ...
9
votes
5answers
4k views

Markdown in Neovim: which plugin sets conceallevel=2?

I'm experiecing the most annoying thing ever: when I edit a markdown file, asterisk characters are hidden by default. If I set on an open buffer :set conceallevel=0, asterisks shows up as they should,...
0
votes
1answer
77 views

How to display hyphens as □ in taskpaper files?

I’m using taskpaper.vim to work with projects and tasks and would like to display the hyphen that starts a tasks as the □ (unicode white square). I don't want to actually replace the character in the ...