ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Is it possiable to get vim to automatically write certain things in new files, like a new header and footer. Stuff that would be inspecific to the type of file (main program, header, etc.) or even the file's eventual code type (c, c++, ruby, python, etc.). For example
Quote:
/***********************************************
* [LEFT BLANK FOR PROGRAM DISCRIPTION]
*
* My name - my email address
***********************************************/
[BLANK SPACE FOR EVENTUAL CODE]
/* Created in vim compiled with GCC 4.1.1 */
Any ideas? And since I'm thinking about it, any ideas on how to improve my template (even if I can't make it automatic) would be greatly appreciated as well! Thanks in advance.
The 0 just tells it to insert at the beginning instead of starting at line 2. Also, you might want to look up autocmd. And finally, vim.org also has some related tips; google site:vim.org "new file" template
Moy
(Edited to remove BufRead.)
Last edited by Moy Easwaran; 10-09-2006 at 11:10 PM.
Thanks for the link taylor. I read through your site, pretty nice, better than mine... anyway. I cannot find anything on boilerplates, though I did find a lot of references to skeleton templates. I haven't actually tried to use any of them right yet as I'm in the middle of several good sized assignment for my C++ class. The last thing I need to do is screw up vim.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.