Skip to content

Instantly share code, notes, and snippets.

@while0pass
Last active April 22, 2024 05:59
Show Gist options
  • Save while0pass/511985 to your computer and use it in GitHub Desktop.
Save while0pass/511985 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
@modood
Copy link

modood commented Jul 22, 2019

Even better than what I found already. Thank you! 💯

@arnoudhgz
Copy link

Nice!

@x0rzy
Copy link

x0rzy commented Dec 22, 2019

I love this :)

@Glenn-Terjesen
Copy link

thanks!

@caputomarcos
Copy link

<3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment