Mercurial > vim
view runtime/tools/mve.awk @ 18607:fbeb1bf0cea8 v8.1.2297
patch 8.1.2297: the ex_vimgrep() function is too long
Commit: https://github.com/vim/vim/commit/d6a98a3a9768568b668f91a53267b36f86b84466
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Nov 12 22:59:51 2019 +0100
patch 8.1.2297: the ex_vimgrep() function is too long
Problem: The ex_vimgrep() function is too long.
Solution: Split it in three parts. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5211)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 12 Nov 2019 23:00:04 +0100 |
parents | 3fc0f57ecb91 |
children |
line wrap: on
line source
#!/usr/bin/nawk -f # # Change "nawk" to "awk" or "gawk" if you get errors. # # Make Vim Errors # Processes errors from cc for use by Vim's quick fix tools # specifically it translates the ---------^ notation to a # column number # BEGIN { FS="[:,]" } /^cfe/ { file=$3 msg=$5 split($4,s," ") line=s[2] } # You may have to substitute a tab character for the \t here: /^[\t-]*\^/ { p=match($0, ".*\\^" ) col=RLENGTH-2 printf("%s, line %d, col %d : %s\n", file,line,col,msg) }