summaryrefslogtreecommitdiffstats
path: root/tv
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2023-01-17 01:04:45 +0100
committertv <tv@krebsco.de>2023-01-18 17:23:38 +0100
commitdc3f5c683822d177001b71cc9ee6afa49f3b9969 (patch)
tree501e93045f113137e27a4708ab79ea13d4bd0639 /tv
parent29c8c3ecf1cc66a638020a564e1b72966c259a8b (diff)
tv vimrc: rewrite to vim9script
Diffstat (limited to 'tv')
-rw-r--r--tv/2configs/vim.nix16
1 files changed, 9 insertions, 7 deletions
diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix
index 2b5cd8d2..2c17fbc7 100644
--- a/tv/2configs/vim.nix
+++ b/tv/2configs/vim.nix
@@ -71,7 +71,9 @@ with import ./lib;
];
};
- vimrc = pkgs.writeText "vimrc" ''
+ vimrc = pkgs.writeText "vimrc" /* vim */ ''
+ vim9script
+
set nocompatible
set autoindent
@@ -140,28 +142,28 @@ with import ./lib;
noremap <f3> :ShowSyntax<cr>
- " <C-{Up,Down,Right,Left>
+ # <C-{Up,Down,Right,Left}>
noremap <esc>Oa <nop> | noremap! <esc>Oa <nop>
noremap <esc>Ob <nop> | noremap! <esc>Ob <nop>
noremap <esc>Oc <nop> | noremap! <esc>Oc <nop>
noremap <esc>Od <nop> | noremap! <esc>Od <nop>
- " <[C]S-{Up,Down,Right,Left>
+ # <[C]S-{Up,Down,Right,Left}>
noremap <esc>[a <nop> | noremap! <esc>[a <nop>
noremap <esc>[b <nop> | noremap! <esc>[b <nop>
noremap <esc>[c <nop> | noremap! <esc>[c <nop>
noremap <esc>[d <nop> | noremap! <esc>[d <nop>
vnoremap u <nop>
- " fzf
+ # fzf
nnoremap <esc>q :Buffers<cr>
nnoremap <esc>f :Files<cr>
nnoremap <esc>w :Rg<cr>
- " edit alternate buffer
- " For some reason neither putting <ctrl>6 nor <ctrl>^ works here...
+ # edit alternate buffer
+ # For some reason neither putting <ctrl>6 nor <ctrl>^ works here...
nnoremap <esc>a 
- if $TOUCHSCREEN == 1
+ if $TOUCHSCREEN == "1"
nnoremap <ScrollWheelUp> <C-y>
nnoremap <ScrollWheelDown> <C-e>
nnoremap <C-ScrollWheelUp> 3<C-y>