rsyslog/.vimrc
Rainer Gerhards 786ea7c92f
chore: add project-wide formatting and editor configs
- add .editorconfig for indent, whitespace, and file-type rules
- add project-local .vimrc to enforce Vim settings via exrc
- add .clang-format for C/C++ style presets and list formatting
- add devtools/format-code.sh to run clang-format and fixups
- adjust clang-format config for stable, idempotent output
- update AGENTS.md with new formatting strategy
- add .git-blame-ignore-revs entry for format change commit

This commit sets up an automated formatting pipeline to let
contributors use their editor of choice while ensuring
consistent, stable code style across the project.
2025-07-16 17:08:01 +02:00

29 lines
936 B
VimL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

" ====================================================================
" Projectlocal Vim settings for rsyslog
" (drop this file as .vimrc or .exrc in the project root)
" ====================================================================
" Use spaces, no tabs
setlocal expandtab
setlocal shiftwidth=4
setlocal softtabstop=4
setlocal tabstop=4
" Trim trailing whitespace on save
autocmd BufWritePre * :%s/\s\+$//e
" Filetype specific overrides:
" Makefiles always use actual tabs
autocmd FileType make setlocal noexpandtab
" Shell and autoconf scripts: 2space indent
autocmd FileType sh,autoconf setlocal expandtab shiftwidth=2 softtabstop=2 tabstop=2
" YAML/CI files: 2space indent
autocmd FileType yaml setlocal expandtab shiftwidth=2 softtabstop=2 tabstop=2
" Python: 4space indent (already default above, but explicit here)
autocmd FileType python setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=4