Skip to content

Set c++-mode in Emacs #21

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

mdjurfeldt
Copy link

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
Copy link
Collaborator

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
Copy link
Owner

sm6yvr commented May 10, 2018

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
Copy link
Author

mdjurfeldt commented May 10, 2018 via email

@thomasloven
Copy link
Collaborator

thomasloven commented May 11, 2018

Using a plugin has several other advantages, such as

  • consistency across all arduino projects
  • The ability to compile from inside emacs
  • Syntax highlighting of arduino-specific keywords, such as Serial, delay etc.

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants