Skip to content

platformio core run create a unwanted buffer on vim #1343

Closed

Description

@onekk

Configuration

Linux Debian Stretch:

PlatformIO, version 3.5.1

VIM 8.0

Description of problem

Platformio run with the command:

platformio -f -c vim run

create an unwanted buffer after the run with filename
[Wed Feb 7 19

That is the first part of the line

[Wed Feb 7 19:08:57 2018] Processing

The quickfix system of VIM maybe interpreter the 19:08:57 as a part of an error line.

Activity

  1. added this to the 3.5.4 milestone on Jun 14, 2018
  2. sillyfrog commented on Jun 15, 2018

    @sillyfrog

    As per my post here: https://community.platformio.org/t/running-make-in-vim-replaces-the-open-file/4363/2 I'm having the same issue.

    Having a quick look at the code, applying this patch sorted it:

    --- /tmp/run.py	2018-06-15 13:32:12.000000000 +1000
    +++ run.py	2018-06-15 13:35:21.000000000 +1000
    @@ -198,7 +198,7 @@
    
             if not self.silent:
                 click.echo("[%s] Processing %s (%s)" %
    -                       (datetime.now().strftime("%c"),
    +                       (datetime.now().strftime("%c").replace(":", "-"),
                             click.style(self.name, fg="cyan", bold=True),
                             "; ".join(env_dump)))
                 click.secho("-" * terminal_width, bold=True)
    

    I had a bit of a look to see if I could extract the caller attribute, but only had a few minutes and couldn't figure out the best (any) way to get it with out a lot of code changes (in my quick look). If it's possible to get the caller from the cmd_ctx or similar, I'm happy to do up a PR for this.

    Cheers.

  3. added a commit that references this issue on Jun 15, 2018
    389783a
  4. added a commit that references this issue on Jun 15, 2018
    6f905e3
  5. ivankravets commented on Jun 15, 2018

    @ivankravets
    Member

    Please re-test with pio upgrade --dev

  6. sillyfrog commented on Jun 15, 2018

    @sillyfrog

    Confirming that this is now working as expected in VIM.

    Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions