Skip to content

Instantly share code, notes, and snippets.

@nicoaudy
Forked from while0pass/listchars.vim
Created July 14, 2020 02:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicoaudy/dd59d1bfadd815a0db049af134ac7e10 to your computer and use it in GitHub Desktop.
Save nicoaudy/dd59d1bfadd815a0db049af134ac7e10 to your computer and use it in GitHub Desktop.
show/hide hidden characters in Vim
" hide hidden chars
:set nolist
" show hidden characters in Vim
:set list
" settings for hidden chars
" what particular chars they are displayed with
:set lcs=tab:▒░,trail:▓,nbsp:░
" or
:set listchars=tab:▒░,trail:▓,nbsp:░
" \u2592\u2591 are used for tab, \u2593 for trailing spaces in line, and \u2591 for nbsp.
" In Vim help they suggest using ">-" for tab and "-" for trail.
" change showbreak when line numbers are on or off.
" show no char when line numbers are on, and \u21aa otherwise.
au OptionSet number :if v:option_new | set showbreak= |
\ else | set showbreak=↪ |
\ endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment