Skip to content
Shin Okada edited this page Aug 1, 2015 · 2 revisions

Toggleing the free end

o # jump to the other end of visually selected area
vbb # visual back back
o # cursor to the other end
e # selecting end as well

gU{motion}

gUit changes uppercase inside the tag and repeating it will do the same even inside the tag is different length. vitU j. j. changes the same length as the first one.

gUit # Make uppercase inside the tag
j.
j.

Visual selection

<C-v>3j # visual block mode for four lines including the first one.
x... # delete 4 characters
gv # to reselect the last selection
r| # replace it with |
yyp # copy a line and paste it
Vr- # line visual mode and replace the line with -

<C-v>jje # visual block mode 2 lines below and to the end
c # change
some word 


yiw
jww # move down and move two words
ve # select with visual mode upto the end of the word
p # this will replace the selected part with the yanked word.

# highlight the previously selected part.
gv

Note that in visual mode, p gets the contents of the unnamed register and it sets the contents of the unnamed register.

m{char} sets a mark and ``{char}` jumps to the mark.

fc # find the first character c
de # delete that word till end
mm # mark the position as m

gp and gP is useful for p and P. gP will paste and put the cursor at the end.

Clone this wiki locally