Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Vim:

    set expandtab

    And your troubles are over :)

    ... until you have to edit a friggin' Makefile :(

    (expandtab converts tabs to their equivalent spaces. There are many similar commands to get fine-grained control over this)

    Of course, if you just want to show unwanted whitespace, we have plenty of builtin ways of doing that [].

    • You mean vim isn't smart enough to know you need leading tabs in Makefiles? Hmm, too bad.

      • No, Ovid just isn’t smart enough yet to tell it. :-)

        From my .vimrc:

        autocmd FileType python setlocal expandtab

      • Oh, and the make filetype plugin could easily set this automatically. I don’t know why it doesn’t, but it doesn’t bother me that it does not, either.

      • It's configurable on a "per filetype" basis. I just don't edit makesfiles often enough to care and I set it manually then.

    • The real equivalent to what Michael is doing is called :set list, which will render tabs as ^I. In vim but not vi you can also use the listchars variable to control how tabs are rendered, as well as various other invisible things like end of line, trailing whitespace, line cut-off at screen edges, etc.