Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,5 +132,7 @@ Syntax highlighting for TypeScript can be customized by following variables.
highlighted.
- `g:typescript_ignore_browserwords`: When this variable is set to `1`, browser API names such as
`window` or `document` will not be highlighted. (default to `0`)
- `g:typescript_disable_compiler`: When this variable is set to `1`, the compiler will not be modified
(default to `0`)

![Obligatory screenshot](https://raw.github.com/leafgarland/typescript-vim/master/vimshot01.png)
4 changes: 3 additions & 1 deletion ftplugin/typescript.vim
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo-=C

compiler typescript
if !get(g:, 'typescript_disable_compiler', 0)
compiler typescript
endif
setlocal commentstring=//\ %s

" Set 'formatoptions' to break comment lines but not other lines,
Expand Down