Transitioning to vim. Having issues with indentation

前端 未结 2 1628
执念已碎
执念已碎 2021-01-24 23:47

I am recovering from a surgery, thusly, I am transitioning to VIM. As I starting point, I\'ve opted to use the vim-sensible plugin as the foundation of my configuration. Addit

2条回答
  •  难免孤独
    2021-01-25 00:25

    In my vimrc I have the following:

    set autoindent
    set expandtabs
    set shiftwidth=4
    set tabstop=4
    

    Actually I just have

    set ai et sw=4 ts=4
    

    You can change the specific settings using FileType or BufEnter:

    autocmd BufEnter *.py ai et sw=4 ts=4
    

提交回复
热议问题