New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

platformio core run create a unwanted buffer on vim #1343

Closed
onekk opened this Issue Feb 7, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@onekk

onekk commented Feb 7, 2018

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.

@ivankravets ivankravets added integration ide and removed ide:clion labels Feb 8, 2018

@ivankravets ivankravets added this to the 3.5.4 milestone Jun 14, 2018

@sillyfrog

This comment has been minimized.

sillyfrog commented Jun 15, 2018

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.

ivankravets added a commit that referenced this issue Jun 15, 2018

Merge branch 'hotfix/v3.5.4' into develop
* hotfix/v3.5.4:
  Removed "date&time" when processing project with "platformio run" command // Resolve #1343
  Improve documentation for advanced scripting
@ivankravets

This comment has been minimized.

Member

ivankravets commented Jun 15, 2018

Please re-test with pio upgrade --dev

@sillyfrog

This comment has been minimized.

sillyfrog commented Jun 15, 2018

Confirming that this is now working as expected in VIM.

Thanks for your help!

ivankravets added a commit that referenced this issue Jul 3, 2018

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