From 6c9ab561701ecb14d34f29a6235737c3f13df14a Mon Sep 17 00:00:00 2001 From: dogeystamp Date: Wed, 3 May 2023 21:21:59 -0400 Subject: [PATCH] nvim: funny digraphs --- src/.config/nvim/init.vim | 29 +++++++++++++++++++++++++++- src/.local/bin/deskutils/clipedit.sh | 7 ++++--- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/src/.config/nvim/init.vim b/src/.config/nvim/init.vim index 5152c79..6dafc6e 100755 --- a/src/.config/nvim/init.vim +++ b/src/.config/nvim/init.vim @@ -15,8 +15,9 @@ set lazyredraw nocursorline ttyfast " use system clipboard instead of internal set clipboard=unnamedplus -" when using c, do not overwrite clipboard +" when using c or s, do not overwrite clipboard nnoremap c "-c +nnoremap s "-s let mapleader = "," @@ -35,6 +36,32 @@ highlight LineNr ctermfg=grey " Disable highlighting when searching nnoremap :noh +" see :help digraphs +" these digraphs are reminiscent of canadian french keyboard layout +call digraph_setlist([ + \["'a", 'à'], + \["'e", 'è'], + \["'u", 'ù'], + \["/e", 'é'], + \["}a", 'ä'], + \["}e", 'ë'], + \["}i", 'ï'], + \["}o", 'ö'], + \["}u", 'ü'], + \["}y", 'ÿ'], + \["]c", 'ç'], + \["[a", 'â'], + \["[e", 'ê'], + \["[i", 'î'], + \["[o", 'ô'], + \["[u", 'û'], + \]) + +" misc funny digraphs +call digraph_setlist([ + \["++", '✝'], + \["+-", '†'], + \]) " NetRW diff --git a/src/.local/bin/deskutils/clipedit.sh b/src/.local/bin/deskutils/clipedit.sh index ee0b681..6570fbf 100755 --- a/src/.local/bin/deskutils/clipedit.sh +++ b/src/.local/bin/deskutils/clipedit.sh @@ -1,9 +1,10 @@ #!/bin/sh -# Edit clipboard contents with $EDITOR +# Quick editor popup TMPFILE="$(mktemp)" -xsel -b > "$TMPFILE" -nvim "$TMPFILE" +#xsel -b > "$TMPFILE" +st -g 60x8+0+800 -n popup-bottom-center \ + -e nvim -c "set binary noeol" -c "startinsert" "$TMPFILE" -c "highlight Normal ctermbg=016" cat "$TMPFILE" | xsel -ib rm "$TMPFILE"