Recent Changes · Search:

Dispense


Navigation Tips - Dritte


PmWiki

pmwiki.org

edit SideBar

Gvim

< python3.4 under virtualenv | Index | Quirks of true WIn10 >


Gvim primer (see also this Cheat Sheet)

ctrl-c or ESC - enter normal mode
:w save buffer
:q quit
:q! force quit
:e filepath - edit file
:b buffer - switch to buffer
:bd - deletes current buffer
:s/oldtext/newtext/g - find and replace in current line, see also •, below
:%s/oldtext/newtext/g - find and replace in whole buffer
:75,79s/old/new/gc - - find and replace in range 74,78 and confirm each instance
fX - finds first X in line
dfy - delete (up to) find y
. - repeat last change command (e.g. fX. repeats fXdfy) 

Visual, select text by mouse (or V)

y - yank [1]
d - delete
p - paste over
  • [1] yank copies to unnamed register. Its content is obtained in normal mode by ctrl-r "
  • replace all is select & yank the text to be replaced, ctrl-c :%s/ctrl-r "/new text and enter

or select by

V - visual
nG - go to line n
0,$ - go to beginning,end of line
mG - go to line G
ggVG - select all
y,d,p as above

block visual e.g. comment/uncomment

ctrl-v - at the beginning of block, then move to end of block
shift-i# - comment/ x - uncomment  
ctrl-c or ESC - to extend to the block

Split windows

:vs - vertical, same buffer (change buffer in either with b: )
crtl-w w - right panel
crtl-w ctrl-w - left panel
ctrl-w c - close the right split panel

normal mode -> insert

o - add line below 
O - add line above
I - at beginning of line text
i - insert at cursor
a - insert after cursor
A - at end of line

"+gP - paste bash buffer

command mode undo-redo

u -undo
ctrl-r -  redo

normal mode move

hjkl - < v ^ >
HM0$L - top of screen, middle, start of line, end of line, bottom screen
gg G - top fo file, end of file 
nG - go to line n
w,b - >< by one word
% - go to matching () 

< python3.4 under virtualenv | Index | Quirks of true WIn10 >

Edit - History - Print - PDF - Recent Changes - Search
Page last modified on May 24, 2026, at 02:49 PM