sophacles / vim-processing

Create and run processing sketches in Vim. Development repository for vim script 2115.
149 stars 10 forks source link

pde file type conflict #29

Closed sophacles closed 8 years ago

sophacles commented 9 years ago

There have been a few tickets recently - #24 and #27, which have issues resulting from arduino using the .pde file extension as well as processing. @crazymaster has a possible solution in #28.

Newer versions of arduino use the .ino extension instead of .pde - probably because of this.

Unfortunately processing is a dialect of java, and the arduino language is a dialect of C++, meaning we can't usefully just use either. (Not to mention the backend toolchains are completely different).

This ticket is for discussion of the issue. So far some thoughts and ideas have floated around the tickets mentioned above:

Some other thoughts I have:

Anyone with input, please discuss below. I figure we should take a little time to hash this out properly before committing to a course of action to reduce the odds of having to revisit this again and again.

crazymaster commented 9 years ago

Anyway, should we merge #28 ? After that, we'll discuss this issue.

crazymaster commented 9 years ago

ping @sophacles

It is better for those who uses this plugin to override pde default.

crazymaster commented 9 years ago

Versions of the IDE prior to 1.0 saved sketches with the extension .pde. It is possible to open these files with version 1.0, you will be prompted to save the sketch with the .ino extension on save.

'''Beginning with version 1.0, files are saved with a .ino file extension. Previous versions use the .pde extension. You may still open .pde named files in version 1.0 and later, the software will automatically rename the extension to .ino.

http://arduino.cc/en/guide/Environment

Arduino 1.0 released on 2011.11.30

edne commented 9 years ago

ping @sophacles the plugin is broken. Please, merge the @crazymaster pull-request

sophacles commented 9 years ago

28 is merged. I'm still a bit wary of just stepping on the Arduino file toes... But maybe I'm of a rare type that actually uses both Arduino and Processing. Still half-thinking of a better fix.

sophacles commented 8 years ago

Catching up on older things, I'm closing this ticket since my recent adventures in Arduino land are showing no conflicts - I think the @crazymaster fix is the correct behavior

dvzrv commented 8 years ago

Hmm, I'm having the same issues with this plugin: https://github.com/stevearc/vim-arduino/ It continuesly activates arduino, but not processing for .pde files, even if I remove the .pde settings in the vim-arduino ftdetect and ftplugin scripts. Removing the plugin from being loaded resolves the issue... Can anyone reproduce this? oO

crazymaster commented 7 years ago

Hmm, I'm having the same issues with this plugin: https://github.com/stevearc/vim-arduino/ It continuesly activates arduino, but not processing for .pde files, even if I remove the .pde settings in the vim-arduino ftdetect and ftplugin scripts. Removing the plugin from being loaded resolves the issue... Can anyone reproduce this? oO

This patch for stevearc/vim-arduino will solve the issue with that plugin.

diff --git a/ftdetect/arduino.vim b/ftdetect/arduino.vim
index 048c616..deb92f4 100644
--- a/ftdetect/arduino.vim
+++ b/ftdetect/arduino.vim
@@ -1 +1 @@
-au BufRead,BufNewFile *.ino,*.pde setlocal ft=arduino
+au BufRead,BufNewFile *.ino,*.pde setf=arduino

cf. :h :setf