Yea, I replaced ctrl+w with the slew of window controlling combinations within the configuration -all using ctrl+w+<something>. The Vim way of deleting a word works though dw if you are using the plugins that I've specified.
Basically I wanted something that operated like Vim and ditches any wysiwyg editor methods.
I think I probably should have emphasized that my goal was to make VsCode work/feel like Vim over other editor experiences.
Something that might be good to add here is a Vim Cheat Sheet -hope this helps
thanks for the answer.
actually you can delete the word in insert mode with ctrl+w, but when I use your setting I couldn't (because when you press ctrl+w vscode is waiting for the next word/command). so I change that to alt+u for now.
and just another question which I don't get about vim, when we split the window horizontal/vertical, why in vim (or vscodevim I don't know) it split the file we are in it.
here is the picture: dev-to-uploads.s3.amazonaws.com/i/...
shouldn't it actually split another file in the right??
for example, shouldn't be like ctrl+w v {filename}??
(and sorry for my English and my lack of knowledge in vim in general)
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,
Yea, I replaced ctrl+w with the slew of window controlling combinations within the configuration -all using
ctrl+w+<something>
. TheVim way
of deleting a word works thoughdw
if you are using the plugins that I've specified.Basically I wanted something that operated like
Vim
and ditches anywysiwyg
editor methods.I think I probably should have emphasized that my goal was to make VsCode work/feel like
Vim
over other editor experiences.Something that might be good to add here is a Vim Cheat Sheet -hope this helps
thanks for the answer.
actually you can delete the word in insert mode with
ctrl+w
, but when I use your setting I couldn't (because when you pressctrl+w
vscode is waiting for the next word/command). so I change that toalt+u
for now.and just another question which I don't get about vim, when we split the window horizontal/vertical, why in vim (or vscodevim I don't know) it split the file we are in it.
here is the picture:
dev-to-uploads.s3.amazonaws.com/i/...
shouldn't it actually split another file in the right??
for example, shouldn't be like
ctrl+w v {filename}
??(and sorry for my English and my lack of knowledge in vim in general)
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.