-
-
Save numToStr/01213cef3c2e75b0cb0b75b2616fbde6 to your computer and use it in GitHub Desktop.
Revisions
-
romainl renamed this gist
Apr 2, 2021 . 1 changed file with 14 additions and 14 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,5 +1,5 @@ " 24 simple pseudo-text objects " ----------------------------- " i_ i. i: i, i; i| i/ i\ i* i+ i- i# " a_ a. a: a, a; a| a/ a\ a* a+ a- a# for char in [ '_', '.', ':', ',', ';', '<bar>', '/', '<bslash>', '*', '+', '-', '#' ] @@ -9,16 +9,16 @@ for char in [ '_', '.', ':', ',', ';', '<bar>', '/', '<bslash>', '*', '+', '-', execute 'onoremap a' . char . ' :normal va' . char . '<CR>' endfor " line pseudo-text objects " ------------------------ " il al xnoremap il g_o^ onoremap il :<C-u>normal vil<CR> xnoremap al $o0 onoremap al :<C-u>normal val<CR> " number pseudo-text object (integer and float) " --------------------------------------------- " in function! VisualNumber() call search('\d\([^0-9\.]\|$\)', 'cW') @@ -28,32 +28,32 @@ endfunction xnoremap in :<C-u>call VisualNumber()<CR> onoremap in :<C-u>normal vin<CR> " buffer pseudo-text objects " -------------------------- " i% a% xnoremap i% :<C-u>let z = @/\|1;/^./kz<CR>G??<CR>:let @/ = z<CR>V'z onoremap i% :<C-u>normal vi%<CR> xnoremap a% GoggV onoremap a% :<C-u>normal va%<CR> " square brackets pseudo-text objects " ----------------------------------- " ir ar xnoremap ir i[ xnoremap ar a[ onoremap ir :normal vi[<CR> onoremap ar :normal va[<CR> " block comment pseudo-text objects " --------------------------------- " i? a? xnoremap a? [*o]* onoremap a? :<C-u>normal va?V<CR> xnoremap i? [*jo]*k onoremap i? :<C-u>normal vi?V<CR> " last change pseudo-text objects " ------------------------------- " ik ak xnoremap ik `]o`[ onoremap ik :<C-u>normal vik<CR> -
romainl revised this gist
Apr 4, 2020 . No changes.There are no files selected for viewing
-
romainl revised this gist
Mar 30, 2020 . 1 changed file with 2 additions and 2 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 @@ -41,8 +41,8 @@ onoremap a% :<C-u>normal va%<CR> " ir ar xnoremap ir i[ xnoremap ar a[ onoremap ir :normal vi[<CR> onoremap ar :normal va[<CR> " block comment text objects " -------------------------- -
romainl revised this gist
Mar 30, 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 @@ -19,7 +19,7 @@ onoremap al :<C-u>normal val<CR> " number text object (integer and float) " -------------------------------------- " in function! VisualNumber() call search('\d\([^0-9\.]\|$\)', 'cW') normal v -
romainl revised this gist
Mar 30, 2020 . 1 changed file with 2 additions and 2 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 @@ -17,8 +17,8 @@ onoremap il :<C-u>normal vil<CR> xnoremap al $o0 onoremap al :<C-u>normal val<CR> " number text object (integer and float) " -------------------------------------- " in an function! VisualNumber() call search('\d\([^0-9\.]\|$\)', 'cW') -
romainl revised this gist
Mar 30, 2020 . 1 changed file with 7 additions and 7 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 @@ -13,9 +13,9 @@ endfor " ----------------- " il al xnoremap il g_o^ onoremap il :<C-u>normal vil<CR> xnoremap al $o0 onoremap al :<C-u>normal val<CR> " number text objects (integer and float) " --------------------------------------- @@ -26,23 +26,23 @@ function! VisualNumber() call search('\(^\|[^0-9\.]\d\)', 'becW') endfunction xnoremap in :<C-u>call VisualNumber()<CR> onoremap in :<C-u>normal vin<CR> " buffer text objects " ------------------- " i% a% xnoremap i% :<C-u>let z = @/\|1;/^./kz<CR>G??<CR>:let @/ = z<CR>V'z onoremap i% :<C-u>normal vi%<CR> xnoremap a% GoggV onoremap a% :<C-u>normal va%<CR> " square brackets text objects " ---------------------------- " ir ar xnoremap ir i[ xnoremap ar a[ onoremap ir :<C-u>normal vi[<CR> onoremap ar :<C-u>normal va[<CR> " block comment text objects " -------------------------- -
romainl revised this gist
Mar 30, 2020 . 1 changed file with 12 additions and 16 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,4 +1,4 @@ " 24 simple text objects " ---------------------- " i_ i. i: i, i; i| i/ i\ i* i+ i- i# " a_ a. a: a, a; a| a/ a\ a* a+ a- a# @@ -9,15 +9,15 @@ for char in [ '_', '.', ':', ',', ';', '<bar>', '/', '<bslash>', '*', '+', '-', execute 'onoremap a' . char . ' :normal va' . char . '<CR>' endfor " line text objects " ----------------- " il al xnoremap il g_o^ onoremap il :normal vil<CR> xnoremap al $o0 onoremap al :normal val<CR> " number text objects (integer and float) " --------------------------------------- " in an function! VisualNumber() @@ -28,33 +28,29 @@ endfunction xnoremap in :<C-u>call VisualNumber()<CR> onoremap in :normal vin<CR> " buffer text objects " ------------------- " i% a% xnoremap i% :<C-u>let z = @/\|1;/^./kz<CR>G??<CR>:let @/ = z<CR>V'z onoremap i% :normal vi%<CR> xnoremap a% GoggV onoremap a% :normal va%<CR> " square brackets text objects " ---------------------------- " ir ar xnoremap ir i[ xnoremap ar a[ onoremap ir :normal vi[<CR> onoremap ar :normal va[<CR> " block comment text objects " -------------------------- " i? a? xnoremap a? [*o]* onoremap a? :<C-u>normal va?V<CR> xnoremap i? [*jo]*k onoremap i? :<C-u>normal vi?V<CR> " last change text object " ----------------------- -
romainl revised this gist
Mar 14, 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 @@ -54,4 +54,11 @@ onoremap ar :normal va[<CR> " ------------------------- " a? xnoremap a? ?<C-r>=split(&commentstring, "%s")[0]<CR><CR>o/<C-r>=split(&commentstring, "%s")[1]<CR>/e<CR> onoremap a? :<C-u>normal va?<CR> " last change text object " ----------------------- " ik ak xnoremap ik `]o`[ onoremap ik :<C-u>normal vik<CR> onoremap ak :<C-u>normal vikV<CR> -
romainl revised this gist
Feb 29, 2020 . 1 changed file with 7 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 @@ -48,4 +48,10 @@ onoremap <buffer> i? :normal vi?<CR> xnoremap ir i[ xnoremap ar a[ onoremap ir :normal vi[<CR> onoremap ar :normal va[<CR> " block comment text object " ------------------------- " a? xnoremap a? ?<C-r>=split(&commentstring, "%s")[0]<CR><CR>o/<C-r>=split(&commentstring, "%s")[1]<CR>/e<CR> onoremap a? :<C-u>normal va?<CR> -
romainl revised this gist
Jul 14, 2019 . 1 changed file with 2 additions 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 @@ -45,5 +45,7 @@ onoremap <buffer> i? :normal vi?<CR> " square brackets text-objects " ---------------------------- " ir ar xnoremap ir i[ xnoremap ar a[ onoremap ir :normal vi[<CR> onoremap ar :normal va[<CR> -
romainl revised this gist
Jun 29, 2019 . 1 changed file with 6 additions 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 @@ -41,3 +41,9 @@ onoremap a% :normal va%<CR> " i? a? xnoremap <buffer> i? ?/\*<CR>o/\*\/<CR> onoremap <buffer> i? :normal vi?<CR> " square brackets text-objects " ---------------------------- " ir ar onoremap ir :normal vi[<CR> onoremap ar :normal va[<CR> -
romainl revised this gist
Jan 17, 2019 . 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 @@ -34,7 +34,7 @@ onoremap in :normal vin<CR> xnoremap i% :<C-u>let z = @/\|1;/^./kz<CR>G??<CR>:let @/ = z<CR>V'z onoremap i% :normal vi%<CR> xnoremap a% GoggV onoremap a% :normal va%<CR> " comment text-objects " -------------------- -
romainl revised this gist
May 26, 2017 . 1 changed file with 3 additions and 3 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 @@ -21,9 +21,9 @@ onoremap al :normal val<CR> " --------------------------------------- " in an function! VisualNumber() call search('\d\([^0-9\.]\|$\)', 'cW') normal v call search('\(^\|[^0-9\.]\d\)', 'becW') endfunction xnoremap in :<C-u>call VisualNumber()<CR> onoremap in :normal vin<CR> -
romainl revised this gist
May 26, 2017 . 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 @@ " 24 simple text-objects " ---------------------- " i_ i. i: i, i; i| i/ i\ i* i+ i- i# " a_ a. a: a, a; a| a/ a\ a* a+ a- a# -
romainl revised this gist
May 26, 2017 . 1 changed file with 9 additions and 3 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 @@ -17,7 +17,7 @@ onoremap il :normal vil<CR> xnoremap al $o0 onoremap al :normal val<CR> " number text-objects (integer and float) " --------------------------------------- " in an function! VisualNumber() @@ -28,10 +28,16 @@ endfunction xnoremap in :<C-u>call VisualNumber()<CR> onoremap in :normal vin<CR> " buffer text-objects " ------------------- " i% a% xnoremap i% :<C-u>let z = @/\|1;/^./kz<CR>G??<CR>:let @/ = z<CR>V'z onoremap i% :normal vi%<CR> xnoremap a% GoggV onoremap a% :normal vi%<CR> " comment text-objects " -------------------- " i? a? xnoremap <buffer> i? ?/\*<CR>o/\*\/<CR> onoremap <buffer> i? :normal vi?<CR> -
romainl revised this gist
May 26, 2017 . 1 changed file with 33 additions and 2 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,6 +1,37 @@ " 26 simple text-objects " ---------------------- " i_ i. i: i, i; i| i/ i\ i* i+ i- i# " a_ a. a: a, a; a| a/ a\ a* a+ a- a# for char in [ '_', '.', ':', ',', ';', '<bar>', '/', '<bslash>', '*', '+', '-', '#' ] execute 'xnoremap i' . char . ' :<C-u>normal! T' . char . 'vt' . char . '<CR>' execute 'onoremap i' . char . ' :normal vi' . char . '<CR>' execute 'xnoremap a' . char . ' :<C-u>normal! F' . char . 'vf' . char . '<CR>' execute 'onoremap a' . char . ' :normal va' . char . '<CR>' endfor " line text-objects " ----------------- " il al xnoremap il g_o^ onoremap il :normal vil<CR> xnoremap al $o0 onoremap al :normal val<CR> " number (integer and float) text-objects " --------------------------------------- " in an function! VisualNumber() call search('\d\([^0-9\.]\|$\)', 'cW') normal v call search('\(^\|[^0-9\.]\d\)', 'becW') endfunction xnoremap in :<C-u>call VisualNumber()<CR> onoremap in :normal vin<CR> " buffer text-object " ------------------ " i% a% xnoremap i% :<C-u>let z = @/\|1;/^./kz<CR>G??<CR>:let @/ = z<CR>V'z onoremap i% :normal vi%<CR> xnoremap a% GoggV onoremap a% :normal vi%<CR> -
romainl created this gist
May 26, 2017 .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,6 @@ for char in [ '_', '.', ':', ',', ';', '<bar>', '/', '<bslash>', '*', '+', '%', '-', '#' ] execute 'xnoremap i' . char . ' :<C-u>normal! T' . char . 'vt' . char . '<CR>' execute 'onoremap i' . char . ' :normal vi' . char . '<CR>' execute 'xnoremap a' . char . ' :<C-u>normal! F' . char . 'vf' . char . '<CR>' execute 'onoremap a' . char . ' :normal va' . char . '<CR>' endfor