From 80bdc71c0ed44f63e0f2f45f8e264e2022cc6658 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Tue, 27 Nov 2018 21:10:47 +0200 Subject: syntax-highlighting: vim: Allow overriding shiftwidth and softtabstop The vim syntax indentation rules stored in indent/meson.vim set the local shiftwidth and softtabstop variables. As the file is loaded last, after ~/.vim/after/ftplugin/meson.vim (when present), this prevents overriding the default values for shiftwidth and softtabstop in a local configuration. Fix this by setting shiftwidth and softtabstop in ftplugin/meson.vim instead (as done by the python indentiation rules in upstream vim for instance) to allow local overrides. Signed-off-by: Laurent Pinchart --- data/syntax-highlighting/vim/ftplugin/meson.vim | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 data/syntax-highlighting/vim/ftplugin/meson.vim (limited to 'data/syntax-highlighting/vim/ftplugin/meson.vim') diff --git a/data/syntax-highlighting/vim/ftplugin/meson.vim b/data/syntax-highlighting/vim/ftplugin/meson.vim new file mode 100644 index 000000000..e21b61f3d --- /dev/null +++ b/data/syntax-highlighting/vim/ftplugin/meson.vim @@ -0,0 +1,15 @@ +" Vim filetype plugin file +" Language: meson +" Original Author: Laurent Pinchart +" Last Change: 2018 Nov 27 + +if exists("b:did_ftplugin") | finish | endif +let b:did_ftplugin = 1 +let s:keepcpo= &cpo +set cpo&vim + +setlocal shiftwidth=2 +setlocal softtabstop=2 + +let &cpo = s:keepcpo +unlet s:keepcpo -- cgit v1.2.3