├── README.md ├── after └── syntax │ ├── ocaml.vim │ ├── python.vim │ └── ruby.vim ├── screen_shot.png └── screen_shot_before.png /README.md: -------------------------------------------------------------------------------- 1 | Make use of vim's "conceal" feature to replace certain language keywords with unicode characters. Just for pure eyecandy. This does not replace your source code at any point. 2 | 3 | ![screenshot_before](screen_shot_before.png "Screenshot before") 4 | 5 | ![screenshot](screen_shot.png "Screenshot") 6 | 7 | 8 | Use of a plugin manager like [Pathogen](https://github.com/tpope/vim-pathogen), [Vundle](https://github.com/gmarik/Vundle.vim) or [NeoBundle](https://github.com/shougo/neobundle.vim) is recommeded for installation. Or you can just simply copy the repesctive syntax file (e.g. `python.vim`) in `~/.vim/after/syntax` folder. 9 | 10 | Plugin is inspired by 11 | 12 | -------------------------------------------------------------------------------- /after/syntax/ocaml.vim: -------------------------------------------------------------------------------- 1 | if exists('g:no_vim_conceal') || !has('conceal') || &enc != 'utf-8' 2 | finish 3 | endif 4 | 5 | syntax match ocamlOperator "<-" conceal cchar=← 6 | syntax match ocamlOperator "->" conceal cchar=→ 7 | syntax match ocamlOperator "\" conceal cchar=√ 8 | syntax match ocamlOperator "<>" conceal cchar=≠ 9 | syntax match ocamlOperator "||" conceal cchar=∨ 10 | 11 | hi link ocamlOperator Operator 12 | hi! link Conceal Operator 13 | 14 | setlocal conceallevel=1 15 | -------------------------------------------------------------------------------- /after/syntax/python.vim: -------------------------------------------------------------------------------- 1 | if exists('g:no_vim_conceal') || !has('conceal') || &enc != 'utf-8' 2 | finish 3 | endif 4 | 5 | " comparators 6 | syntax match pyOperator "<=" conceal cchar=≤ 7 | syntax match pyOperator ">=" conceal cchar=≥ 8 | syntax match pyOperator "!=" conceal cchar=≢ 9 | 10 | " math related 11 | syntax match pyOperator " / " conceal cchar=÷ 12 | syntax match pyOperator " \* " conceal cchar=× 13 | syntax match pyOperator "\<\%(math\.\)\?sqrt\>" conceal cchar=√ 14 | syntax match pyOperator "\<\%(math\.\)\?prod\>" conceal cchar=∏ 15 | syntax match pyOperator "\( \|\)\*\*\( \|\)2\>" conceal cchar=² 16 | syntax match pyOperator "\( \|\)\*\*\( \|\)3\>" conceal cchar=³ 17 | syntax match pyKeyword "\<\%(math\.\)\?pi\>" conceal cchar=π 18 | 19 | " keywords 20 | syntax keyword pyOperator product conceal cchar=∏ 21 | syntax keyword pyOperator sum conceal cchar=∑ 22 | syntax keyword pyStatement lambda conceal cchar=λ 23 | 24 | hi link pyOperator Operator 25 | hi link pyStatement Statement 26 | hi link pyKeyword Keyword 27 | hi! link Conceal Operator 28 | 29 | setlocal conceallevel=1 30 | -------------------------------------------------------------------------------- /after/syntax/ruby.vim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khzaw/vim-conceal/9de46ba5d43f469f1e492d976d6908d86cac2fac/after/syntax/ruby.vim -------------------------------------------------------------------------------- /screen_shot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khzaw/vim-conceal/9de46ba5d43f469f1e492d976d6908d86cac2fac/screen_shot.png -------------------------------------------------------------------------------- /screen_shot_before.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khzaw/vim-conceal/9de46ba5d43f469f1e492d976d6908d86cac2fac/screen_shot_before.png --------------------------------------------------------------------------------