vim
何もロードせずに開きました:
vim -V -u NONE
そして、1行入力しました:
<?xml?>
実行後:
:unlet did_load_filetypes
:filetype on
現在のバッファのファイル タイプを確認します。
:set ft?
印刷しますfiletype=
入力すると
:unlet did_load_filetypes
:filetype detect
その後、:set ft?
印刷されますfiletype=xml
。
vimドキュメントで:
Detail: The ":filetype on" command will load one of these files:
Amiga $VIMRUNTIME/filetype.vim
Mac $VIMRUNTIME:filetype.vim
MS-DOS $VIMRUNTIME\filetype.vim
RiscOS Vim:Filetype
Unix $VIMRUNTIME/filetype.vim
VMS $VIMRUNTIME/filetype.vim
This file is a Vim script that defines autocommands for the
BufNewFile and BufRead events. If the file type is not found by the
name, the file $VIMRUNTIME/scripts.vim is used to detect it from the
contents of the file.
:filetype on
との違いは何:filetype detect
ですか?
ご協力いただきありがとうございます。