Loading ...
Sorry, an error occurred while loading the content.

76442Re: end of line whitespace

Expand Messages
  • A.J.Mechelynck
    Jan 2, 2007
    • 0 Attachment
      Robert Hicks wrote:
      > I know that in some IDE's I can check a box that causes the IDE to
      > automatically strip trailing white space. Does Vim have a switch to do
      > that or do I need to do:
      > autocmd BufWritePre * %s/\s*$//e
      > It would be nice to have a "set stripwhitespace" if that is the case but
      > I guess that is the power of Vim.
      > Robert

      AFAIK there is no such setting, but your autocommand is the next best thing.

      OTOH you can _see_ end-of-line whitespace by setting the 'list' and
      'listchars' options appropriately. For instance,

      :set list listchars=tab:\ \ ,eol:$

      displays the files as usual, but with a blue dollar sign (well, blue by
      default: a colorscheme can change that) just after the last character on each

      Best regards,
    • Show all 2 messages in this topic