From 501fe211342551cd65f39c521c4702f9e75230af Mon Sep 17 00:00:00 2001 From: lenovo Date: Tue, 29 Nov 2022 15:05:22 +0100 Subject: [PATCH] added vimrc settings for moving in wraped lines --- config_files/.vimrc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/config_files/.vimrc b/config_files/.vimrc index 234b324..61c1de1 100644 --- a/config_files/.vimrc +++ b/config_files/.vimrc @@ -55,6 +55,12 @@ set number " don't allow wrap set nowrap +" in wrap mode, +" show next lines instead of '@' +" break on words +set display=lastline +set lbr + " using alternate buffer with Explore, ':b#' " =0 ot go back to explore buffer " =1 ot go back to last edited file @@ -66,6 +72,7 @@ set nowrap "let g:netrw_altfile = 0 " choose how to print list in :Explore window +" alternatively you can hit 'i' inside Explore window to switch between styles " =0 is default " =3 is tree style let g:netrw_liststyle = 3 @@ -115,6 +122,19 @@ vnoremap `>gvxpgvoo +"--------------------------------------------------------------- +" to move cursor inside wrapping +"--------------------------------------------------------------- +" https://vim.fandom.com/wiki/Move_cursor_by_display_lines_when_wrapping + +nnoremap gj +nnoremap gk +vnoremap gj +vnoremap gk +inoremap gj +inoremap gk + + "--------------------------------------------------------------- " put swap files in a special directory "---------------------------------------------------------------