This is a feature request. It would be nice to have a gitignore-like file to configure whitespace/encoding settings in a project-wide and editor-agnostic way. Considering formats like Makefile (tabs required), it definitely needs a per filetype configuration feature—matching globs to vim-like modelines.

I’m basically asking for a whitespace/encoding overrides file that we can put in the project root, and have different editors honor it.

I’d leave the first line for defaults.

fileformat=unix encoding=utf8

    tabstop=2 expandtab=false

    tabstop=3 expandtab=true

A first stab at syntax:

tabstop    | int    | spaces that a <Tab> character counts for
shiftwidth | int    | number of spaces to use for each step of (auto)indent
expandtab  | bool   | write tab as `tabstop` spaces
textwidth  | int    | maximum width of text that is being inserted, a longer 
                    | line will be broken after whitespace to get this width, 
                    | 0 = disabled
fileformat | string | dos/unix/mac
encoding   | string | character encoding per vim `:help encoding-values`
softtabstop ?

← Older   Newer →

Comments are closed.