You are not logged in.

#1 2009-07-07 03:34:23

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

(SOLVED) How to automagically add X number of line to new file in vim?

Basicly I want to add X number of predefined lines of text to every new file I create in vim; if I create file.cpp I want some text, if I create file.sh I want another text.
I'm sure this is do-able? smile

Last edited by dmz (2009-07-07 17:51:41)

Offline

#2 2009-07-07 04:02:24

Arisna
Member
Registered: 2009-02-13
Posts: 81

Re: (SOLVED) How to automagically add X number of line to new file in vim?

Perhaps this is what you need.

Offline

#3 2009-07-07 04:08:13

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: (SOLVED) How to automagically add X number of line to new file in vim?

Brilliant! Thanks. smile

Offline

#4 2009-07-07 12:12:13

scio
Member
From: Buffalo, NY
Registered: 2008-08-05
Posts: 366

Re: (SOLVED) How to automagically add X number of line to new file in vim?

Was going to say the same thing, mind sticking [SOLVED] in the subject of this thread?

Offline

Board footer

Powered by FluxBB