From 688f8e18aabb10fb8be07b5e567d1259b2f5b9a0 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Wed, 6 Aug 2025 12:14:14 +0200 Subject: [PATCH] vim:ftplug:shell*: Add `-` to `&iskeyword` Add the dash to the keyword character list since command names can (and do) contain them. --- .config/vim/ftplugin/bash.vim | 2 ++ .config/vim/ftplugin/shell.vim | 2 ++ .config/vim/ftplugin/zsh.vim | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 .config/vim/ftplugin/bash.vim create mode 100644 .config/vim/ftplugin/shell.vim create mode 100644 .config/vim/ftplugin/zsh.vim diff --git a/.config/vim/ftplugin/bash.vim b/.config/vim/ftplugin/bash.vim new file mode 100644 index 0000000..c7c929a --- /dev/null +++ b/.config/vim/ftplugin/bash.vim @@ -0,0 +1,2 @@ +" source ./shell.vim (adds `-` to &iskeyword) +execute "source " .. expand(":h") .. "/shell.vim" diff --git a/.config/vim/ftplugin/shell.vim b/.config/vim/ftplugin/shell.vim new file mode 100644 index 0000000..eb618f5 --- /dev/null +++ b/.config/vim/ftplugin/shell.vim @@ -0,0 +1,2 @@ +" Include `-` in keyword characters since command names can contain them +setlocal iskeyword+=- diff --git a/.config/vim/ftplugin/zsh.vim b/.config/vim/ftplugin/zsh.vim new file mode 100644 index 0000000..c7c929a --- /dev/null +++ b/.config/vim/ftplugin/zsh.vim @@ -0,0 +1,2 @@ +" source ./shell.vim (adds `-` to &iskeyword) +execute "source " .. expand(":h") .. "/shell.vim"