aboutsummaryrefslogtreecommitdiff
path: root/vim-plugin/plugin/statix.vim
blob: 736cce2c149719f51b101c940f93be9bcf6d8535 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function! ApplyStatixSuggestion()
    let l:l = line('.')
    let l:c = col('.')
    let l:filter = "%!statix single -p " . l . "," . c . ""
    execute l:filter

    silent if v:shell_error == 1
        undo
    endif

    call cursor(l, c)
endfunction

nnoremap gf :call ApplyStatixSuggestion()<cr>