-
Notifications
You must be signed in to change notification settings - Fork 246
Keystrokes for example gifs
Antoine edited this page Jul 24, 2018
·
6 revisions
- jump to
p
withfp
- select the word under cursor with
<C-n>
- do that two more times for the other two occurrences in the function
- press
c
to change - type the replacement
- press
<Esc>
to quit back to regular Vim
- select the line with
V
- go to the end of the file with
G
- press
<C-n>
to add a cursor at the beginning of every line and move to normal mode - press
I
to insert at the beginning of the line - type
"
, move to end of line with<End>
, type another"
followed by,
- move every cursor down one line with
<Down>
- move to beginning of line with
<Home>
, then hit<BS>
, now all the words are on the same line - the rest is just normal Vim
- press
dt"
to delete everything until the first quote - press
L
to go to end of line (my custom mapping, default$
) - press
r,
to replace the]
with,
- go back to the beginning of the line with
H
(custom, default^
), pressf,
to find the first comma - press
v
to select,
in visual mode, and mash on<C-n>
until the last occurrence - press
c
followed by<CR>
to break the line into multiple lines - move every cursor up one line with
<C-k>
(again my custom mapping) - delete the left quote with
C-g<BS>
(custom mapping to move cursor in insert mode) - go to end of line and delete right quote with
C-e<BS>
- press
jV
to visually select the second line - press
Gk
to select all but the last line - type
:
followed by theMultipleCursorsFind
command - press
o
to toggle the cursor for each visual selection - press
p
to paste the content of the+
register (I haveclipboard=unnamedplus
in my vimrc) to each virtual cursor