diff options
| author | Robert Günzler <r@gnzler.io> | 2024-11-25 13:30:37 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2024-11-25 13:58:25 +0100 |
| commit | 23de12baba9fbfc4ca24581b37c374aa5345cc25 (patch) | |
| tree | e4b3c421bad572eb85a1089eaad44dc3059ab6e6 /.vim/plugin/hardmode.lua | |
| parent | 18e3848110da0a59843058927ea04b496f5db2a5 (diff) | |
update nvim config
Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to '.vim/plugin/hardmode.lua')
| -rw-r--r-- | .vim/plugin/hardmode.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/.vim/plugin/hardmode.lua b/.vim/plugin/hardmode.lua new file mode 100644 index 0000000..f18a5ef --- /dev/null +++ b/.vim/plugin/hardmode.lua @@ -0,0 +1,10 @@ +-- hard mode means we're not using the arrow keys! + +local bail = function() + vim.cmd([[silent! echohl ErrorMsg | echo "HARD MODE: hjkl operation only" | echohl None]]) +end + +vim.keymap.set({ 'v', 'i' }, '<up>', bail) +vim.keymap.set({ 'v', 'i' }, '<down>', bail) +vim.keymap.set({ 'v', 'i' }, '<left>', bail) +vim.keymap.set({ 'v', 'i' }, '<right>', bail) |