Sign in

username:

password:



Not a member?

Search Comp.Arch.FPGA



Search tips

fpga by Keywords

Altera | ASIC | CPLD | Cyclone | DCM | DDR | DSP | Ethernet | ISE | JTAG | Linux | LVDS | Microblaze | ML310 | Modelsim | NIOS | OPB | PCI | Quartus | RocketIO | SDRAM | Spartan | Spartan3 | SRAM | Stratix | Verilog | VHDL | Virtex | Virtex-4 | Virtex-II | Xilinx | XST

Ads

See Also

DSPEmbedded SystemsElectronics

Comp.Arch.FPGA | VHDL comments in Vim?

There are 5 messages in this thread.

You are currently looking at messages 0 to 5.

VHDL comments in Vim? - Peter Sommerfeld - 2003-12-17 23:16:00

Hi folks,

I'm getting tired of commenting large blocks of VHDL code by hand.

Anyone know of any Vim scripts that can comment/un-comment a VHDL
block?

A cursory Google search brings up either nothing or way too much stuff
to sift through depending on my search terms ("vhdl vim comment").

-- Pete



Re: VHDL comments in Vim? - Allan Herriman - 2003-12-18 01:13:00

On 17 Dec 2003 20:16:14 -0800,
p...@hotmail.com (Peter
Sommerfeld) wrote:

>Hi folks,
>
>I'm getting tired of commenting large blocks of VHDL code by hand.
>
>Anyone know of any Vim scripts that can comment/un-comment a VHDL
>block?
>
>A cursory Google search brings up either nothing or way too much stuff
>to sift through depending on my search terms ("vhdl vim comment").

From Hamish Moffatt:

"Commenting lines. Visual select the block required and type ,c
vmap ,c :s/^/--/
vmap ,d :s/^--//

Here's the Verilog equivalent:

"Commenting lines. Visual select the block required and type ,c
vmap ,c :s/^/\/\//
vmap ,d :s/^\/\///

Hmmm.  These lines had an escape after the last character, but that
won't appear in this post.  You could probably substitute '<CR>'
(without the quotes) instead.
Add the lines to the appropriate file type plugin file.

Regards,
Allan.

Re: VHDL comments in Vim? - Herwig Dietl - 2003-12-18 08:47:00

Peter Sommerfeld wrote:
> Hi folks,
> 
> I'm getting tired of commenting large blocks of VHDL code by hand.
> 
> Anyone know of any Vim scripts that can comment/un-comment a VHDL
> block?
> 
> A cursory Google search brings up either nothing or way too much stuff
> to sift through depending on my search terms ("vhdl vim comment").
> 
> -- Pete

Try Emacs if you can. It has a very comfortable VHDL electric mode.

If you write -- at the beginning of a line and then press Enter, the 
next line will also be commented.


-- 
Dietl Herwig

I am Murphy of Borg: Anything that can be assimilated will be.


Re: VHDL comments in Vim? - PO Laprise - 2003-12-18 11:39:00

> If you write -- at the beginning of a line
and then press Enter, the 
> next line will also be commented.

Not to start an emacs vs. vim war, but a properly set-up vhdl plug-in in 
vim will do this as well.


-- 
Pierre-Olivier

-- to email me directly, remove all _N0SP4M_ from my address --

______________________________
Join the blogging team on FPGARelated.com and earn rewards! Details Here.

Re: VHDL comments in Vim? - Jos De Laender - 2003-12-18 14:35:00

PO Laprise wrote:

>> If you write -- at the beginning of a line and then press Enter, the
>> next line will also be commented.
> 
> Not to start an emacs vs. vim war, but a properly set-up vhdl plug-in in
> vim will do this as well.
> 
> 

Don't , emacs people won't like :-p

-- 
Jos De Laender
______________________________
Join the blogging team on FPGARelated.com and earn rewards! Details Here.