From 92e96bcdd5a4dd373d9cc0bdd91b1ce72fa9c4ed Mon Sep 17 00:00:00 2001 From: Jannik Zander Date: Mon, 16 May 2016 14:19:04 +0200 Subject: [PATCH] Add .editorconfig and use in vim --- .editorconfig | 11 +++++++++++ .gitconfig | 6 +++--- .vimrc | 4 ++++ 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..2150195 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,11 @@ +# ~/.editorconfig + +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/.gitconfig b/.gitconfig index 6ef32a6..64e38f0 100644 --- a/.gitconfig +++ b/.gitconfig @@ -33,7 +33,7 @@ who = shortlog -s -- remotes = remote -v root = rev-parse --show-toplevel - + cl = clone --recursive # Show the diff between the latest commit and the current state @@ -54,7 +54,7 @@ credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f" # List contributors with number of commits contributors = shortlog --summary --numbered - + k = !gitk ctags = "!sh -c '[ -f .git/hooks/ctags ] || git init; .git/hooks/ctags' git-ctags" @@ -67,7 +67,7 @@ status = auto branch = auto interactive = auto - grep = auto + grep = auto [github] user = jannikz [help] diff --git a/.vimrc b/.vimrc index 6f36ede..6447bb9 100644 --- a/.vimrc +++ b/.vimrc @@ -24,6 +24,7 @@ Plug 'majutsushi/tagbar' Plug 'junegunn/fzf.vim' Plug 'thanthese/Tortoise-Typing' Plug 'altercation/vim-colors-solarized' +Plug 'editorconfig/editorconfig-vim' call plug#end() @@ -93,6 +94,9 @@ let g:fzf_launcher = "In_a_new_term_function %s" "For airline "let g:airline#extensions#tabline#enabled = 1 +let g:EditorConfig_exclude_patterns = ['fugitive://.*', 'scp://.*'] +let g:EditorConfig_verbose=1 + " }}}2 " Section: Commands {{{1 "----------------------- -- 2.43.0