From dde1eb51b366d3b8820c3eba0e0676db907ef4bd Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 19 Mar 2023 05:21:40 +0100 Subject: insert-layout: Add comments for documentation --- bundle/insert-layout/autoload/insert_layout.vim | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bundle/insert-layout/autoload') diff --git a/bundle/insert-layout/autoload/insert_layout.vim b/bundle/insert-layout/autoload/insert_layout.vim index e9f53b4..8d7263c 100644 --- a/bundle/insert-layout/autoload/insert_layout.vim +++ b/bundle/insert-layout/autoload/insert_layout.vim @@ -1,5 +1,7 @@ vim9script +# Friendly names for the ones used by 'xkbswitch'. The keys are used as +# arguments to the `:InsertLayout` command. const layout_names = { us: 'US', qwazerty: 'QWAZERTY2', @@ -7,6 +9,8 @@ const layout_names = { dvorak: 'Dvorak', } +# Used to store the current layout prior to insertion so it can be restored +# when leaving insert mode. var normal_layout: string def IsLayoutSwitcherAvailable(): number -- cgit v1.2.3