mirror of
https://github.com/kogakure/dotfiles.git
synced 2026-02-04 04:35:29 +00:00
chore(nvim): add functions
This commit is contained in:
@@ -59,6 +59,7 @@ set dictionary+=~/.config/nvim/dictionary/en_us.txt
|
|||||||
set thesaurus+=~/.config/nvim/thesaurus/de_user.txt
|
set thesaurus+=~/.config/nvim/thesaurus/de_user.txt
|
||||||
set thesaurus+=~/.config/nvim/thesaurus/de_openthesaurus.txt
|
set thesaurus+=~/.config/nvim/thesaurus/de_openthesaurus.txt
|
||||||
|
|
||||||
|
|
||||||
" *** *** *** Key Mappings *** *** ***
|
" *** *** *** Key Mappings *** *** ***
|
||||||
" ************************************
|
" ************************************
|
||||||
|
|
||||||
@@ -149,3 +150,24 @@ nnoremap <C-K> <C-W><C-K>
|
|||||||
nnoremap <C-L> <C-W><C-L>
|
nnoremap <C-L> <C-W><C-L>
|
||||||
nnoremap <C-H> <C-W><C-H>
|
nnoremap <C-H> <C-W><C-H>
|
||||||
|
|
||||||
|
|
||||||
|
" *** *** *** Functions *** *** ***
|
||||||
|
" *********************************
|
||||||
|
|
||||||
|
" Toggle between soft wrap and no wrap
|
||||||
|
nnoremap <leader>tw :call ToggleWrap()<CR>
|
||||||
|
|
||||||
|
function! ToggleWrap()
|
||||||
|
if &wrap
|
||||||
|
echo "Wrap OFF"
|
||||||
|
set nowrap
|
||||||
|
set nolinebreak
|
||||||
|
set virtualedit=all
|
||||||
|
else
|
||||||
|
echo "Wrap ON"
|
||||||
|
set wrap
|
||||||
|
set linebreak
|
||||||
|
set virtualedit=
|
||||||
|
setlocal display+=lastline
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|||||||
Reference in New Issue
Block a user