![]() ![]() % g /norm % search for a pattern and then pass it, norm will go to normal mode on the match and apply a set of commands Xp % reverse two letters, usefull for typos like: fro instead of forĭw % delete the rest of the word and next space (good for full words)ĭe % delete rest of the word but not the space (good for the end of a word)ĭi} or di(. )bar$/\1/ % the \v makes the expression a normal regexp % Upercase Commands -> execute till the endĭ %does the same than d$ % delete till end of line $ĭeletion/ Change / Selection / Copy - Same behavior Going to insert mode - Basics - (don't use only i!!!)Ī I O %really convenient, append end of line, insert beginging of line, open aboveĬTRL N CTRL P % Word/variable/command completion !!! :Sex % split window and open file explorer :ZZ % save and close file (I don't like it) :q! % the question mark always forces stuff (quit without saving changes) :q % quit (close the window, if only only window close the tab, if only one buffer, quit vim) :w filename % write to filename (but still don't open it) :e % edit current (reload it, same as :e %) G % go to the last position of the cursor where something has been edited :changes % display content of the changelist % changelist (different than the jumplist) ![]() :jumps % display the jumplist (not that useful) Scrolling (I like to combine with a :set scrolloff=4, I'd like also :set scroll=6, but it doesn't work)ĬTRL-E CTRL-Y % scroll up/down line by line (can be nice to boost it : nnoremap 3)ĬTRL-B CTRL-F % page backwards page forwardĬTRL-U CTRL-D % half page up half page down, or whatever you set with scroll (default scroll=0)ĬTRL-o CTRL-i % !!! go to older / newer position (in different buffers) counts: search jumps, buffer jumps, lines jumps (goto) etc Zb % will scroll so that the current cursor is at the bottom Zz % will scroll so that the current cursor is at the middle Zt % will scroll so that the current cursor is at the top Z stuff - combine it with: set scrolloff=3 for a smooother screen offset W B E % same but uses spaces as delimitersįx Fx tx Tx % move to the next occurence of letter x (backward or forward, just before(t) or on it(f). Takes a parameter, e.g.H j k l 0 $ ^ % basic motions. Or maybe you want to make more room for an important file.ĬTRL w _ - Max out the height of the current splitĬTRL w | - Max out the width of the current splitĬTRL w = - Normalize all split sizes, which is very handy when resizing terminalĬTRL w > - Incrementally increase the window to the right. ![]() RESIZING WINDOWS #Sometimes windows open up funny or are rendered incorrectly after separating from an external monitor. ![]() NAVIGATE BETWEEN WINDOWS CTRL w CTRL w - switch between windowsĬTRL w UP - Move to the top window from current windowĬTRL w DOWN - Move to the bottom window from current windowĬTRL w LEFT - Move to the left window from current windowĬTRL w RIGHT - Move to the right window from current window MOVING WINDOWS CTRL W r - Swap bottom/top if split horizontallyĬTRL W R - Swap top/bottom if split horizontallyĬTRL w r - Rotates the windows from left to right - only if the windows are split verticallyĬTRL w R - Rotates the windows from right to left - only if the windows are split verticallyĬTRL w H - Move current window the far left and use the full height of the screenĬTRL w J - Move current window the far bottom and use the full width of the screenĬTRL w K - Move current window the far top and full width of the screenĬTRL w L - Move current window the far right and full height of the screen :Sex - Open Vertical Split in ex mode with file browser :Vex - Open Vertical Split in ex mode with file browser diffs the current window with the file givenĬTRL w s - Split current window horizontallyĬTRL w v - Split current window verticallyĬTRL w m - Move to window according to motion mĬTRL w o - Maxmize current window (note: this overwrites your current window configuration) ( - Move to beginning of previous sentence. Ge - Move backwards to next word, with cursor on last character (use gE to jump by whitespace only) W - Move forward to next word, with cursor on first character (use W to jump by whitespace only)ī - Move backward to next word, with cursor on first character (use B to jump by whitespace only)Į - Move forward to next word, with cursor on last character (use E to jump by whitespace only) VIM KEYBOARD SHORTCUTS MOVEMENT h - Move leftĠ - Move to beginning of line (including whitespace) ![]()
0 Comments
Leave a Reply. |