aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2023-03-18 13:10:36 +0100
committerTeddy Wing2023-03-19 19:52:34 +0100
commit7a52016eaff478ce8cd55db1314e900f32bf2177 (patch)
tree13388e9ea20711e904fd1692e4544cfd96cab2a3
parent4b174b7fe90f0f7351c7215e7f452eb0374e50e9 (diff)
downloaddotvim-7a52016eaff478ce8cd55db1314e900f32bf2177.tar.bz2
Add 'insert-layout' plugin idea
This uses `xkbswitch` to change keyboard layouts on insert enter and leave. For now it's only a proof of concept. The plan is to make an `:InsertLayout` command that takes an argument defining the keyboard layout to use in insert mode. When returning to normal mode, it should switch back to the previous layout. This uses https://github.com/myshov/xkbswitch-macosx/.
-rw-r--r--bundle/insert-layout/plugin/insert_layout.vim7
1 files changed, 7 insertions, 0 deletions
diff --git a/bundle/insert-layout/plugin/insert_layout.vim b/bundle/insert-layout/plugin/insert_layout.vim
new file mode 100644
index 0000000..f271264
--- /dev/null
+++ b/bundle/insert-layout/plugin/insert_layout.vim
@@ -0,0 +1,7 @@
+" 2023.03.09
+
+augroup frinsert
+ autocmd!
+ autocmd InsertEnter * :call system('xkbswitch -se French-numerical')
+ autocmd InsertLeave * :call system('xkbswitch -se US')
+augroup END