sm6yvr / liam

DIY Robot lawn mover
GNU General Public License v3.0
52 stars 22 forks source link

Set c++-mode in Emacs #21

Open mdjurfeldt opened 7 years ago

mdjurfeldt commented 7 years ago

The commonly used editor Emacs has editing modes for different programming languages. It usually determines the programming mode based on file extension, but .ino is not recognized by default. By adding the following comment at the end of the file (where it doesn't disturb anyone), C++ mode will be automatically set.

thomasloven commented 6 years ago

The right way to fix this issue is to configure emacs to recognize ALL .ino files as c++. There's probably even an arduino specific plugin or something.

sm6yvr commented 6 years ago

As tomasloven said, is it possible to set that in emacs instead of having it in the code? I think I will close this PR..

mdjurfeldt commented 6 years ago

Well, the advantage of having this innocuous comment in the file is that it will immediately work for any unconfigured emacs.

Den fre 11 maj 2018 00:26sm6yvr notifications@github.com skrev:

As tomasloven said, is it possible to set that in emacs instead of having it in the code? I think I will close this PR..

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sm6yvr/liam/pull/21#issuecomment-388204666, or mute the thread https://github.com/notifications/unsubscribe-auth/ADcfCTL3tCiTX2KH1xNptsIbYZixfsllks5txL6agaJpZM4PDwe6 .

thomasloven commented 6 years ago

Using a plugin has several other advantages, such as

... you know, the kind of thing vim does by default... :stuck_out_tongue_winking_eye:

That's not an argument against the idea, just food for thought.