vim-textobj-underscore
vim-textobj-underscore copied to clipboard
Supported word character before/after [:space:], ^ or $, \W
Sorry, almost implementation were rewritten. However, I thought I should send a pull request because I hope this saves existing vim-textobj-underscore users too :)
Supported 3 extra cases.
-
a_Keymapping-
" [foo_]bar_baz" -
"[foo_]bar_baz" -
":[smile]:"
-
-
i_Keymapping-
" [foo]_bar_baz" -
"[foo]_bar_baz" -
":[smile]:"
-
and if no matching text-object is found, both i_ and a_ select nothing (functions return 0).
a_ Keymapping
Start Pos
Search for...
-
_("foo[_]bar[_]baz")
- This is a supported character currently.
Word character after
-
[:space:](" [f]oo_bar_baz") -
^("[f]oo_bar_baz") -
\W(":[s]mile:")
End Pos
Search for...
-
_("foo[_]bar[_]baz")
- This is a supported character currently.
Word character before
-
[:space:]("foo_bar_ba[z] ") -
$("foo_bar_ba[z]") -
\W(":smil[e]:")
i_ Keymapping
Start Pos
Word character after
-
_("foo_[b]ar_[b]az")- This is a supported character currently.
-
[:space:](" [f]oo_bar_baz") -
^("[f]oo_bar_baz") -
\W(":[s]mile:")
End Pos
Word character before
-
_("fo[o]_ba[r]_baz")- This is a supported character currently.
-
[:space:]("foo_bar_ba[z] ") -
$("foo_bar_ba[z]") -
\W(":smil[e]:")
Tested this and it works great for me! Thanks @tyru :+1:
Agreed, this covers missing functionality for me too, thanks @tyru