Deleting words/characters before the cursor (Ctrl +W / Ctrl + H) don't work in Edit Mode
d0verenny opened this issue · comments
About Bug
When hitting Ctrl + h/ Ctrl + W in Edit Mode, nothing happens neither in MS Word, nor in any other text editor or a website.
Steps to reproduce
- Launch win-vind
- Open a document with words in it.
- Place a cursor after a word
- Hit Ctrl +h / Ctrl + w
- See that a character / a word before the cursor won't delete.
Additional info
I turned off the "Use smart paragraph selection" in Word — still won't work.
Environments
Environments | Delete the example and fill in your information. |
---|---|
Windows Edition | 11 Home |
Windows Version | 22H2 |
Windows Build | 22621.3007 |
Architecture | 64bit |
win-vind Version | 5.10.0.0 |
win-vind Install Type | winget |
How did you bind it in your config? I couldn't find anything on https://pit-ray.github.io/win-vind/cheat_sheet/defaults/normal/ that says that you can do that with CTRL + H
/CTRL + W
by default. You can still use dw
and db
to delete words forward and backwards and x
/X
to delete characters.
How did you bind it in your config? I couldn't find anything on https://pit-ray.github.io/win-vind/cheat_sheet/defaults/normal/ that says that you can do that with
CTRL + H
/CTRL + W
by default. You can still usedw
anddb
to delete words forward and backwards andx
/X
to delete characters.
Thanks for the reply. In what file can I bind it and how exactly?
Also, sorry for the offtop, but where is the file to store key mappings NOT temporarily? In vim those are stored in vimrc
file.
With the program running you can enter the command :e
to open the config file where you place your custom bindings and settings. It's stored in C:\Users\{username}\.win-vind
.
The mapping depends on what keybinds you want. You can find a list of all the available functions on https://pit-ray.github.io/win-vind/cheat_sheet/functions/
If you want to rebind delete word to a custom keybind like CTRL + h you can write something like ennoremap <C-h> dw
to make CTRL + H delete a word in front of the cursor.
I'd recommend reading through the little tutorial available on the website to get a hang of it https://pit-ray.github.io/win-vind/usage/
If you tell me what exactly you want each keybind to do I can offer to help write a config for it.
With the program running you can enter the command
:e
to open the config file where you place your custom bindings and settings. It's stored inC:\Users\{username}\.win-vind
.The mapping depends on what keybinds you want. You can find a list of all the available functions on https://pit-ray.github.io/win-vind/cheat_sheet/functions/
If you want to rebind delete word to a custom keybind like CTRL + h you can write something like
ennoremap <C-h> dw
to make CTRL + H delete a word in front of the cursor.I'd recommend reading through the little tutorial available on the website to get a hang of it https://pit-ray.github.io/win-vind/usage/
If you tell me what exactly you want each keybind to do I can offer to help write a config for it.
Thank you very much for the help, I managed to figure the :e
thing out myself :)
Now I have 2 questions:
-
Can I map something like
ennormap <Space> i<Space><C-[>
to add a space in Edit Normal mode? (Press Space to enter Insert mode, add Space, and immediately go back to Edit Normal mode)? I tried and it didn't work for me. It only enters Insert Mode, but doesn't add space, and doesn't go back to Edit Normal mode. -
Are
yiw
yaw
viw
diw
commands supposed to work in win-vind? Because they don't seem to work for me.
-
I wasn't able to make anything that doesn't cause an infinite loop due to it being triggered by space and pressing space itself. Maybe somebody else can figure something out or you can change the hotkey that triggers it. This is what I had:
ennoremap <space> {<space>}<to_insert>{<space>}<to_edi_normal>
-
They do for me. Are you using any clipboard manager or program that could potentially interfere with it? I couldn't get it to work at first either due to a AHK script I had running that I used as clipboard manager.
Hello
2. They do for me. Are you using any clipboard manager or program that could potentially interfere with it? I couldn't get it to work at first either due to a AHK script I had running that I used as clipboard manager
I used Clipboard history (built-in Windows 10-11 feature). I turned it off, but yiw
viw
etc., still aren't working.
I turned every program off, and still can't use yiw
etc. properly.
@d0verenny
Hi.
The win-vind does not fully support text objects as in Vim.
As a simpler alternative, you can use dw
or yw
using <delete_with_motion>
or <yank_with_motion>
.
Thanks.
@d0verenny Hi.
The win-vind does not fully support text objects as in Vim. As a simpler alternative, you can use
dw
oryw
using<delete_with_motion>
or<yank_with_motion>
.Thanks.
Hi :)
Do you mean that yiw
yaw
viw
diw
won't work?
@d0verenny
Yes, these commands are not supported yet.
@d0verenny Yes, these commands are not supported yet.
Oh, ok, thank you!