1

When I use auto indent in vim, it almost working correctly, but in C++ 's enum, it have some problem like this:

enter image description here

It should be like this:

enter image description here

My indent settings:

set expandtab       
set tabstop=4       
set smartindent     
set autoindent      
set shiftwidth=2    
set softtabstop=4   
  • 2
    I cannot reproduce this problem. Do you still have an issue if you delete every line in your .vimrc other than these indent settings? – James Sep 29 '17 at 16:32
  • It still have issue. I have try delete some plugin that controling filetype and it still not working correct. – Dark.Hades Sep 29 '17 at 16:55
  • Use clang-format to auto format the code, it's much better than auto indent – James Mitchell Sep 30 '17 at 8:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.