Answer the question
In order to leave comments, you need to log in
How to make indentation in vim the same as in emacs?
When I edit a file in vim and push to bitbucket or github it shows up with jagged margins. All indents line up in a chaotic manner. Although in emacs everything is fine with this. And in emacs, tabulation is limited to exactly where it should stop according to the formatting rules, no matter how much I press tab. Is there such a possibility in vim?
Answer the question
In order to leave comments, you need to log in
so that there are no problems, instead of one tab there should be n-th number of spaces
set expandtab tabs to spaces
set autoindent auto-indent
set tabstop=4 number of tabs
In this case, all editors will have adequate display.
More here: stackoverflow.com/a/4085551/4972875
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question