From da255cfe08fef9d3f0aa37049d1ce5e758f4cc5d Mon Sep 17 00:00:00 2001 From: Linnnus Date: Tue, 1 Oct 2024 08:47:20 +0200 Subject: nvim: Fix :WrapItUp Here are the changes: - Spaces were being caught as part of the mapping, causing the user to move diagonally when using j/k. These have been removed. - Moved to the correction section. - Made buffer-local, since this is the most common usecase. --- home/neovim/init.vim | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/home/neovim/init.vim b/home/neovim/init.vim index 84159a3..eeb6920 100644 --- a/home/neovim/init.vim +++ b/home/neovim/init.vim @@ -138,11 +138,6 @@ else nnoremap echo "FZF not found!" endif -command WrapItUp set wrap - \ | nnoremap j gj - \ | nnoremap k gk - \ | nnoremap 0 g0 - \ | nnoremap $ g$ " Define go-to-definition help pages, otherwise see the mappings in the hook " for LSP configuration. autocmd Filetype help nnoremap gd @@ -196,6 +191,12 @@ command! DiffOnDisk \ wincmd p | \ diffthis +command WrapItUp setlocal wrap + \| nnoremap j gj + \| nnoremap k gk + \| nnoremap 0 g0 + \| nnoremap $ g$ + " Miscellaneous """"""""""""""""""""""""""" -- cgit v1.2.3