Changes between Version 3 and Version 4 of EditorConfigs


Ignore:
Timestamp:
06/12/13 18:41:44 (6 years ago)
Author:
immerrr
Comment:

extend emacs section: add "tab-width 8" style variable and describe ".dir-locals.el"

Legend:

Unmodified
Added
Removed
Modified
  • EditorConfigs

    v3 v4  
    66
    77{{{
    8 (c-add-style "pidgin" '((c-tab-always-indent . t)
     8(c-add-style "pidgin" '((tab-width . 8)
     9                        (c-tab-always-indent . t)
    910                        (c-basic-offset . 8)
    1011                        (indent-tabs-mode . t)))
     
    1920
    2021Make sure this hook runs after your normal setup hook, if your normal hook sets a style.  The or is included just to show how to match multiple paths.  You may perform the selection however you like, path snippets just happen to be useful given my filesystem organization.  -- [wiki:elb]
     22
     23>If you're using Emacs23+, there's an arguably cleaner way to set up project-specific configuration  via [http://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html directory variables]. All you need to do is to add the customization to `.dir-locals.el` file to the root dir of your pidgin clone and it will be applied to all files below that dir. For example, given the `pidgin` style definition above, my setup is as follows (additional `c++-mode` config is necessary if you associate `*.h` files with it, like I do):
     24>{{{
     25>((c-mode . ((c-file-style . "pidgin")))
     26> (c++-mode . ((c-file-style . "pidgin")
     27>              (mode . c))))
     28>}}}
     29>
     30>-- immerrr
    2131
    2232== VIM ==
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!