jugglerchris / textadept-vi

Customisation for the textadept editor to make it a bit more like vim.
MIT License
35 stars 5 forks source link

using visual mode with movement of word selects to much #33

Closed Nanoc-ice closed 4 years ago

Nanoc-ice commented 4 years ago

I have been trying to use your plugin with textadept and see what keymappings work and what is missing. I have a couple following: As title says using the keys: vw
selecting the word in visual mode it actually goes past the space and selects the first letter of the next word. If the following command is a x or d it gets rid of the extra two characters

Another keymapping I use a lot is to change('c') from the cursor, to/find (t/f) a specific character. so in the line: function footer-club(blah)
if I put the cursor on the 'f' in footer and type 'ct(' I would want to change all the characters in 'footer-club' with whatever I type.

I don't normally use visual mode but that may an alternate method, but it changes all the characters with the first letter typed.

jugglerchris commented 4 years ago

Hi,

Thanks for the interest!

I've just tried out vw, with Textadept 11 alpha and compared it with vim - they seem to behave the same - the first character of the next word is included in the selection. With ve it's only up to the end of the current word. I checked with the words "hello world". One thing I haven't implemented is setting the word characters, could that be affecting what you're expecting?

ct does work with letters but apparently not with ( - in your example ctb works but not ct(. I've found the problem (it only worked with ASCII letters) and pushed a fix - please let me know if it works for you!

Nanoc-ice commented 4 years ago

Yes the ‘ct(‘ works with you fix. And it was pilot error on the ‘ way, sorry for the inconvenience. I will continue to use it and see what else I use that isn’t there and can’t live without.

Thanks again for the quick response!