[20191130]vim modeline.txt
[20191130]vim modeline.txt
--//今天編輯檔案,發現每次開啟老是報錯,提示類似如下:
處理 modelines 時發生錯誤:
第 3 行:
E518: 未知的選項: this
$ cat a.txt
for ex: this is a test
--//輸入:help modeline,看到如下:
There are two forms of modelines. The first form:
[text]{white}{vi:|vim:|ex:}[white]{options}
[text] any text or empty
{white} at least one blank character (<Space> or <Tab>)
{vi:|vim:|ex:} the string "vi:", "vim:" or "ex:"
[white] optional white space
{options} a list of option settings, separated with white space or ':',
where each part between ':' is the argument for a ":set"
command (can be empty)
Example:
vi:noai:sw=3 ts=6 ~
The second form (this is compatible with some versions of Vi):
[text]{white}{vi:|vim:|ex:}[white]se[t] {options}:[text]
[text] any text or empty
{white} at least one blank character (<Space> or <Tab>)
{vi:|vim:|ex:} the string "vi:", "vim:" or "ex:"
[white] optional white space
se[t] the string "set " or "se " (note the space)
{options} a list of options, separated with white space, which is the
argument for a ":set" command
: a colon
[text] any text or empty
Example:
/* vim: set ai tw=75: */
The white space before {vi:|vim:|ex:} is required. This minimizes the chance
that a normal word like "lex:" is caught. There is one exception: "vi:" and
"vim:" can also be at the start of the line (for compatibility with version
3.0). Using "ex:" at the start of the line will be ignored (this could be
short for "example:").
--//原來這種模式控制檔案的顯示模式以及設定,做一個記錄.一般在開頭以及結尾的5行.
--//一些開發會使用一些特殊的定義.
--//假設定義如下,開啟檔案就會在列10,20,40出現彩色的豎線
/* vim: set colorcolumn=10,20,40: */
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2666408/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 在Vim裡精通Vim
- vim
- №20191130簡易操作1~7(今期:上=下=0)
- vim命令
- vim操作
- 【vim】vim 常用命令之工作速查
- VIM 進階 —— 《VIM 8 文字處理實戰》
- VIM 命令大全
- Vim命令合集
- vim常用操作
- 編譯VIM編譯
- VIM操作技巧
- vim配置思路
- vim學習
- Vim 命令合集
- vim筆記筆記
- vi(vim)命令
- 常用vim命令
- vim設定
- Mac 配置 vimMac
- VIM退出命令
- VIM文字操作
- Vim反模式模式
- vim初學
- vim搜尋
- 如何安裝最新的Vim8.2與Vim外掛管理器vim-plug
- Vim-plug:極簡 Vim 外掛管理器
- linux環境vim升級到vim74Linux
- Vim 實用技術,第 3 部分: 定製 Vim
- Vim游標移動命令彙總-Vim入門教程
- linux--vimLinux
- VIM 常用插入命令
- Vim 外掛管理
- VIM 命令總結
- centeros如何退出vim?ROS
- 【vim】常用總結
- Vim 配置入門
- vim 填坑之路