LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Blogs > sumeet inani
User Name
Password

Notices

Rate this Entry

template in vim

Posted 03-15-2011 at 03:36 AM by sumeet inani

I found this -> http://code.google.com/p/lh-vim/wiki/muTemplate

I downloaded 4 vimballs namely - lh-map-tools-1.1.2.vba , lh-vim-lib-2.2.4 , searchInRuntime-2.1.8.vba & mu-template-2.2.1.vba
Then opened them in vim & ran
Code:
:source %
Now if you create new file ending in c then it will be filled with

Code:
//========================================================================
  2 /**@file        /home/lxuser/.vim/vimball/try.c
  3  * @author      lxuser
  4  * @version     «version»
  5  * @date
  6  *      Created:        Thursday 10 February 2011 03:13:36 PM IST \n
  7  *      Last Update:    Thursday 10 February 2011 03:13:36 PM IST
  8  */
  9 /*------------------------------------------------------------------------
 10  * Description: «description»
 11  * 
 12  *------------------------------------------------------------------------
 13  * History:     «history»
 14  * TODO:        «missing features»
 15  *========================================================================
 16  */
 17 
 18 
 19 /*===========================================================================*/
 20 /*===============================[ Includes ]================================*/
 21 /*===========================================================================*/
 22 #include "0"
 23 «Includes»
 24 
 25 
 26 /*===========================================================================*/
 27 /*==================================[ «» ]===================================*/
 28 /*===========================================================================*/
 29 «other stuff»
Isn't this great !
You can customise the default files : ~/.vim/after/template/<extension>.template

If you want to uninstall it
then run inside vim
Code:
::RmVimball Same_File_name_with_path
Posted in Uncategorized
Views 316 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 05:10 PM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration