Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Togglable syntax highlighting of tabs, nbsps and trailing spaces.
branch: master

This branch is 4 commits ahead of vim-scripts:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


This all started on This plugin hadn't been touched in 10 years, it just worked.

Original quote:

This plugin will highlight tabs and trailing spaces on a line, with the ability
to toggle the highlighting on and off. Using highlighting to illuminate these
characters is preferrable to using listchars and "set list" because it allows
you to copy from the vim window without getting listchars shrapnel in your

The highlighting is done on a per buffer basis, and can be toggled on and off
easily (the default binds to F3 if it's unbound).

I added support for non-breaking spaces (nbsp) because I've been burned one too many times by a copy and paste.

I also changed the colors to, if I remember correctly, how spacehi used to look (very loud). The colors can be adjusted by setting the global variables:

let g:spacehi_tabcolor="ctermfg=White ctermbg=Red guifg=White guibg=Red"
let g:spacehi_spacecolor="ctermfg=Black ctermbg=Yellow guifg=Blue guibg=Yellow"
let g:spacehi_nbspcolor="ctermfg=White ctermbg=Red guifg=White guibg=Red"


I recommend installing pathogen.vim, and then simply copy and paste:

cd ~/.vim/bundle
git clone git://

If you like it the hard way, copy plugin/spacehi.vim from this repo into ~/.vim/plugin.

Something went wrong with that request. Please try again.