Enjoy ligature fonts? Intrigued by APL? Hate reading? Then this plugin is for you!
Using [neo]vim's conceal feature, it replaces common keywords and constructions with nicer (opinions vary) symbols.
vim-plug
Plug 'timenzan/vim-concealer'
packer
use {'timenzan/vim-concealer', config = ' --[[config goes here]] '}
Because vim-concealer uses :h conceal
, the options are defined as their own
syntax. In order to enable these, you need to append them to your syntax
for
every buffer.
In order to enable word and Greek conceal for every file, use:
augroup set_conceal_syntax
au!
autocmd BufNewFile,BufRead * set syntax+=.conceal_words.conceal_greek
augroup END
Make sure to :set conceallevel=2
, otherwise conceal does not show.
You can also :set conceallevel=0
to turn off the replacements.
Look at :h concealcursor
to modify the behaviour for the line under the
cursor.
If your colorscheme does not show concealed characters clearly, consider adding
the following to your .vimrc
/init.vim
. This colors concealed text the same
as Normal
text (usually white/black).
highlight! link Conceal Normal
Why this syntax?
You can overlay multiple syntaxes for the same file by separating them with
a dot. In addition, you can use set option+=something
to append something
to option
. Vim automatically handles multiple options for comma separated
lists, but syntax
is a dot separated string, and as such concatenation
isn't handled automatically.
Restrict by filetype
Use :h autocmd
syntax
More advanced features (like coloring, non-regex matching, multi-char replacement) are unfortunately not available until this neovim PR is merged.
Issues, PRs, suggestions, forks, etc are welcome! GitLab holds the main repository, although I will also look at issues on GitHub
Thanks to the following plugins for providing some of the mappings
- haskellConcealPlus
- vim-cute-python
- python-conceal
- c-conceal
- rust-conceal