私は VIM を初めて使用し、バンドルを使用してファイルをフォーマット/色付け/インデントすることに取り組んでいます。私は現在、ここから typescript vim 構文「バンドル」をダウンロードしました: https://github.com/leafgarland/typescript-vim.git、問題は、インデントが壊れているように見えることです。自動インデント (gg= G) ファイル:
module Module {
class Foo {
// some string here
bar: string; // bar is incorrectly indented
}
}
実際に私が次のことを期待しているとき:
module Module {
class Foo {
// some string here
bar: string; // bar is correctly indented
}
}
これは typescript.vim ftplugin ファイルです:
compiler typescript
setlocal autoindent
setlocal cindent
setlocal smartindent
setlocal indentexpr&
setlocal commentstring=//\ %s
さまざまなインデント設定をいじってみましたが、役に立ちませんでした。ここから VIM 設定とバンドルを使用しています: https://github.com/gisenberg/.vim、git を使用してローカル マシンでこのファイルを同期します。
ティア!