Daniel, I completely glossed over that you were talking about insert mode and not normal mode. Sorry about that and I'm glad you found a solution that works for you.
Nonetheless, in Vim proper the way to delete the word under the cursor while in insert mode would be (ctrl+o)dw. I have not found a solution to do insert mode operations in VsCode.
I should also mention that I almost never do any commands in insert mode -not even in Vim. Also, and this might be useful(?), I never use the Esc key to toggle back to normal mode -I have Alt+[hjkl] mapped for that (i.e. hitting Alt+k while in insert mode puts me back in normal mode). This way I don't move my hands around as much :D
As far as the split goes, yes, (ctrl+w)v is emulating normal Vim behavior. However, if you want to create a new split with a new file in both Vim and VsCode you can use the command :vnew. So you may want to replace the normal vsplit command with vnew instead.
Also note: vsplit is really for editing/reviewing long files in different places at the same time. In VsCode splits have a different context because a split also opens a new tab within a "view". Vim's concept of window vs. tab vs. view is not a 1:1 match with VsCode.
thanks for the answer.
actually what I want to open an existing file, vertically.
so around that, I usually, used ctrl+w v to open a file vertically, and when I open file with ctrl+p (go to file... which is for vscode), and when i open the file, i will close the previous file.
just watch this: dev-to-uploads.s3.amazonaws.com/i/...
as you can see, the only thing i wanted in that video is to open all the flag.txt vertically.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Daniel, I completely glossed over that you were talking about insert mode and not normal mode. Sorry about that and I'm glad you found a solution that works for you.
Nonetheless, in
Vim
proper the way to delete the word under the cursor while ininsert mode
would be(ctrl+o)dw
. I have not found a solution to doinsert mode
operations in VsCode.I should also mention that I almost never do any commands in
insert mode
-not even inVim
. Also, and this might be useful(?), I never use theEsc
key to toggle back tonormal
mode -I haveAlt+[hjkl]
mapped for that (i.e. hittingAlt+k
while ininsert mode
puts me back innormal mode
). This way I don't move my hands around as much :DAs far as the split goes, yes,
(ctrl+w)v
is emulating normalVim
behavior. However, if you want to create a new split with a new file in bothVim
andVsCode
you can use the command:vnew
. So you may want to replace the normalvsplit
command withvnew
instead.Also note:
vsplit
is really for editing/reviewing long files in different places at the same time. In VsCode splits have a different context because a split also opens a new tab within a "view". Vim's concept of window vs. tab vs. view is not a 1:1 match with VsCode.thanks for the answer.
actually what I want to open an existing file, vertically.
so around that, I usually, used
ctrl+w v
to open a file vertically, and when I open file withctrl+p
(go to file... which is for vscode), and when i open the file, i will close the previous file.just watch this:
dev-to-uploads.s3.amazonaws.com/i/...
as you can see, the only thing i wanted in that video is to open
all the flag.txt
vertically.