What is Vim's feature name for this: # vim:sw=4:ts=4:et:

后端 未结 3 852
醉话见心
醉话见心 2021-02-07 13:06

Even after 20 years with Vim, I keep forgetting name for the Vim feature where the editor picks up config statements from a comment at the beginning (or I think end) of a file:<

3条回答
  •  清酒与你
    2021-02-07 13:49

    It's called modeline. In help it can be found by grepping

    helpgrep # vim
    

    If you wish to check whether modeline are active, do set modeline? (if the are it will say modeline, otherwise nomodeline)

    To turn them off for certain, add this in your vimrc

    :set modelines=0 "number of modelines vim parses
    :set nomodeline "turn off parsing
    

提交回复
热议问题