From 750376d311400441680a1ce8c546eaa05c2e333e Mon Sep 17 00:00:00 2001 From: phansible Date: Mon, 14 Apr 2025 12:56:37 -0400 Subject: [PATCH] Added no line break to wrap toggle --- .vimrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.vimrc b/.vimrc index 4852d20..f771657 100644 --- a/.vimrc +++ b/.vimrc @@ -257,8 +257,8 @@ map g :GFiles " https://github.com/junegunn/fzf.vim/issues/1235#issuecomment-773726008 nnoremap f :call fzf#run(fzf#vim#with_preview(fzf#wrap({'source': 'find . \( -name .git -o -name .stversions \) -prune -o -print -iname "*'.expand("").'*"', 'sink': 'e', 'options': '--query="'.expand("").'"'}))) -" Toggle wrapping with w -nnoremap w :set wrap! +" Toggles line wrapping with linebreak enabled when wrapping is turned on with w +nnoremap w :execute "if &wrap\n set nowrap\nelse\n set wrap linebreak\nendif" " --------------------------------------------------------------------------------------------------------------------- " ==> Keymaps: Text bubbling (http://vimcasts.org/episodes/bubbling-text/)