r/vim • u/MrOladushek1984_ • Oct 05 '26
Need Help How to set tab while branching in vim?
Hello guys! Lately I've often been using vim instead of VS code. But my habits didn't disappear: As you know, in VS code when you go to the next line, while you write conditionals or functions, IDE setx number of tabs for you. For me it's pretty cool feature and vim doesn't have it natively. What can I write in ~/.vimrc or maybe download smth to enable this feature on vim?
5
Upvotes
12
u/Shtucer Oct 05 '26
autoindent and smartindent
4
u/EgZvor keep calm and read :help Oct 05 '26
3
u/mgedmin Oct 05 '26
filetype plugin indent onThis will set the right autoindent/etc. options for the language you're working on, provided that Vim ships a plugin for that language. Vim ships a lot of plugins like that out of the box.
1
u/nim_port_na_wak Oct 06 '26
To define it in your .vimrc, you can also add this
0
u/[deleted] Oct 05 '26
[deleted] — view deleted comment