From f35d5afbf1bae81896d4b959c7d99cf50e0c306f Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Wed, 7 Aug 2024 22:06:05 +0200 Subject: [PATCH] vim-patch:39eff4c: runtime(proto): Add indent script for protobuf filetype closes: vim/vim#15446 https://github.com/vim/vim/commit/39eff4cdc055a0f0db0d32fcf7a74fe30ea54f25 Co-authored-by: David Pedersen --- runtime/indent/proto.vim | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 runtime/indent/proto.vim diff --git a/runtime/indent/proto.vim b/runtime/indent/proto.vim new file mode 100644 index 0000000000..743f14094b --- /dev/null +++ b/runtime/indent/proto.vim @@ -0,0 +1,19 @@ +" Vim indent file +" Language: Protobuf +" Maintainer: David Pedersen +" Last Change: 2024 Aug 07 + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +" Protobuf is like indenting C +setlocal cindent +setlocal expandtab +setlocal shiftwidth=2 + +let b:undo_indent = "setlocal cindent< expandtab< shiftwidth<" + +" vim: sw=2 sts=2 et