summaryrefslogtreecommitdiff
path: root/app-editors/vim-core/files/vimrc-r8
diff options
context:
space:
mode:
authorD. Ben Knoble <ben.knoble+github@gmail.com>2025-11-05 17:20:00 -0500
committerSam James <sam@gentoo.org>2025-11-16 07:57:38 +0000
commit5a5ef85723c7584cfe82afd2244ba8ec64bc60a9 (patch)
tree5d0b4eb991e6356fb650d378fe0e5ab37fe9b3fd /app-editors/vim-core/files/vimrc-r8
parent7fd20a6847a54a26924a1b55f254c11ce6705c1a (diff)
downloadgentoo-5a5ef85723c7584cfe82afd2244ba8ec64bc60a9.tar.gz
gentoo-5a5ef85723c7584cfe82afd2244ba8ec64bc60a9.tar.bz2
gentoo-5a5ef85723c7584cfe82afd2244ba8ec64bc60a9.zip
app-editors/vim-core: set buffer options locally
Otherwise, they affect global settings and can bleed into other, subsequently opened buffers without warning. The fileencoding option is also set via a similar pattern, but it is only buffer local, so avoid the :setlocal there (it would be harmless). Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/44504 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-editors/vim-core/files/vimrc-r8')
-rw-r--r--app-editors/vim-core/files/vimrc-r84
1 files changed, 2 insertions, 2 deletions
diff --git a/app-editors/vim-core/files/vimrc-r8 b/app-editors/vim-core/files/vimrc-r8
index c770ab2ef3f6..150059c7e602 100644
--- a/app-editors/vim-core/files/vimrc-r8
+++ b/app-editors/vim-core/files/vimrc-r8
@@ -162,7 +162,7 @@ augroup gentoo
" Better to emerge app-vim/gentoo-syntax, which provides full syntax,
" filetype and indent settings for all things Gentoo.
au BufRead,BufNewFile *.e{build,class} let is_bash=1|setfiletype sh
- au BufRead,BufNewFile *.e{build,class} set ts=4 sw=4 noexpandtab
+ au BufRead,BufNewFile *.e{build,class} setl ts=4 sw=4 noexpandtab
" When editing a file, always jump to the last cursor position
autocmd BufReadPost *
@@ -174,7 +174,7 @@ augroup gentoo
" When editing a crontab file, set backupcopy to yes rather than auto. See
" :help crontab and bug #53437.
- autocmd FileType crontab set backupcopy=yes
+ autocmd FileType crontab setl backupcopy=yes
" If we previously detected that the default encoding is not UTF-8
" (g:added_fenc_utf8), assume that a file with only ASCII characters (or no