VHDL editing with UltraEdit

Hello, I decided to test UltraEdit to see how good is it in reformatting a VHDL code and indenting smartly. To do this I installed ultraedit and I did a test by asking UE to reformat this code for me:

process (Rst) begin if clk='1' then

if Rst='1' then system_state

Reply to
mans
Loading thread data ...

I don't know about ultraedit,

but emacs VHDL mode does a wonderful job colorizing and beautifying source code. I use it exclusively... It also has a nice hierarchy browser and lots of other VHDL specific functionality built in.

There are some nice cheat sheets available through a google search that have all the important keyboard shortcuts as well...

Reply to
wallge

Although I haven't tried it myself (since Windows shortcuts are alien to me :)) I've heard about an emacs mode that mimics some common windows shortcuts. A quick google search reveals that

formatting link
seems to host the CUA mode for emacs which allows the use of ctrl-v, ctrl-c ctrl-z, and ctrl-x as expected on windows. (While still allowing C-x style emacs keybindings to function as expected as long as no region is active.)

/Andreas

Reply to
Andreas Ehliar

wallge a écrit :

The problem with emacs is that all its shortcuts are rather alien to most Windows users. I have stopped trying to convince my colleagues to use it.

Nicolas

Reply to
Nicolas Matringe

There is now a "pretty" Windows installer and configurator for Emacs which makes it much more straightforward for traditional windows users to have a go. It sets up lots of the stuff that is unfamiliar to Windowsers to be more familiar, so CUA keys work, F1 for help etc. They'll still feel the slashes are all the wrong way around, but I don't think that'll ever get into Emacs :-)

formatting link

Cheers, Martin

--
martin.j.thompson@trw.com 
TRW Conekt - Consultancy in Engineering, Knowledge and Technology
http://www.conekt.net/electronics.html
Reply to
Martin Thompson

Thanks. I am giving Emacs a try. How can I setup Xilinx ISE to use emacs? Regards

Reply to
mans

Edit -> Preferences

In the window that opens: ISE General -> Editors

Change Editor to Custom and set the command line syntax to something like emacs "$1" where emacs might have to be the full path to your emacs executable. (I think you need to enclose it in quotes if you have installed it in for example C:\Program Files\emacs)

If you find emacs useful you might want to check out emacsclient to see if that is something you might find useful.

/Andreas

Reply to
Andreas Ehliar

Sorry, no idea. I run Emacs as a separate editor. ISE I just use to run the flow (well, actually most of the time I use some batchfiles, but on occasion ISE comes in handy...)

Cheers, Martin

--
martin.j.thompson@trw.com 
TRW Conekt - Consultancy in Engineering, Knowledge and Technology
http://www.conekt.net/electronics.html
Reply to
Martin Thompson

In news: snipped-for-privacy@n76g2000hsh.googlegroups.com timestamped 23 Apr 2007 08:51:08 -0700, wallge posted: "I don't know about ultraedit,

but emacs VHDL mode does a wonderful job colorizing [..]"

To be fair, please do not overrate what modes for Emacs accomplish. Many (maybe all) coloring modes for Emacs have a feature I have not noticed in any other text editing program: perceptible delays in coloring characters. In my experience coloring delays in Emacs tend to be less than a second (even for perceptible delays) (except for coloring HTML which takes more than two seconds for even recoloring this newsgroup post I am composing when I delete or add a quotation mark (I am composing with Emacs but not posting with Gnus, and this post is not in HTML but the file format which Lynx invokes Emacs with is deemed by Emacs to be HTML)), but I have not noticed temporarily incorrect coloring in other software. I have definitely noticed these delays in Emacs on a number of (>> 100MHz) machines on a number of operating systems with little processor utilization by other processes over a number of years and definitely for at least VHDL; Ada; TeX; and HTML. (On one occassion for Ada, Emacs never finished correctly coloring one character even though I provided it with many seconds and ordered it to print the file. I do not believe that I accidentally deactivated the mode before it was finished.)

"I use it exclusively..."

I believe that people who use text editing software tend to be of one of two types of people: people who insist on using the same text editing program pretty much all the time; and people who are happy to use just about any text editing program. I do not exclusively restrict my text editing to one program.

" It also has a nice hierarchy browser and lots of other VHDL specific functionality built in."

Different things suit different people. Sometimes VHDL mode is good for me when editing VHDL code, sometimes it is annoying (to me) (and it is not its fault): as a habit from Ada I sometimes accidentally type .. instead of downto and VHDL mode automatically replaces .. with =>. TeX mode is so much worse that I often turn it off for a TeX file if I want to use a straight quotation mark (") such as for one of the many Babel configurations which use " as an active character, because TeX mode replaces a straight quotation mark with curved quotation marks (`` or '').

"There are some nice cheat sheets available through a google search that have all the important keyboard shortcuts as well..."

As the keyboard shortcuts can be redefined, those cheat sheets must enumerate a lot of shortcuts! :)

Reply to
Colin Paul Gloster

The biggest thing I really like about most modes in (x)emacs is that individual features can be turned off/on to suit. If you don't like a feature (e.g. ".." -> "=>"), just turn it off, but you can still have everything else turned on.

I have not seen the performance problems with fontification that you have seen, at least with vhdl (my primary use for xemacs).

Andy

Reply to
Andy

How fortunate for me that this thread has evolved into a discussion about emacs. I am using Xemacs in Windows with the verilog mode. I want to insert spaces in place of tabs. I put (setq-default indent-tabs-mode nil);

in my custom.el and in verilog.el, but tabs are not being implemented as spaces in my verilog files (but they are implemented as spaces in other files). Any ideas?

--
Joe Samson
Pixel Velocity
Reply to
Joseph Samson

In news:OroYh.16855$ snipped-for-privacy@newssvr27.news.prodigy.net timestamped Fri, 27 Apr 2007 15:14:54 GMT, Joseph Samson posted: "How fortunate for me that this thread has evolved into a discussion about emacs. I am using Xemacs in Windows with the verilog mode. I want to insert spaces in place of tabs. I put (setq-default indent-tabs-mode nil);

in my custom.el and in verilog.el, but tabs are not being implemented as spaces in my verilog files (but they are implemented as spaces in other files). Any ideas?"

I do not know, but it would seem that you could try making the value of verilog-tab-always-indent to be nil ... from

formatting link
:"[..]

How do I prevent tab from automatically indenting? Set the verilog-tab-always-indent variable to nil. [..]

[..]"

If that is not sufficient, you might have an unpleasant time trying to cope with all of the parts of the mode's file related to tabs when choosing what to delete/rewrite.

I agree that indenting with tabs is a bad idea, which is more evidence that Emacs is not configured by default to be a good source code editor.

Regards, C. P. G.

Reply to
Colin Paul Gloster

in my experience, Emacs is configured out of the box to behave as if code indenting is done with tabs, but when it saves out it converts tham all back to spaces, as you would hope.

I can't think of a time when Emacs has failed to do the "right thing" out of the box, when there clearly is a right thing to do... when there's debate about what would be right - that's a different story :-)

Cheers, Martin

--
martin.j.thompson@trw.com 
TRW Conekt - Consultancy in Engineering, Knowledge and Technology
http://www.conekt.net/electronics.html
Reply to
Martin Thompson

I don't know if it helps, but the debate is summarised here:

formatting link

And at the bottom, there's some configuration stuff...

Cheers, Martin

--
martin.j.thompson@trw.com 
TRW Conekt - Consultancy in Engineering, Knowledge and Technology
http://www.conekt.net/electronics.html
Reply to
Martin Thompson

I'm not sure about UltraEdit but I do know the Zeus IDE can be configured to do a limited amount of VHDL auto-indenting.

formatting link

With a VHDL file opened in Zeus, if you use the Options, Templates Options menu and add these to string to the template dialog:

Brace Prefix String: begin;then Brace Postfix String: end;end if

Then assuming the | character represents the cursor, if you have this code:

begin|

hitting the enter key makes will result in this code:

begin | end

or if you had this code:

if Rst = '1' then|

hitting the enter key makes will result in this code:

if Rst = '1' then | end if

Also FWIW the next version of Zeus will also do VHDL code folding.

Jussi Jumppanen Author: Zeus for Windows IDE

Reply to
JussiJ

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.