I use emacs for c++ coding and in my project there are many people who use gvim for the same. My problem is when I open their .h or .cc files in emacs it's formatting became really bad, Its probably because of tab setting or something like that.
What I want is what should I put in my .emacs file such that it would format the code in nice usual way when I see it in emacs but does not disrupt it for my Vim friends.
Is it even possible or do I need to tell Vim guys to change something in their profiles too. We might try to enforce some regularity and may enforce reasonable profile features.
Thanks
|
| |||
feedback
|
|
If it is a matter of tabs you need to set tab-width variable in Options > Customize emacs menu, you'll be given the option to make that change permanent. | |||
|
feedback
|
|
To really solve your problem you need to decide whether to use tabs or spaces in your project. You should also decide how wide one tab character should appear. There is an excellent VimCast regarding that topic. | |||
|
feedback
|
|
Some Emacs hacker once wrote:
In my vim configuration I | |||
|
feedback
|
|
Most code editors have separate concepts of tab width and code indent width. The project needs to agree on the indent size, and either: That TAB has the same size in all editors (usually 8 spaces, which was the mechanical implementation of TAB on teletypes and other mechanical terminals); or that indentation is never to include TABS, but only spaces. | |||
|
feedback
|