Skip to content

Commit 8705181

Browse files
committed
Automatic tags
1 parent b00d8bc commit 8705181

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,6 @@
6161
[submodule "bundle/html-template-syntax"]
6262
path = bundle/html-template-syntax
6363
url = https://github.com/pbrisbin/html-template-syntax.git
64+
[submodule "bundle/Vimchant"]
65+
path = bundle/Vimchant
66+
url = https://github.com/vim-scripts/Vimchant.git

bundle/Vimchant

Submodule Vimchant added at f4db5b5

ftplugin/haskell.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
" try gf on import line, or ctrl-x ctrl-i, or [I, [i, ..
1111
if !exists("autocommands_loaded")
12-
let autocommands_loaded=1
13-
au BufWritePost *.hs :silent !hasktags -c --ignore-close-implementation .
12+
let b:completetags = "hasktags -c --ignore-close-implementation ."
13+
let b:partialtags = "hasktags -c --ignore-close-implementation ."
1414
endif
1515
let s:path = "%"
1616
let s:ipath = ""

vimrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,3 +190,10 @@ endif
190190
" http://vim.wikia.com/wiki/Keep_folds_closed_while_inserting_text
191191
autocmd InsertEnter * if !exists('w:last_fdm') | let w:last_fdm=&foldmethod | setlocal foldmethod=manual | endif
192192
autocmd InsertLeave,WinLeave * if exists('w:last_fdm') | let &l:foldmethod=w:last_fdm | unlet w:last_fdm | endif
193+
194+
" Tags handling
195+
" Provide a default for complete tag writing and partial updating
196+
let b:completetags = "ctags -R ."
197+
let b:partialtags = "ctags --append % tags"
198+
autocmd BufWritePost *.* :execute ":!" . b:partialtags
199+
noremap <F3> :silent :call ":!" . b:completetags

0 commit comments

Comments
 (0)