Created
February 29, 2024 11:07
-
-
Save grepsuzette/66f5cfaccc1a919c67f52bd7b31a3b09 to your computer and use it in GitHub Desktop.
Revisions
-
grepsuzette created this gist
Feb 29, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ command! -nargs=0 GnoFileTest call GnoFileTest() " place yourself in a xxxxx_filetest.gno " type `:GnoFileTest`. " It will " - get rid of the previous lines following 'Error: ', " - run `gno test .` for you " - refresh the filetest automatically " (so you see the errors, or absence of it " without opening a terminal). " function! GnoFileTest() if !expand('%:t') =~ '_filetest.gno$' echo "Error: File does not end with _filetest.gno" else call cursor(1, 1) let lnum = search('Error:', 'ne', line('$')) if lnum == 0 echo "Not found in the file: 'Error: '." else setlocal autoread silent execute lnum+1 . ',$delete' write silent !gno test . redraw! endif endif endfunction