aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2024-07-30 00:07:10 -0300
committerSilvio Rhatto <rhatto@riseup.net>2024-07-30 00:07:10 -0300
commit8ad0a0320d9515f91e8c6121229e1e88891e33e0 (patch)
tree30c13033e0980d75215f953018d76654bf36438e
parent8a7cc787dd8034eb0b3eda1ed78c71ac25e3dbf1 (diff)
downloadvim-8ad0a0320d9515f91e8c6121229e1e88891e33e0.tar.gz
vim-8ad0a0320d9515f91e8c6121229e1e88891e33e0.tar.bz2
Fix: use setlocal for filetypes
-rw-r--r--vim.dot.link/filetype.vim10
-rw-r--r--vim.dot.link/ftplugin/mail.vim2
-rw-r--r--vim.dot.link/ftplugin/markdown.vim8
-rw-r--r--vim.dot.link/ftplugin/python.vim2
4 files changed, 11 insertions, 11 deletions
diff --git a/vim.dot.link/filetype.vim b/vim.dot.link/filetype.vim
index 68c9bba..7284bd7 100644
--- a/vim.dot.link/filetype.vim
+++ b/vim.dot.link/filetype.vim
@@ -34,7 +34,7 @@ augroup filetypedetect
" This handling is disabled by default, since it may be conflicting
" with something.
"
- " Markdown folding through NestedMarkdownFolds() are not correctly working
+ " Markdown folding through NestedMarkdownFolds() is not working correctly
" with this configuration.
"
" Maybe what's happenning is that setting the "markdown" filetype
@@ -54,10 +54,10 @@ augroup END
" won't be correctly applied in some Markdown files loaded in new windows.
augroup filetype_markdown
autocmd!
- "autocmd BufRead,BufNewFile,BufEnter *.md set foldexpr=NestedMarkdownFolds()
- "autocmd BufRead,BufNewFile,BufEnter *.md set autoindent smartindent
- "autocmd BufRead,BufNewFile,BufEnter *.md set formatoptions=tcroqn2 comments=n:>
- autocmd BufRead,BufNewFile,BufEnter *.md set tabstop=2 softtabstop=2 shiftwidth=2 expandtab
+ "autocmd BufRead,BufNewFile,BufEnter *.md setlocal foldexpr=NestedMarkdownFolds()
+ "autocmd BufRead,BufNewFile,BufEnter *.md setlocal autoindent smartindent
+ "autocmd BufRead,BufNewFile,BufEnter *.md setlocal formatoptions=tcroqn2 comments=n:>
+ autocmd BufRead,BufNewFile,BufEnter *.md setlocal tabstop=2 softtabstop=2 shiftwidth=2 expandtab
augroup END
" }}}
diff --git a/vim.dot.link/ftplugin/mail.vim b/vim.dot.link/ftplugin/mail.vim
index f21ff9c..c518239 100644
--- a/vim.dot.link/ftplugin/mail.vim
+++ b/vim.dot.link/ftplugin/mail.vim
@@ -2,4 +2,4 @@
"
" Workaround for mail editing. There must be a plugin enabling autoindent in
" mail composition, which is annoying.
-set noautoindent
+setlocal noautoindent
diff --git a/vim.dot.link/ftplugin/markdown.vim b/vim.dot.link/ftplugin/markdown.vim
index b40908e..aafef72 100644
--- a/vim.dot.link/ftplugin/markdown.vim
+++ b/vim.dot.link/ftplugin/markdown.vim
@@ -9,9 +9,9 @@
" These settings are configured directly on filetype.vim instead.
" Basic {{{
-"set autoindent smartindent
-"set tabstop=2 softtabstop=2 shiftwidth=2 expandtab
-"set formatoptions=tcroqn2 comments=n:>
+"setlocal autoindent smartindent
+"setlocal formatoptions=tcroqn2 comments=n:>
+"setlocal tabstop=2 softtabstop=2 shiftwidth=2 expandtab
" }}}
" Markdown configuration without vim-markdown plugin {{{
@@ -21,7 +21,7 @@
"
" This is an alternative to the following method:
" https://codereview.stackexchange.com/questions/202620/vim-plugin-for-folding-markdown-lists
-"set foldexpr=NestedMarkdownFolds()
+"setlocal foldexpr=NestedMarkdownFolds()
" }}}
" Markdown configuration with vim-markdown plugin {{{
diff --git a/vim.dot.link/ftplugin/python.vim b/vim.dot.link/ftplugin/python.vim
index 3e27472..047760c 100644
--- a/vim.dot.link/ftplugin/python.vim
+++ b/vim.dot.link/ftplugin/python.vim
@@ -1,2 +1,2 @@
" Python
-set autoindent smartindent tabstop=4 softtabstop=4 shiftwidth=4 expandtab
+setlocal autoindent smartindent tabstop=4 softtabstop=4 shiftwidth=4 expandtab