タグ

filetypeに関するU1and0のブックマーク (2)

  • vim の:filetype は ややこしい - まる-おぶ-ざ-でい

    :filetype関連の話題を見かけたので自分的な理解をめもめもしてみます。 おかしな所がありましたら見なかったことにしたり、あるいはご指摘いただけると助かります。 とりあえず困ったときは次のようにすると良いかなーと思っています。 " .vimrc 始めの辺りに書く " 一旦ファイルタイプ関連を無効化する filetype off filetype plugin indent off " いろいろ " .vimrc 最後の辺りに書く " ファイルタイプ関連を有効にする filetype plugin indent on 特に filetype off を書き忘れてしまうと、システムのvimrcやexample_vimrc経由で意図せず :filetype on されていた場合に、ファイルタイプの検出がうまく動作しません。 on/offの書き方が少し違うのでややこしいなあと感じます。 それと

    vim の:filetype は ややこしい - まる-おぶ-ざ-でい
    U1and0
    U1and0 2019/05/26
    :filetype plugin indent on :filetype plugin on と :filetype indent on を行った状態になる。 ファイルタイプの自動検出、ファイルタイプ用の プラグインとインデント設定 を自動読み込みするようになる。
  • if filetype == tex

    I want to run a command in the .vimrc in case a file is a latex file. I think I have something with the syntax, it does not work. Any clue? if &filetype=='tex' set spell endif

    if filetype == tex
    U1and0
    U1and0 2018/06/25
    “autocmd BufNewFile,BufRead *.tex set spell”
  • 1