LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] c/vim/cpr tip...

[ILUG] c/vim/cpr tip...

kevin lyda kevin+dated+1085240550.138508 at ie.suberic.net
Mon May 17 16:42:20 IST 2004


these are handy things to have in your ~/.vimrc:

    au BufNewFile,BufRead	*.m     set ft=objc
    au BufNewFile,BufRead	*.cpr   set ft=c
    au Filetype		c	source ~/.vim/c.vim
    au BufNewFile		*.h   	0read ~/.vim/template/h
    au BufNewFile		*.c   	0read ~/.vim/template/c
    au BufNewFile		*.cpr 	0read ~/.vim/template/cpr

then this in ~/.vim/c.vim:

    set cindent
    set foldmethod=indent
    syn region myFold start="{" end="}" transparent fold
    syn sync fromstart

and the following template files:

    h:
        #ifndef _INCLUDE_x_H
        #define _INCLUDE_x_H

        #endif /* _INCLUDE_x_H */

    c:
        #include <stdio.h>
        #include <string.h>
        #include <stdlib.h>

        int
        main(int argc, char *argv[])
        {
        }

    cpr:
        #!/usr/bin/cpr

        int
        main(void)
        {
        }

kevin

-- 
kevin at ie.suberic.net  ~  "you're either with us or against us." --dubya
iraq: vietnam again?  ~  in that simplistic world-view progressives and
a new lbj selected -  ~  liberals are "us" while bush and bin laden are
"looney bush junior"  ~  "against us."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.linux.ie/pipermail/ilug/attachments/20040517/560e6557/attachment.pgp


More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell