Skip to content

Commit

Permalink
also add vim/emacs edito configuration snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
poettering committed Jan 30, 2017
1 parent 60a7953 commit 69d0906
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .dir-locals.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
; Sets emacs variables based on mode.
; A list of (major-mode . ((var1 . value1) (var2 . value2)))
; Mode can be nil, which gives default values.

; NOTE: If you update this file make sure to update .vimrc and .editorconfig,
; too.

((nil . ((indent-tabs-mode . nil)
(tab-width . 8)
(fill-column . 79)))
(c-mode . ((fill-column . 119)
(c-basic-offset . 8)
(eval . (c-set-offset 'substatement-open 0))
(eval . (c-set-offset 'statement-case-open 0))
(eval . (c-set-offset 'case-label 0))
(eval . (c-set-offset 'arglist-intro '++))
(eval . (c-set-offset 'arglist-close 0))))
(nxml-mode . ((nxml-child-indent . 2)
(fill-column . 119))))
16 changes: 16 additions & 0 deletions .vimrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
" 'set exrc' in ~/.vimrc will read .vimrc from the current directory
" Warning: Enabling exrc is dangerous! You can do nearly everything from a
" vimrc configuration file, including write operations and shell execution.
" You should consider setting 'set secure' as well, which is highly
" recommended!

" NOTE: If you update this file make sure to update .dir-locals.el and
" .editorconfig, too.

set tabstop=8
set shiftwidth=8
set expandtab
set makeprg=GCC_COLORS=\ make
set tw=79
au BufRead,BufNewFile *.xml set tw=119 shiftwidth=2 smarttab
au FileType c set tw=119

0 comments on commit 69d0906

Please sign in to comment.