2

I am using AnsiEsc to look at colorized terminal printout, the printout contains bold face filenames (e.g. from gcc). This typically looks like

^[[01m^[[Kmyfile.cpp:32:21:^[[m^[[K

AnsiEsc handles that nicely in the version from here (the version from vim.org has trouble with colorless bold face and with ^[[K). However, when I want to navigate to a file with gF, instead of opening myfile.cpp, vim attempts to open Kmyfile.cpp. It appears to me that isfname captures the K that belongs to the escape sequence ^[[K as part of the filename. Is there a way to exclude escape sequences (it seems like only ^[[K is relevant to me at the moment) from isfname?

(I am aware that makeprg and errorformat exist. Please assume I can't use these for whatever reasons—say, the build runs on some CI server and I just get the terminal printout via email)

2
  • 2
    You can actually still use the quickfix list. See :help -q
    – D. Ben Knoble
    May 4 '20 at 13:18
  • 2
    Thanks for the pointer. I guess I'll do that for now. I'd still like to keep the question for isfname as is out of pure interest. (or in case I'll ever come across something that I won't easily fit into errorformat …)
    – pseyfert
    May 4 '20 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.