CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

XEmacs autoindentation

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By hjasak
  • 1 Post By gschaider

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 29, 2005, 12:01
Default Hi! I use XEmacs to edit my
  #1
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi!

I use XEmacs to edit my source-codes. My "problem" is that the indentation-convention (Nr of spaces to indent for a new block etc) of the C++-mode is not the same as that used in the OpenFoam-sources. Therefor editing a OF-Source-file means either not using the Emacs-indentation or "messing" it up.

Of course (it is Emacs we're talking about) these conventions can be customized by setting a bunch of variables.

My question is the following: has anyone already done this and could she pass me these settings.

thanks for listening

PS: Hope I don't start a religious discussion ("Vi versus Emacs" or "XEmacs is not Emacs) here
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   December 29, 2005, 12:39
Default Sure. Please send me an E-mai
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
Sure. Please send me an E-mail and I'll pass you the relevant sections of the .xemacs file. It is not perfect, but it's pretty good.

Hrv
avigrod likes this.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   December 29, 2005, 14:25
Default For those interested: The cust
  #3
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
For those interested: The customizations provided by Hrv can now be found at

http://openfoamwiki.net/index.php/HowTo_xemacsInd entation

(the code is Hrv's, the errors are mine)
avigrod likes this.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   January 27, 2006, 09:25
Default Cool ! I will try it ... I
  #4
Senior Member
 
Francois Beaubert
Join Date: Mar 2009
Location: Lille, France
Posts: 147
Rep Power: 17
francois is on a distinguished road
Cool !
I will try it ...

Is there any vim or jedit gurus that can do the same for vim and/or Jedit
I've found this link on the web:
Ident Finder http://phil.freehackers.org/indent-finder/

Description
------------
Indent Finder is a python script that reads a file and tells you what indentation is used inside the file. The indentation analysis works on any language. It was tested successfully with C, C++, python and Java code.
The current version provides helps for the integration with vim.

Maybe I will be helpfull
francois is offline   Reply With Quote

Old   February 1, 2006, 04:27
Default For the nedit users among us:
  #5
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
For the nedit users among us: set up all files ending in *Dict to be c++ syntax. (in addition to *.C and *.H ofcourse)
mattijs is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 00:57.