File: .vim.custom

package info (click to toggle)
haskell-void 0.7.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 100 kB
  • sloc: haskell: 117; makefile: 2
file content (31 lines) | stat: -rwxr-xr-x 767 bytes parent folder | download | duplicates (104)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
" Add the following to your .vimrc to automatically load this on startup

" if filereadable(".vim.custom")
"     so .vim.custom
" endif

function StripTrailingWhitespace()
  let myline=line(".")
  let mycolumn = col(".")
  silent %s/  *$//
  call cursor(myline, mycolumn)
endfunction

" enable syntax highlighting
syntax on

" search for the tags file anywhere between here and /
set tags=TAGS;/

" highlight tabs and trailing spaces
set listchars=tab:‗‗,trail:‗
set list

" f2 runs hasktags
map <F2> :exec ":!hasktags -x -c --ignore src"<CR><CR>

" strip trailing whitespace before saving
" au BufWritePre *.hs,*.markdown silent! cal StripTrailingWhitespace()

" rebuild hasktags after saving
au BufWritePost *.hs silent! :exec ":!hasktags -x -c --ignore src"