vile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vile] help with macro


From: Matthew White
Subject: Re: [vile] help with macro
Date: Mon, 18 Aug 2014 18:18:58 -0700

Thank you both for your help!  I got this working:

store-procedure goformat
  ~local %gobuf
  setv %gobuf $cbufname
  setv %gofile $cfilname
  setv %errbuf "[gofmt errors]"

  ; If we have an existing error buffer, delete it.
  ~force buffer %errbuf
  ~if $status
    unmark-buffer %errbuf
    ~force delete-buffer %errbuf
  ~endif

  ~hidden edit-file &cat "!gofmt " &cat %gofile " 1> /dev/null"
  rename-buffer %errbuf
  ~if &gt $blines 0
    set error-buffer %errbuf
    buffer %gobuf
    LoadErrors 
  ~else
    ~force unmark-buffer %errbuf
    ~force delete-buffer %errbuf
  ~endif
~endm

LoadErrors is a local version of LoadErrorExprs that looks in ~/.vile/vile-errs for error expressions.


On Mon, Aug 18, 2014 at 5:27 PM, Brendan O'Dea <address@hidden> wrote:
On 19 August 2014 03:38, Matthew White <address@hidden> wrote:
> OK so I'm trying to get fancy.
>
> I've found the LoadErrorExprs macro to load the following _expression_ into
> '[Error Expresions]'

The go error messages are pretty standard:

  file:line:col: message

so I'd be surprised if the standard expressions didn't work.  You will
however need to change <standard input> to the correct filename so
that find-next-error knows which buffer to look at.

--bod


reply via email to

[Prev in Thread] Current Thread [Next in Thread]