aboutsummaryrefslogtreecommitdiff
path: root/after/ftplugin
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2022-11-15 01:08:56 +0800
committerjdhao <jdhao@hotmail.com>2022-11-15 01:10:26 +0800
commit074d2bbdfdbdb0ce0d7631a3b9406bd172e0d851 (patch)
treef41a40be27af23b6415c7422c94cc3073cc1a491 /after/ftplugin
parent7f9af87185983e0c89871ed94c02107cc7624f9c (diff)
make filetype mapping local
Otherwise, the mapping will be global and leak to unrelated to files.
Diffstat (limited to 'after/ftplugin')
-rw-r--r--after/ftplugin/lua.vim2
-rw-r--r--after/ftplugin/vim.vim2
2 files changed, 2 insertions, 2 deletions
diff --git a/after/ftplugin/lua.vim b/after/ftplugin/lua.vim
index 193a5d1..73b1a8f 100644
--- a/after/ftplugin/lua.vim
+++ b/after/ftplugin/lua.vim
@@ -2,7 +2,7 @@
set formatoptions-=o
set formatoptions-=r
-nnoremap <silent> <F9> :luafile %<CR>
+nnoremap <buffer><silent> <F9> :luafile %<CR>
" For delimitMate
let b:delimitMate_matchpairs = "(:),[:],{:}"
diff --git a/after/ftplugin/vim.vim b/after/ftplugin/vim.vim
index 4e9a2a4..17dcedb 100644
--- a/after/ftplugin/vim.vim
+++ b/after/ftplugin/vim.vim
@@ -12,4 +12,4 @@ set foldmethod=expr foldexpr=utils#VimFolds(v:lnum) foldtext=utils#MyFoldText()
" see `:h K` and https://stackoverflow.com/q/15867323/6064933
set keywordprg=:help
-nnoremap <silent> <F9> :source %<CR>
+nnoremap <buffer><silent> <F9> :source %<CR>