Saturday, December 27, 2008

vim verilog code indentation

How to (auto-)indent verilog code when editing with vim?
This link suggests inserting the following 'code' snippet into your .vimrc file. It selectively intends only your verilog code. (other code variants are also suggested in the above mentioned link, see for yourself if interested, I am posting this code because this was the behaviour that I wanted.)

au BufReadPost * if exists("b:current_syntax")
au BufReadPost * if b:current_syntax == "verilog"
au BufReadPost * let b:verilog_indent_modules = 1
au BufReadPost * endif
au BufReadPost * endif


vim commenting -- NERD Commenter plugin

Here's a link to a pretty good vim commenting plugin [by the name NERD Commenter]: link.

The page has basic functionality explanation, supported file types, how-to install and download links (in that order[;)])

In case you are not so good at hacking vimrc fileor making your own commenting scripts
(like me), use this. Even if you can do the above, this might work better at less effort -- as they say, Do not do for yourself what somebody else can do for you ;).

Extract the archive to your ~/.vim/ directory
If you want to integrate the help (doc) of the plugin with vim's do
:helptags ~/.vim/doc
within vim....

ntfs mounting

This how-to tell how to mount ntfs files on linux: link.

The story: In fedora 10 (KDE version) I am being asked the root password for file operation on ntfs partitions, So I thought it better to edit fstab.

Friday, December 26, 2008

bootstrapping link for ngspice

Here is a link to get started wit ngspice.

I was using LTspice (free tool, windows native) to "spice" up my engineering life. Though LTspice is reported to run on linux over wine (I have not tried that personally), I went overboard to ngspice. Cannot comment on how good it is, seems ok for the small 'hobby' circuits that I am doing now.

Saturday, December 20, 2008

pdf document properties -- pdflatex

If you are using pdflatex and to set the document properties of the generated pdf. Here is a link which says how to do it: link.
Just include this in your .tex file
\pdfinfo{
/Author (Author name)
/Title (Title of the document)
/CreationDate (D:YYYYMMDDHHmmss)
/Subject (how to edit the pdf doc properties)
/Keywords (word1, word2, word3)
}