Skip to content

Commit f15a691

Browse files
author
Gaspar Chilingarov
committed
WIP, squash later this commit
1 parent 4dd38e4 commit f15a691

2 files changed

Lines changed: 19 additions & 3 deletions

File tree

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,16 @@ Aim of the project is to give reasonable preset of defaults for elixir-based dev
77
avoid laborous tuning of plugins/themes.
88

99

10+
## Source browsing
1011

12+
Tagbar most of the time shows correct arity on functions and does not report multiple function clauses.
13+
GenServer callbacks moved to separate group.
14+
15+
## Shortcuts
16+
17+
`F4` for opening Tagbar.
18+
`Ctrl-@` to use Ctrl-P search on function names and quick jump on them
19+
`<Leader>l` to fuzzy search text in file
1120

1221

1322
## how to update submodules

plugin/vim-ide-elixir.vim

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,13 @@ function! Tag_transform(tags)
2828

2929
function! Arity_extract(idx, tag)
3030
if a:tag.fields.kind == 'f' || a:tag.fields.kind == 'g'
31-
let args_string = substitute(a:tag.pattern, "^.*".a:tag.name."[ \t]*", "", "")
32-
let args_string = substitute(args_string, "do[ \t]*\\\\[$]$", "", "")
31+
let args_string = substitute(a:tag.pattern, "^.*defp\\?[ \t]*".a:tag.name."[ \t]*", "", "")
32+
let args_string = substitute(args_string, "do[ \t]*\\\\[$]$", "", "") " multiline
33+
" TODO: remove
34+
" if a:tag.pattern =~ "defp reply"
35+
" debug echo("asd")
36+
" endif
37+
let args_string = substitute(args_string, ")\\([ \t]*when.*\\)\\?,[ \t]*do.*\\\\[$]$", ")", "")
3338
let args_string = substitute(args_string, "[ \t]*", "", "g")
3439

3540
let args_len = len(args_string)
@@ -43,7 +48,6 @@ function! Tag_transform(tags)
4348
let args_string = substitute(args_string, "\\[[^]]*\\]", "", "g")
4449
let old_args_len = args_len
4550
let args_len = len(args_string)
46-
echo(args_string)
4751
endwhile
4852

4953
let comma_count = len(substitute(args_string, "[^,]", "", "g"))
@@ -110,4 +114,7 @@ set updatetime=500
110114

111115
" keyboard shortcuts
112116
nmap <F4> :TagbarToggle<CR>
117+
nmap <C-@> :CtrlPTagbar<CR>
118+
nmap <Leader>l :CtrlPLine<CR>
119+
113120

0 commit comments

Comments
 (0)