From 22d4fd1b112382b0fb0e34e52c495a48976c5092 Mon Sep 17 00:00:00 2001 From: Ubaldo Tiberi Date: Sat, 9 Nov 2024 14:13:26 +0100 Subject: [PATCH] Mapping and commands available only for supported filetypes --- ftplugin/julia.vim | 1 + ftplugin/python.vim | 1 + lib/ftcommands_mappings.vim | 80 +++++++++++++++++++++++++++++++++++++ lib/repl.vim | 18 ++++++--- plugin/replica.vim | 79 ------------------------------------ 5 files changed, 95 insertions(+), 84 deletions(-) create mode 100644 lib/ftcommands_mappings.vim diff --git a/ftplugin/julia.vim b/ftplugin/julia.vim index 55f85a2..dc3f9be 100644 --- a/ftplugin/julia.vim +++ b/ftplugin/julia.vim @@ -1,6 +1,7 @@ vim9script import autoload "../lib/highlight.vim" +import "../lib/ftcommands_mappings.vim" # The following variable won't change during run-time b:kernel_name = g:replica_kernels[&filetype] diff --git a/ftplugin/python.vim b/ftplugin/python.vim index fdd8dde..e64b776 100644 --- a/ftplugin/python.vim +++ b/ftplugin/python.vim @@ -1,6 +1,7 @@ vim9script import autoload "../lib/highlight.vim" +import "../lib/ftcommands_mappings.vim" # The following variable won't change during run-time b:kernel_name = g:replica_kernels[&filetype] diff --git a/lib/ftcommands_mappings.vim b/lib/ftcommands_mappings.vim new file mode 100644 index 0000000..3d19796 --- /dev/null +++ b/lib/ftcommands_mappings.vim @@ -0,0 +1,80 @@ +vim9script + +import autoload "../lib/repl.vim" + +# ------------ +# Mappings +# ------------ +# TODO: make imap and tmap to work. +noremap