comparison runtime/doc/options.txt @ 25696:64fa341cc33b v8.2.3384

patch 8.2.3384: cannot disable modeline for an individual file Commit: https://github.com/vim/vim/commit/9dcd349ca85e1df1abd1cbf1c29c0f1574b70bf8 Author: Hu Jialun <hujialun@comp.nus.edu.sg> Date: Sat Aug 28 20:42:50 2021 +0200 patch 8.2.3384: cannot disable modeline for an individual file Problem: Cannot disable modeline for an individual file. Solution: Recognize "nomodeline" in a modeline. (Hu Jialun, closes https://github.com/vim/vim/issues/8798)
author Bram Moolenaar <Bram@vim.org>
date Sat, 28 Aug 2021 20:45:03 +0200
parents c26ff3203b43
children d4faa2c5211b
comparison
equal deleted inserted replaced
25695:dad034c30ec1 25696:64fa341cc33b
538 The white space before {vi:|vim:|Vim:|ex:} is required. This minimizes the 538 The white space before {vi:|vim:|Vim:|ex:} is required. This minimizes the
539 chance that a normal word like "lex:" is caught. There is one exception: 539 chance that a normal word like "lex:" is caught. There is one exception:
540 "vi:" and "vim:" can also be at the start of the line (for compatibility with 540 "vi:" and "vim:" can also be at the start of the line (for compatibility with
541 version 3.0). Using "ex:" at the start of the line will be ignored (this 541 version 3.0). Using "ex:" at the start of the line will be ignored (this
542 could be short for "example:"). 542 could be short for "example:").
543
544 If the modeline is disabled within a modeline, subsequent modelines will be
545 ignored. This is to allow turning off modeline on a per-file basis. This is
546 useful when a line looks like a modeline but isn't. For example, it would be
547 good to start a YAML file containing strings like "vim:" with
548 # vim: nomodeline ~
549 so as to avoid modeline misdetection. Following options on the same line
550 after modeline deactivation, if any, are still evaluated (but you would
551 normally not have any).
543 552
544 *modeline-local* 553 *modeline-local*
545 The options are set like with ":setlocal": The new value only applies to the 554 The options are set like with ":setlocal": The new value only applies to the
546 buffer and window that contain the file. Although it's possible to set global 555 buffer and window that contain the file. Although it's possible to set global
547 options from a modeline, this is unusual. If you have two windows open and 556 options from a modeline, this is unusual. If you have two windows open and