Skip to content

add toggle to disable compiler #183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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