From f909b20c540ea99dddfd04b8439ee35b8dd703b8 Mon Sep 17 00:00:00 2001 From: Akshay Date: Wed, 27 Oct 2021 17:10:42 +0530 Subject: allow stdin input to statix-single, vim plugin --- vim-plugin/plugin/statix.vim | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 vim-plugin/plugin/statix.vim (limited to 'vim-plugin/plugin') diff --git a/vim-plugin/plugin/statix.vim b/vim-plugin/plugin/statix.vim new file mode 100644 index 0000000..736cce2 --- /dev/null +++ b/vim-plugin/plugin/statix.vim @@ -0,0 +1,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() -- cgit v1.2.3