Skip to content

vim Settings in the File You’re Editing

Vim scans the first and last few lines of the file for modelines, if the modeline option is on (which it is, by default). If it finds any it will apply those settings as if you had typed them in manually using :set in command mode.

#!/bin/sh
# vim:ts=2:sw=2:expandtab

Übergibson: Embedding vim Settings in the File You’re Editing.

Leave a Reply

Your email address will not be published. Required fields are marked *

1 × three =