Vim-plug: How to disable auto-indent with vim-plug ?

Created on 31 May 2018  路  3Comments  路  Source: junegunn/vim-plug

After I applied vim-plug within "call plug#begin('~/.vim/bundle')" and "call plug#end()", I found my vim become auto-indent again even if I manually ":set nosmartindent" and ":set noautoindent".

If I remove "call plug#begin('~/.vim/bundle')" and "call plug#end()", no indention again.

So, I guess if this caused by vim-plug? And Is there any special command to disable the indention of this kind of ?

Thanks.



  • Type:

    • [ ] Bug

    • [ ] Enhancement

    • [ ] Feature Request

    • [x] Question

  • OS:

    • [ ] All/Other

    • [x] Linux

    • [x] OS X

    • [ ] Windows

  • Vim:

    • [x] Terminal Vim

    • [ ] GVim

    • [ ] Neovim

question

Most helpful comment

Thanks. After add filetype indent off following call plug#end() in .vimrc, and reopen the source code, auto-indent disappear.

(Previously, I tried to manually input :filetype indent off in an opened vim, although from the result of checking :filetype, it turns off, but doesn't really take effect.)

Similarly, add filetype plugin off in .vimrc, some auto-complement feature (such inputing new line for /***/ style comment) is disabled.

All 3 comments

See https://github.com/junegunn/vim-plug#usage

plug#end() ... automatically executes filetype plugin indent on and syntax enable. You can revert the settings after the call. e.g. filetype indent off, syntax off, etc.

Thanks. After add filetype indent off following call plug#end() in .vimrc, and reopen the source code, auto-indent disappear.

(Previously, I tried to manually input :filetype indent off in an opened vim, although from the result of checking :filetype, it turns off, but doesn't really take effect.)

Similarly, add filetype plugin off in .vimrc, some auto-complement feature (such inputing new line for /***/ style comment) is disabled.

@junegunn May I ask why this change to default behaviour is part of Vim Plug ?

This issue had me thinking I was losing my mind for a week or two before I found a Reddit post about this which led me to this issue.

Thank you for the great work on Vim Plug ! This is the only minor "complaint" I can find about this software. Easily fixed so no major issues for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

airblade picture airblade  路  9Comments

SolaWing picture SolaWing  路  38Comments

MarcMdev picture MarcMdev  路  16Comments

LemonBoy picture LemonBoy  路  8Comments

jdhao picture jdhao  路  11Comments