VIM always uses tabs

I need a command that I can put in a ~ / .vimrc file that will make vim always open in tabbed mode without having to pass it -pon the command line.

Is there such a team? If not, is there a better way to do this. I am currently using

alias vi='vim -p'

in my bash profile.

Thanks.....

+4
source share
2 answers

Setting the following options in ~/.vimrcandsource ~/.vimrc

au VimEnter * if !&diff | tab all | tabfirst | endif

works as mentioned here


or set an alias in your rc file, for example. ~/.bashrc. This is the approach I take.

alias vim='vim -p'
alias vi='vim -p'
+2
source

You need to add :au BufAdd,BufNewFile * nested tab sballto vimrc as this .

Edit:

:au BufAdd,BufNewFile,BufRead * nested tab sball

, , .

+3

Source: https://habr.com/ru/post/1624538/


All Articles