set listchars=trail:·,tab:>→,nbsp:% ",eol:¶
set list
highlight ExtraWhitespace ctermbg=green ctermfg=blue guibg=green guifg=blue
match ExtraWhitespace /\s\+$/
fun! TrimRight()
%s/\v\S\zs\s+$//
endfunction
com! TrimRight :call TrimRight()
Created
July 30, 2023 18:42
-
-
Save vpetruchok/73b26cd6363f49cc7cd15ca00e183a8d to your computer and use it in GitHub Desktop.
Vim trailing spaces
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment