Trac is being migrated to new services! Issues can be found in our new YouTrack instance and WIKI pages can be found on our website.

Changes between Initial Version and Version 1 of EditorConfigs


Ignore:
Timestamp:
Mar 28, 2011, 9:45:23 PM (13 years ago)
Author:
elb
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • EditorConfigs

    v1 v1  
     1= Editor Configuration Snippets =
     2
     3== Emacs ==
     4
     5Suppose your personal preferred indentation style is dissimilar from the Pidgin indentation style, but you're a team player and you want to use Pidgin indentation when working on Pidgin/libpurple/whatever.  These snippets can help you with that.
     6
     7{{{
     8(c-add-style "pidgin" '((c-tab-always-indent . t)
     9                        (c-basic-offset . 8)
     10                        (indent-tabs-mode . t)))
     11
     12(defun pidgin-c-mode-init ()
     13  (if (or (posix-string-match "some/path/snippet" (buffer-file-name))
     14          (posix-string-match "code/pidgin" (buffer-file-name)))
     15      (c-set-style "pidgin")))
     16
     17(add-hook 'c-mode-hook 'pidgin-c-mode-init)
     18}}}
     19
     20Make 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]
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!