Questions tagged [conceal]
The 'conceal' feature allows to hide or replace some part of a buffer thanks to Vim's syntax highlighting mechanism.
71
questions
0
votes
2
answers
36
views
Getting syntax file to load for typescriptreact files
I am very likely missing something very obvious, for I am very new to the vim world.
The effect I intended to achieve was to mimic the Inline Fold extension for vscode using vim's Conceal.
In short, I'...
1
vote
1
answer
412
views
Weird nvim error: "Error detected while processing BufWinEnter Autocommands" due to indentLine plugin
I'm on MacOS Big Sur. I have the latest Vim and Neovim installed via Homebrew.
Loading any source file with Vim works fine. But with nvim, I always greeted by this error:
Error detected while ...
1
vote
1
answer
39
views
Render characters in buffer differently, e. g. render backslash as lambda
Is it possible to render single characters as a different character in nvim, i.e. "replace" them visually in the buffer?
1
vote
1
answer
47
views
Concealing ~ in texvim + conceal
I tried
syn match texStatement '\\\[' contained conceal cchar=⟦
syn match texStatement '\\\]' contained conceal cchar=⟧
syn match texStatement '\\~' ...
1
vote
1
answer
36
views
apply conceal to already defined syntax
I created my own syntax file tailored to UVM log files, in which each line is formatted in the same way:
<msg severity> <path>(<line number>) @ <simulation time>: <hierarchy&...
0
votes
0
answers
58
views
Disable LaTeX concealing in nvim easymotion highlighting
When using nvim with vim-easymotion it conceals a lot of LaTeX commands while showing all the easymotion symbols, i.e. it shows unicode symbols as motion symbols which I just can not type. It only ...
1
vote
1
answer
48
views
Certain LaTeX not displayed in GVim
I use conceal and write some LaTeX files in the GVim 8.2 editor on windows. The conceal works fine most of the time but it is unable to display certain characters like ∈ and ⊆. It shows a box with a ...
1
vote
1
answer
192
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 ...
1
vote
1
answer
166
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
1
answer
125
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
2
answers
573
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
1
answer
85
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
1
answer
87
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 ...
2
votes
1
answer
240
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
1
answer
582
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
1
answer
98
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
1
answer
103
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
0
answers
241
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
2
answers
78
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, ...
4
votes
0
answers
114
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
1
answer
396
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 ...
4
votes
1
answer
2k
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" ...
0
votes
1
answer
796
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 ...
1
vote
0
answers
31
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
2
answers
535
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
1
answer
501
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
0
answers
137
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
0
answers
54
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
0
answers
212
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
2
answers
138
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
1
answer
315
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
2
answers
326
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
1
answer
279
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
1
answer
849
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
1
answer
465
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
2
answers
590
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
1
answer
3k
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:...
2
votes
1
answer
73
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 ...
5
votes
0
answers
457
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
0
answers
50
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
1
answer
1k
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
2
answers
2k
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
0
answers
65
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
0
answers
255
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
0
answers
122
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
1
answer
71
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
3
answers
823
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-...
5
votes
2
answers
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
1
answer
543
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
1
answer
396
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, ...