Created
February 3, 2022 16:17
-
-
Save PeterRincker/7e1d6ff5cc6aef7fd8a42110e1768609 to your computer and use it in GitHub Desktop.
This file contains 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 characters
" Symbol text objects | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment