Lokaltog/vim-powerline — Issue #106: Error message when $HOME contains \@
Author: char101
Created: 2012-03-04 08:06:22+00:00
State: open

Hi,

My $HOME variable contains \@ character, and vim is giving error message for below line

let headpath = substitute(expand('%:h'), $HOME, '~', '')

I fixed it by changing the lines into

let headpath = substitute(expand('%:h'), escape($HOME, '\'), '~', '')
let fullpath = substitute(expand('%:p:h'), escape($HOME, '\'), '~', '')