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