Update .vimrc

80879f91e22c88b0627b6f1252bbf0e5d4fe0d88
Alexis Sellier committed ago 1 parent 7ab417bb
.vimrc +5 -14
95 95
    write
96 96
  endif
97 97
endfunction
98 98
99 99
" Per file-type indentation
100 -
au FileType haskell     setlocal sts=4 sw=4 expandtab
100 +
au FileType haskell     setlocal sts=4 sw=4 expandtab formatprg=stylish-haskell
101 101
au FileType javascript  setlocal sts=4 sw=4 expandtab
102 102
au FileType css         setlocal ts=4  sw=4 noexpandtab
103 103
au FileType go          setlocal ts=4  sw=4 noexpandtab
104 104
au FileType c,cpp       setlocal       sw=4 noexpandtab
105 105
au FileType lua         setlocal       sw=2 expandtab
113 113
114 114
au BufRead,BufNewFile *.txt       setf markdown
115 115
au BufRead,BufNewFile *.md        setf markdown
116 116
au BufRead,BufNewFile *.tex       setf tex
117 117
au BufRead,BufNewFile *.todo      setf todo
118 +
au BufRead,BufNewFile *.tikz      setf tex
118 119
119 120
" Remove trailing whitespace on save
120 121
autocmd BufWritePre * call s:StripTrailing()
121 122
function! s:StripTrailing()
122 123
    let l = line(".")
252 253
  profile stop
253 254
  tabnew profile
254 255
endfunction
255 256
256 257
" Get highlight group under cursor
257 -
command! Hi call s:ToggleHi()
258 -
function! s:ToggleHi()
259 -
  if exists('g:show_hi')
260 -
    unlet g:show_hi
261 -
  else
262 -
    let g:show_hi = 1
263 -
  endif
264 -
endfunction
265 -
function! Hi()
266 -
  if exists('g:show_hi')
267 -
    return synIDattr(synID(line("."), col("."), 1), "name")
268 -
  endif
269 -
  return ''
258 +
command! Syn call s:Syn()
259 +
function! s:Syn()
260 +
  echo synIDattr(synID(line("."), col("."), 1), "name")
270 261
endfunction
271 262
272 263
if has("nvim")
273 264
  call plug#begin()
274 265