diff options
author | Linnnus <[email protected]> | 2024-10-01 08:47:20 +0200 |
---|---|---|
committer | Linnnus <[email protected]> | 2024-10-01 08:49:06 +0200 |
commit | da255cfe08fef9d3f0aa37049d1ce5e758f4cc5d (patch) | |
tree | 623809f9b93da2065b48cef1a441de4d8d1b5c24 /home/neovim/init.vim | |
parent | f6a10683405d630abff940bdcc49498218da5a2f (diff) |
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.
Diffstat (limited to 'home/neovim/init.vim')
-rw-r--r-- | home/neovim/init.vim | 11 |
1 files 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 <leader><leader> <CMD>echo "FZF not found!"<CR> 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 <buffer> gd <C-]> @@ -196,6 +191,12 @@ command! DiffOnDisk \ wincmd p | \ diffthis +command WrapItUp setlocal wrap + \| nnoremap <buffer> j gj + \| nnoremap <buffer> k gk + \| nnoremap <buffer> 0 g0 + \| nnoremap <buffer> $ g$ + " Miscellaneous """"""""""""""""""""""""""" |