When writing code/VHDL (I'm a hardware designer) it's imortant to make things neat and readable. Part of this can involve vertically aligning lists, or series of assignments.
An example....
port map(
wraddress => ram_wr_address,
data=> ram_din,
wren=> ram_1_wren,
wrclock=> clk,
wrclken=> enabled,
rdaddress => ram_rd_address,
rdclock=> clk,
rden=> enabled,
rdclken=> enabled,
q=> ram_1_dout
);
isn't nearly as easy to scan as
port map(
wraddress.....=> ram_wr_address,
data..............=> ram_din,
wren.............=> ram_1_wren,
wrclock.........=> clk,
wrclken.........=> enabled,
rdaddress.....=> ram_rd_address,
rdclock..........=> clk,
rden.............=> enabled,
rdclken.........=> enabled,
q..................=> ram_1_dout
);
(I've had to put in '.'s so the spaces aren't cut out, and this is badly aligned but I hope you get the jist)
...and these are two very short examples, with much longer lists it can take ages getting things tidy.
Prism (that I mentioned below) has an 'alignment' feature where you can select a block of text and what's being aligned ( => in the example above) and it simply right justify aligns all the examples to the one farthest to the right. The ability to select what's used for the alignment allows this function to be used in all sorts of situations.
This shouldn't be hard to implement, but can save a _lot_ of time.
Go on, you know you want it....
Flexible 'alignment' function
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
- Posts: 10
- Joined: Thu May 08, 2003 6:56 pm
As a kind of work around, I use a combination of Replace, Block Edit Mode, and Shift Tab.
Highlight the block, S&R the text that you want moved (in your case, S&R '=>' to '........=>' (... = lots of spaces)
Switch to Block edit mode (ctrl-shift-f8)
Highlight where you want your first => down to the last line (make it acouple of chars wide)
Shift Tab, will highlight all the lines to EOL, and move them to the begining of where you highlighted.
Remember to turn of Block Edit
It's kind of hard to explane, but it does work.
Highlight the block, S&R the text that you want moved (in your case, S&R '=>' to '........=>' (... = lots of spaces)
Switch to Block edit mode (ctrl-shift-f8)
Highlight where you want your first => down to the last line (make it acouple of chars wide)
Shift Tab, will highlight all the lines to EOL, and move them to the begining of where you highlighted.
Remember to turn of Block Edit
It's kind of hard to explane, but it does work.
> It's kind of hard to explane, but it does work.
Hmm, it doesn't sound very convenient if you've a fair bit
of tidying to do.
There's a demonstration of the Prism feature here...
http://www.iol.ie/~dmurray/Prism/Columnize.html
Much easier to use.
Nial.
Hmm, it doesn't sound very convenient if you've a fair bit
of tidying to do.
There's a demonstration of the Prism feature here...
http://www.iol.ie/~dmurray/Prism/Columnize.html
Much easier to use.
Nial.
-
- Posts: 5
- Joined: Wed Jun 04, 2003 2:39 pm