From d9dd83e327c65f1f795f67b2f934f83a9ded0294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Antonio=20de=20la=20Torre?= Date: Fri, 12 Oct 2018 21:41:13 +0200 Subject: [PATCH] Solved issues with vim whitespaces in paths (#1873) When a library has whitespaces in the name the path will contain whitespace too. When vim tries to decode path it will fail. This fix wrap each path with quotes. --- platformio/ide/tpls/vim/.clang_complete.tpl | 4 ++-- platformio/ide/tpls/vim/.gcc-flags.json.tpl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/platformio/ide/tpls/vim/.clang_complete.tpl b/platformio/ide/tpls/vim/.clang_complete.tpl index bc09ec0d..c00763c8 100644 --- a/platformio/ide/tpls/vim/.clang_complete.tpl +++ b/platformio/ide/tpls/vim/.clang_complete.tpl @@ -1,6 +1,6 @@ % for include in includes: --I{{include}} +-I"{{include}}" % end % for define in defines: -D{{!define}} -% end \ No newline at end of file +% end diff --git a/platformio/ide/tpls/vim/.gcc-flags.json.tpl b/platformio/ide/tpls/vim/.gcc-flags.json.tpl index 5af2ea3a..07acafd0 100644 --- a/platformio/ide/tpls/vim/.gcc-flags.json.tpl +++ b/platformio/ide/tpls/vim/.gcc-flags.json.tpl @@ -3,6 +3,6 @@ "gccDefaultCFlags": "-fsyntax-only {{! cc_flags.replace(' -MMD ', ' ').replace('"', '\\"') }}", "gccDefaultCppFlags": "-fsyntax-only {{! cxx_flags.replace(' -MMD ', ' ').replace('"', '\\"') }}", "gccErrorLimit": 15, - "gccIncludePaths": "{{ ','.join(includes).replace("\\", "/") }}", + "gccIncludePaths": "{{! ','.join("'{}'".format(w.replace("\\", '/')) for w in includes)}}", "gccSuppressWarnings": false }