searching
/${__regex__}
, enter, n/shift-n => forward search?${__regex__}
, enter, n/shift-n => backwards search
search and replace
:${__from__},${__to__}s/${__search_regex__}/${__replace_regex__}/gc
- drop c for no confirmation
- replace
${__from__},${__to__
} w/%
for all lines
move screen w/o cursor
zz
=> to middlezt
=> cursor to topzb
=> cursor to bottom
move in line till char
f${char}
=> find char (F
to reverse search)t${char}
=> till char (T
to reverse search)
add macro to add async to nearest non-async arrow function before cursor
qa
(start recording macro to bind to a),?[^async] \(\) => {
(reverse search for pattern),a
(append -> insert mode),async
(add async),q
(stop macro),@a
(use macro)
combinations: change till and in
ciw
=> change in wordctw
=> change till wordci(
=> change in(
-)
change surround
cs'"
=> change surround from ' to " (https://github.com/tpope/vim-surround)