whitespace in vim

vim_whitespace

So one thing that’s annoyed me about my recent switch to vim, is the lack of any easy way to show all whitespace/invisible characters. “set list” is a great start, but I really want to see ALL invisibles, even spaces, which seems pretty much impossible in vim.

So for now I’ve settled on just showing tabs, eol, etc. at least this makes it so if something looks like a space, it is almost certainly just a plain space.

If you want to mimick this setup, add the following two lines to your .vimrc

au BufNewFile,BufRead *.* set list listchars=eol:¬,tab:\▸\ ,trail:~,extends:>,precedes:<

2 thoughts on “whitespace in vim

  1. moreaki 4 October, 2014 / 11:22

    The if-block in adbss() is not needed ;).

    • jocelynmallon 4 October, 2014 / 15:40

      Hi, thanks for the comment.

      Looking back on that, I can see that I could just use || to create the dir instead of an if/end block, but what else would work?

      Honestly I’m just terrible at trying to code anything, and pretty much never find the most efficient way of doing anything… that’s a large part of why I have such a hard time trying to learn to code.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s