Skip to content

TimenZan/vim-concealer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vim-concealer

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.

Installation

vim-plug
Plug 'timenzan/vim-concealer'
packer
use {'timenzan/vim-concealer', config = ' --[[config goes here]] '}

Configuration

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.

Contributing

Issues, PRs, suggestions, forks, etc are welcome! GitLab holds the main repository, although I will also look at issues on GitHub

acknowledgements

Inspiration

Thanks to the following plugins for providing some of the mappings

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published