Last active
March 24, 2020 12:51
Revisions
-
uladkasach revised this gist
Mar 24, 2020 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -27,6 +27,7 @@ add macro to add async to nearest non-async arrow function before cursor combinations: change till and in - `ciw` => change in word - `ctw` => change till word - `ci(` => change in `(` - `)` change surround - `cs'"` => change surround from ' to " (https://github.com/tpope/vim-surround) -
uladkasach revised this gist
Mar 24, 2020 . 1 changed file with 8 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,4 +22,11 @@ add macro to add async to nearest non-async arrow function before cursor 3. `a` (append -> insert mode), 4. `async` (add async), 5. `q` (stop macro), 6. `@a` (use macro) combinations: change till and in - `ciw` => change in word - `ctw` => change till word change surround - `cs'"` => change surround from ' to " (https://github.com/tpope/vim-surround) -
uladkasach revised this gist
Mar 24, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,7 +18,7 @@ move in line till char add macro to add async to nearest non-async arrow function before cursor 1. `qa` (start recording macro to bind to a), 2. `?[^async] \(\) => {` (reverse search for pattern), 3. `a` (append -> insert mode), 4. `async` (add async), 5. `q` (stop macro), -
uladkasach revised this gist
Mar 24, 2020 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,13 +8,13 @@ search and replace - replace `${__from__},${__to__`} w/ `%` for all lines move screen w/o cursor - `zz` => to middle - `zt` => cursor to top - `zb` => 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 1. `qa` (start recording macro to bind to a), -
uladkasach revised this gist
Mar 24, 2020 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,9 @@ 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 -
uladkasach revised this gist
Mar 24, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ ## searching `/${__regex__}`, enter, n/shift-n => forward search `?${__regex__}`, enter, n/shift-n => backwards search -
uladkasach created this gist
Mar 24, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ 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 middle `zt` => cursor to top `zb` => 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 1. `qa` (start recording macro to bind to a), 2.`?[^async] \(\) => {` (reverse search for pattern), 3. `a` (append -> insert mode), 4. `async` (add async), 5. `q` (stop macro), 6. `@a` (use macro)