![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| create users from template | rijeshpp | Shell Programming and Scripting | 0 | 10-31-2007 07:29 AM |
| Extracting information from a template | Ernst | Shell Programming and Scripting | 4 | 03-06-2007 10:18 PM |
| About template constraints | sarwan | High Level Programming | 0 | 11-21-2005 01:11 AM |
| Template for Disaster Recovery | steiner | Security | 5 | 08-19-2003 05:28 AM |
| substitution of variable in template | supercbw | Shell Programming and Scripting | 1 | 04-11-2002 09:58 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
vi calling template
Hello.
I want to copy temp files when I make a new file by vi. For example, Code:
09:32:52 ~/ $ mkdir test
09:33:03 ~/ $ cd test/
09:33:09 ~/test/ $ ls
09:33:16 ~/test/ $ vi test.cpp
09:34:37 ~/test/ $ cat test.cpp
#include <iostream>
int main()
{
}
09:34:48 ~/test/ $ vi test.bash
09:35:19 ~/test/ $ cat test.bash
#!/bin/bash
09:35:23 ~/test/ $ vi test.pl
09:35:45 ~/test/ $ cat test.pl
#!/usr/bin/perl
exit;
09:35:50 ~/test/ $
I want to do Code:
cp $HOME/.cpp.tmp ./test.cpp .cpp.tmp is a template file and It contains Code:
#include <iostream>
int main()
{
}
But can I do this by writing something in .vimrc ?? |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
It would be easier to put a function in you .bashrc to do this.
|
||||
| Google The UNIX and Linux Forums |