As a background, vim modelines is a magic comment in the text file that sets some of the vim options. It is similar to emacs' file variables.

A modeline like ;; vim: set expandtab : in a lisp file enables the option expandtab which convert tab character to spaces.

Is there a package that does emulation of vim modelines for emacs?


Surprisingly enough, there is such a thing: https://github.com/cinsk/emacs-vim-modeline

I'd recommend to add file-local or directory-local variables to the affected files though. Alternatively, using https://editorconfig.org/ for an editor-agnostic way to specify configuration.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.