leafgarland / typescript-vim

Typescript syntax files for Vim
1.9k stars 144 forks source link

Syntax does not work #65

Closed tanrax closed 8 years ago

tanrax commented 8 years ago

screen shot 2015-10-19 at 02 26 32 My vimrc:

set nocompatible            
filetype off               
filetype plugin indent on
syntax on
set so=15
set spelllang=es
set number
set hlsearch
set nobomb
set ignorecase
set smartcase
set autoindent
set laststatus=2
set ar 
set background=dark
colorscheme base16-default
imap `\ <Esc>
set tabstop=4     
set shiftwidth=4
set noexpandtab   
"Clear last search highlighting
map <Space> :noh<cr>
" Quita el scroll en MacVim
set guioptions-=L
set guioptions-=r
set guioptions-=T
"Session-vim
let g:session_autosave = 'yes'
let g:session_autoload = 'yes'
let g:session_lock_directory = '/var/lock'
"NerdTree
map <C-n> :NERDTreeToggle<CR>
set autochdir
let NERDTreeChDirMode=2
let NERDTreeIgnore = ['\.pyc$', '\.swp$']
let NERDTreeShowHidden=1
"Tagbar
nmap <C-m> :TagbarToggle<CR>
let g:tagbar_ctags_bin = '/usr/local/Cellar/ctags/5.8_1/bin/ctags'
"Multicursor
let g:multi_cursor_next_key='<C-j>'
nmap  :setlocal spell spelllang=es_es<cr>
"Autocompletado
let g:neocomplcache_enable_at_startup = 1
"jsBeatify
map <c-f> :call JsBeautify()<cr>
autocmd FileType javascript noremap <buffer>  <c-f> :call JsBeautify()<cr>
autocmd FileType html noremap <buffer> <c-f> :call HtmlBeautify()<cr>
autocmd FileType css noremap <buffer> <c-f> :call CSSBeautify()<cr>
"EasyMotion
let g:EasyMotion_do_mapping = 0 
nmap s <Plug>(easymotion-s)
"CtrlP auto cache clearing.
let g:ctrlp_custom_ignore = 'node_modules\|DS_Store\|git'
function! SetupCtrlP()
  if exists("g:loaded_ctrlp") && g:loaded_ctrlp
      augroup CtrlPExtension
      autocmd!
      autocmd FocusGained  * CtrlPClearCache
      autocmd BufWritePost * CtrlPClearCache
      augroup END
  endif
endfunction
if has("autocmd")
  autocmd VimEnter * :call SetupCtrlP()
endif")"
"Yank Ring
map <C-g> :YRShow<CR>
let g:yankring_replace_n_pkey = '<C-e>'
let g:yankring_replace_n_nkey = '<C-h>'
let g:yankring_history_dir = '/Users/androsfenollosa/Documents'
"PHP
 function! PhpSyntaxOverride()
   hi! def link phpDocTags  phpDefine
     hi! def link phpDocParam phpType
     endfunction

     augroup phpSyntaxOverride
       autocmd!
         autocmd FileType php call PhpSyntaxOverride()
         augroup END
"Compilar Python -  Ctrl+l run
autocmd BufRead *.py set makeprg=python\ -c\ \"import\ py_compile,sys;\ sys.stderr=sys.stdout;\ py_compile.compile(r'%')\"
autocmd BufRead *.py set efm=%C\ %.%#,%A\ \ File\ \"%f\"\\,\ line\ %l%.%#,%Z%[%^\ ]%\\@=%m
autocmd BufRead *.py nmap <C-l> :w !python %<CR>
" Incsearch
map /  <Plug>(incsearch-forward)
map ?  <Plug>(incsearch-backward)
map g/ <Plug>(incsearch-stay)
" Typescript
let g:typescript_indent_disable = 1

"Vundle manage
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

Plugin 'gmarik/Vundle.vim'
Plugin 'tpope/vim-surround'
Plugin 'tpope/vim-fugitive'
Plugin 'scrooloose/nerdtree'
Plugin 'kien/ctrlp.vim'
Plugin 'scrooloose/nerdcommenter'
Plugin 'tomasr/molokai'
Plugin 'MarcWeber/vim-addon-mw-utils'
Plugin 'tomtom/tlib_vim'
Plugin 'garbas/vim-snipmate'
Plugin 'mattn/emmet-vim'
Plugin 'honza/vim-snippets'
Plugin 'othree/html5.vim'
Plugin 'pangloss/vim-javascript'
Plugin 'Lokaltog/vim-easymotion'
Plugin 'godlygeek/tabular'
Plugin 'kien/rainbow_parentheses.vim'
Plugin 'xolox/vim-session'
Plugin 'gorodinskiy/vim-coloresque'
Plugin 'bling/vim-airline'
Plugin 'terryma/vim-multiple-cursors'
Plugin 'nono/jquery.vim'
Plugin 'xolox/vim-misc'
Plugin 'maksimr/vim-jsbeautify'
Plugin 'rizzatti/dash.vim'
Plugin 'jiangmiao/auto-pairs'
Plugin 'YankRing.vim'
Plugin 'tpope/vim-repeat'
Plugin 'StanAngeloff/php.vim'
Plugin 'shawncplus/phpcomplete.vim'
Plugin 'xsbeats/vim-blade'
Plugin 'rking/ag.vim'
Plugin 'gregsexton/MatchTag'
Plugin 'davidhalter/jedi-vim'
Plugin 'junegunn/goyo.vim'
Plugin 'haya14busa/incsearch.vim'
Plugin 'Shougo/neocomplcache.vim'
Plugin 'vitalk/vim-simple-todo'
Plugin 'chriskempson/base16-vim'
Plugin 'majutsushi/tagbar'
Plugin 'leafgarland/typescript-vim'

call vundle#end()            
filetype plugin indent on   
" :PluginList       - lists configured plugins
" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
leafgarland commented 8 years ago

Hello, usually the syntax does work but I guess there is an issue somewhere in your .vimrc. Perhaps you could try to trim it down a bit and we can help spot it but right now there is too much there for me to check.

Your screenshot shows that vim has not identified your test.ts file as the typescript filetype. This is usually done by this autocmd. But as it has not been, then perhaps the vim-typescript plugin is not installed properly?

leafgarland commented 8 years ago

I'll close this for now, we can re-open it if you can help narrow down the issue.