From b00fc9abf551675538883b286b6a4762d33e1b07 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Wed, 5 Jul 2023 10:17:39 +0200 Subject: [PATCH 1/4] nvim-tree comment out default keys for wsl --- home/.config/nvim/nvim-tree.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/.config/nvim/nvim-tree.vim b/home/.config/nvim/nvim-tree.vim index 2609eac..b625b71 100644 --- a/home/.config/nvim/nvim-tree.vim +++ b/home/.config/nvim/nvim-tree.vim @@ -18,7 +18,7 @@ local function my_on_attach(bufnr) -- for some reason, this does not work well when loaded with a wsl linux. -- attempt to index field 'config' (a nil value) -- which does not make sense, as config is a defined field of the Api variable - api.config.mappings.default_on_attach(bufnr) + --api.config.mappings.default_on_attach(bufnr) -- custom mappings -- cd From 903626f673118f275e74937c17ff865a0b3706b2 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Wed, 5 Jul 2023 10:20:25 +0200 Subject: [PATCH 2/4] comments --- home/.config/nvim/nvim-tree.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/home/.config/nvim/nvim-tree.vim b/home/.config/nvim/nvim-tree.vim index b625b71..392bc5b 100644 --- a/home/.config/nvim/nvim-tree.vim +++ b/home/.config/nvim/nvim-tree.vim @@ -18,6 +18,9 @@ local function my_on_attach(bufnr) -- for some reason, this does not work well when loaded with a wsl linux. -- attempt to index field 'config' (a nil value) -- which does not make sense, as config is a defined field of the Api variable + -- however, through magic, the default keys are loaded anyways ONLY IN WSL + -- I have made a seperate branch (wsl) for any such things + -- just use a proper linux, if possible --api.config.mappings.default_on_attach(bufnr) -- custom mappings From 332dc049f84663281b77fce3fb1d92a21276ed3f Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Wed, 5 Jul 2023 11:28:16 +0200 Subject: [PATCH 3/4] nvim spellcheck --- home/.config/nvim/common.vim | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/home/.config/nvim/common.vim b/home/.config/nvim/common.vim index 5a5d0c7..50474be 100644 --- a/home/.config/nvim/common.vim +++ b/home/.config/nvim/common.vim @@ -7,9 +7,9 @@ set nocompatible set hlsearch " highlight search set incsearch " incremental search set tabstop=4 " number of columns occupied by a tab -set softtabstop=4 " see multiple spaces as tabstops so does the right thing +set softtabstop=4 " see multiple spaces as tab stops so does the right thing set expandtab " converts tabs to white space -set shiftwidth=4 " width for autoindents +set shiftwidth=4 " width for auto indents set autoindent " indent a new line the same amount as the line just typed set number " add line numbers set wildmode=longest,list " get bash-like tab completions @@ -20,7 +20,6 @@ set ttyfast " Speed up scrolling in Vim set fdm=indent " foldingmethod syntax set foldlevel=10 " only fold when a certain complexity is reached by default. This applies only at startup. set numberwidth=4 -set spell " enable spell check (may need to download language package) set timeout timeoutlen=400 set ttimeoutlen=0 @@ -31,7 +30,6 @@ filetype plugin indent on "allow auto-indenting depending on file type filetype plugin on -" let g:indentLine_setColors = 0 let g:indentLine_char = '│' " add lines with double o @@ -69,7 +67,7 @@ let mapleader=" " map t :echo "leader tested!" map h :noh -" copy to wayland clipboard when leader is used. (note, install gvim for this) +" copy to Wayland clipboard when leader is used. (note, install gvim for this) vnoremap wy y :call system("wl-copy", @") nnoremap wY Y :call system("wl-copy", @") nnoremap wy y :call system("wl-copy", @") @@ -98,3 +96,19 @@ nnoremap :vertical resize +1 nnoremap :vertical resize -1 nnoremap :resize -1 nnoremap :resize +1 + +" spell checking +set spell spelllang=en + +" go to last or next misspelled word +nnoremap zn ]s +nnoremap zN [s + +" same as above but only with bad words (unrecognized) +nnoremap Zn ]S +nnoremap ZN [S + +" mark correct with zg, mark bad with zw, undo with zug/zuw + +" correct with zc, default is z= but that sucks for qwertz keyboards +nnoremap zc z= From 056ceb9fe44e770f8d1f623b1b879565091f0e08 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Wed, 5 Jul 2023 11:53:40 +0200 Subject: [PATCH 4/4] change nvim correction from zc to z --- home/.config/nvim/common.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/.config/nvim/common.vim b/home/.config/nvim/common.vim index 50474be..27b3bf0 100644 --- a/home/.config/nvim/common.vim +++ b/home/.config/nvim/common.vim @@ -111,4 +111,4 @@ nnoremap ZN [S " mark correct with zg, mark bad with zw, undo with zug/zuw " correct with zc, default is z= but that sucks for qwertz keyboards -nnoremap zc z= +nnoremap z z=