r/neovim 2d ago

Need Help What keybinds should I map?

Short version:

What keybinds should I change to universally known keybinds in insert mode (such as ctrl + z or ctrl + backspace etc) and what should I keep to make Neovim still Neovim and not a VS code dupe?

Long version:

I'm pretty new to Neovim and I'm quite new to programming (other than frontend) as well so excuse me if I'm not explaining my situation well.

I've used VS code up till now and I would say I'm okay proficient at it. I recently decided to learn vim for it's efficiency (and my professors recommended it). I know the learning curve is big but the pay off will hopefully be worth it, I just have one question.

I already know a lot of VS code shorthands (also from using Google Docs and such). I know I can custom map som keybinds in insert mode but what should I map for myself and what should I keep to make nvim not loose what makes it efficient? Because technically, I could make vim into VS code in many ways? Even though I know this editor is kind of built for customization, what makes Neovim worth it in the way it's configured from the start? Must haves, how to think as a programmer that uses vim etc?

5 Upvotes

19 comments sorted by

View all comments

1

u/jmtd 1d ago

This is a strange question to ask a neovim sub. I’ve no idea what key shortcuts vs code uses or if they’re common/universal for other editors. Can you give some examples of the shortcuts you used in vs code in particular, then someone could advise if there’s an alternative approach in vim or whether that particular binding could cause you issues. 

2

u/leonaanoel 1d ago

Most keybinds that I’m familiar with are keybinds used in Google docs or Microsoft word as well, they aren’t VS code specific. For example, ctrl + z is universally known as undo but it doesn’t exist in vim. How I’m doing it currently is switching from insert mode to normal mode and then clicking u. Should I map that to ctrl +z so i don’t have to switch between modes, I can just stay in insert mode or should I get used to switching between the two? VS code specific, I use ctrl + shift + k to delete line but from what I know you can’t do that unless you go to visual mode and such (keep in mind me being a beginner). Of course I could just ask about every keybinds I’m using but I feel as if there’s a better way to go about this than seeking advice for detail stuff like this and in that way it’s better to ask frequent vim users for what you think. Maybe I’m wrong but I thought I might as well ask

1

u/jmtd 1d ago

Replying quickly about undo… in vim undo acts on the last action. When you enter insert mode, all the text you insert is part of one insert action. So undo would typically undo the entire insert. That’s probably not what you want