what adds an auto heading to my new files??

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

what adds an auto heading to my new files??

Francis Grizzly Smit
yeah when I open a new file like say a C/CPP file i get a automatic
header like so:

/*
  *
=====================================================================================
  *
  *       Filename:  std_index_sequence.c
  *
  *    Description:
  *
  *        Version:  1.0
  *        Created:  04/09/14 23:29:19
  *       Revision:  none
  *       Compiler:  gcc
  *
  *         Author:  YOUR NAME (),
  *   Organization:
  *
  *
=====================================================================================
  */

I'm not sure if this is caused by a plugin I've installed or does vim
just do this??

the reason I ask is I want to set the name etc automatically if I can

--


   .~.     In my life God comes first....
   /V\         but Linux is pretty high after that :-D
  /( )\    Francis (Grizzly) Smit
  ^^-^^    http://www.smit.id.au/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GM/CS/H/P/S/IT/L d- s+:+ a++ C++++ UL++++$ P++ L+++$ E--- W++
N W--- M-- V-- PE- PGP t+ 5-- X-- R- tv b++++ D-
G e++ h+ y?
------END GEEK CODE BLOCK------
http://www.geekcode.com/

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: what adds an auto heading to my new files??

Reid Thompson
On Sat, 2014-09-06 at 00:34 +1000, Francis (Grizzly) Smit wrote:
> yeah when I open a new file like say a C/CPP file i get a automatic
> header like so:

http://www.thegeekstuff.com/2009/01/tutorial-make-vim-as-your-cc-ide-using-cvim-plugin/

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: what adds an auto heading to my new files??

Nathan Schwarz
In reply to this post by Francis Grizzly Smit
A list of your plugins would be really helpful with that.

Without any information about your OS, your plugins or how you create
these files there is no way in hell that anybody can say what is
happening - someone can guess, yes. But thats it.

--
/"\  ASCII Ribbon Campaign
\ /  - against HTML emails
 X   - against proprietory attachments
/ \  http://en.wikipedia.org/wiki/ASCII_Ribbon_Campaign

On 09-06/ 0:34, Francis (Grizzly) Smit wrote:

> yeah when I open a new file like say a C/CPP file i get a automatic header
> like so:
>
> /*
>  * =====================================================================================
>  *
>  *       Filename:  std_index_sequence.c
>  *
>  *    Description:
>  *
>  *        Version:  1.0
>  *        Created:  04/09/14 23:29:19
>  *       Revision:  none
>  *       Compiler:  gcc
>  *
>  *         Author:  YOUR NAME (),
>  *   Organization:
>  *
>  * =====================================================================================
>  */
>
> I'm not sure if this is caused by a plugin I've installed or does vim just
> do this??
>
> the reason I ask is I want to set the name etc automatically if I can
>
> --
>
>
>   .~.     In my life God comes first....
>   /V\         but Linux is pretty high after that :-D
>  /( )\    Francis (Grizzly) Smit
>  ^^-^^    http://www.smit.id.au/
> -----BEGIN GEEK CODE BLOCK-----
> Version: 3.1
> GM/CS/H/P/S/IT/L d- s+:+ a++ C++++ UL++++$ P++ L+++$ E--- W++
> N W--- M-- V-- PE- PGP t+ 5-- X-- R- tv b++++ D-
> G e++ h+ y?
> ------END GEEK CODE BLOCK------
> http://www.geekcode.com/
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> --- You received this message because you are subscribed to the Google
> Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: what adds an auto heading to my new files??

Francis Grizzly Smit
In reply to this post by Reid Thompson
On 06/09/14 00:40, Reid Thompson wrote:
> On Sat, 2014-09-06 at 00:34 +1000, Francis (Grizzly) Smit wrote:
>> yeah when I open a new file like say a C/CPP file i get a automatic
>> header like so:
> http://www.thegeekstuff.com/2009/01/tutorial-make-vim-as-your-cc-ide-using-cvim-plugin/
>
Bingo cvim it is thanks you.

you don't know how to customize the date time it uses do you I prefer
iso or at the very least 4 digit years

--


   .~.     In my life God comes first....
   /V\         but Linux is pretty high after that :-D
  /( )\    Francis (Grizzly) Smit
  ^^-^^    http://www.smit.id.au/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GM/CS/H/P/S/IT/L d- s+:+ a++ C++++ UL++++$ P++ L+++$ E--- W++
N W--- M-- V-- PE- PGP t+ 5-- X-- R- tv b++++ D-
G e++ h+ y?
------END GEEK CODE BLOCK------
http://www.geekcode.com/

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: what adds an auto heading to my new files??

Francis Grizzly Smit
On 06/09/14 01:10, Francis (Grizzly) Smit wrote:

> On 06/09/14 00:40, Reid Thompson wrote:
>> On Sat, 2014-09-06 at 00:34 +1000, Francis (Grizzly) Smit wrote:
>>> yeah when I open a new file like say a C/CPP file i get a automatic
>>> header like so:
>> http://www.thegeekstuff.com/2009/01/tutorial-make-vim-as-your-cc-ide-using-cvim-plugin/
>>
> Bingo cvim it is thanks you.
>
> you don't know how to customize the date time it uses do you I prefer
> iso or at the very least 4 digit years
>
Once again thx,

just one more question if I may it says that if I type \if in normal mode
then I would be promoted for a function name etc see below:

Feature 2: Adding C function using \if

For writing a subroutine, type \if in normal mode, which will prompt for
the function name (as shown in Fig1 below) and inserts the subroutine
with default function content (as shown in Fig2 below).

but this doesn't work for me \if puts me in insert mode and put an f in
does \ have to be set to something

--


   .~.     In my life God comes first....
   /V\         but Linux is pretty high after that :-D
  /( )\    Francis (Grizzly) Smit
  ^^-^^    http://www.smit.id.au/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GM/CS/H/P/S/IT/L d- s+:+ a++ C++++ UL++++$ P++ L+++$ E--- W++
N W--- M-- V-- PE- PGP t+ 5-- X-- R- tv b++++ D-
G e++ h+ y?
------END GEEK CODE BLOCK------
http://www.geekcode.com/

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: what adds an auto heading to my new files??

Francis Grizzly Smit
On 06/09/14 01:52, Francis (Grizzly) Smit wrote:

> On 06/09/14 01:10, Francis (Grizzly) Smit wrote:
>> On 06/09/14 00:40, Reid Thompson wrote:
>>> On Sat, 2014-09-06 at 00:34 +1000, Francis (Grizzly) Smit wrote:
>>>> yeah when I open a new file like say a C/CPP file i get a automatic
>>>> header like so:
>>> http://www.thegeekstuff.com/2009/01/tutorial-make-vim-as-your-cc-ide-using-cvim-plugin/
>>>
>> Bingo cvim it is thanks you.
>>
>> you don't know how to customize the date time it uses do you I prefer
>> iso or at the very least 4 digit years
>>
> Once again thx,
>
> just one more question if I may it says that if I type \if in normal mode
> then I would be promoted for a function name etc see below:
>
> Feature 2: Adding C function using \if
>
> For writing a subroutine, type \if in normal mode, which will prompt for
> the function name (as shown in Fig1 below) and inserts the subroutine
> with default function content (as shown in Fig2 below).
>
> but this doesn't work for me \if puts me in insert mode and put an f in
> does \ have to be set to something
>
found it some of the stuff in my .vimrc that I inherited from mandrake
and ubuntu and God knows where was interfering commented loads out and
now it works

--


   .~.     In my life God comes first....
   /V\         but Linux is pretty high after that :-D
  /( )\    Francis (Grizzly) Smit
  ^^-^^    http://www.smit.id.au/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GM/CS/H/P/S/IT/L d- s+:+ a++ C++++ UL++++$ P++ L+++$ E--- W++
N W--- M-- V-- PE- PGP t+ 5-- X-- R- tv b++++ D-
G e++ h+ y?
------END GEEK CODE BLOCK------
http://www.geekcode.com/

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: what adds an auto heading to my new files??

Reid Thompson
On Sat, 2014-09-06 at 02:01 +1000, Francis (Grizzly) Smit wrote:
> >
> found it some of the stuff in my .vimrc that I inherited from mandrake
> and ubuntu and God knows where was interfering commented loads out and
> now it works


sorry - got caught up and didn't see the above messages.

in .vim, in the the csupport dir hierarchy are the Template and
*template* files - -they control what gets inserted/populated/etc

reid

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: what adds an auto heading to my new files??

Reid Thompson
On Fri, 2014-09-05 at 18:06 +0000, Reid Thompson wrote:

> On Sat, 2014-09-06 at 02:01 +1000, Francis (Grizzly) Smit wrote:
> > >
> > found it some of the stuff in my .vimrc that I inherited from mandrake
> > and ubuntu and God knows where was interfering commented loads out and
> > now it works
>
>
> sorry - got caught up and didn't see the above messages.
>
> in .vim, in the the csupport dir hierarchy are the Template and
> *template* files - -they control what gets inserted/populated/etc
>
> reid
>
------------------------------------------------------------------------------
5.2.1   USER DEFINED FORMATS FOR DATE AND TIME
csupport-templates-date
------------------------------------------------------------------------------
The format for |DATE| ,|TIME| , and|YEAR| can be set by the user. The
defaults are
Example:
 
  |DATE|        '%x'
  |TIME|        '%X'
  |YEAR|        '%Y'
 
See the manual page of the C function strftime() for the format.  The
accepted
format depends on your system, thus this is not portable!  The maximum
length
of the result is 80 characters.

User defined formats can be set using the following function calls in
the
master template file is '$HOME/.vim/c-support/templates/Templates',
e.g.

  SetFormat( 'DATE', '%D'      )
  SetFormat( 'TIME', '%H:%M'   )
  SetFormat( 'YEAR', 'year %Y' )


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: what adds an auto heading to my new files??

Francis Grizzly Smit
On 06/09/14 04:11, Reid Thompson wrote:

> On Fri, 2014-09-05 at 18:06 +0000, Reid Thompson wrote:
>> On Sat, 2014-09-06 at 02:01 +1000, Francis (Grizzly) Smit wrote:
>>> found it some of the stuff in my .vimrc that I inherited from mandrake
>>> and ubuntu and God knows where was interfering commented loads out and
>>> now it works
>>
>> sorry - got caught up and didn't see the above messages.
>>
>> in .vim, in the the csupport dir hierarchy are the Template and
>> *template* files - -they control what gets inserted/populated/etc
>>
>> reid
>>
> ------------------------------------------------------------------------------
> 5.2.1   USER DEFINED FORMATS FOR DATE AND TIME
> csupport-templates-date
> ------------------------------------------------------------------------------
> The format for |DATE| ,|TIME| , and|YEAR| can be set by the user. The
> defaults are
> Example:
>  
>    |DATE|        '%x'
>    |TIME|        '%X'
>    |YEAR|        '%Y'
>  
> See the manual page of the C function strftime() for the format.  The
> accepted
> format depends on your system, thus this is not portable!  The maximum
> length
> of the result is 80 characters.
>
> User defined formats can be set using the following function calls in
> the
> master template file is '$HOME/.vim/c-support/templates/Templates',
> e.g.
>
>    SetFormat( 'DATE', '%D'      )
>    SetFormat( 'TIME', '%H:%M'   )
>    SetFormat( 'YEAR', 'year %Y' )
>
>
Umm that didn't work I have looked up SetFormat in the help and it
sugests it should work too but when I put the entries in
'$HOME/.vim/c-support/templates/Templates' nothing happens. does it need
to be in any particular place in the file??
--


   .~.     In my life God comes first....
   /V\         but Linux is pretty high after that :-D
  /( )\    Francis (Grizzly) Smit
  ^^-^^    http://www.smit.id.au/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GM/CS/H/P/S/IT/L d- s+:+ a++ C++++ UL++++$ P++ L+++$ E--- W++
N W--- M-- V-- PE- PGP t+ 5-- X-- R- tv b++++ D-
G e++ h+ y?
------END GEEK CODE BLOCK------
http://www.geekcode.com/

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: what adds an auto heading to my new files??

Reid Thompson
On Sun, 2014-09-07 at 12:25 +1000, Francis (Grizzly) Smit wrote:
> Umm that didn't work I have looked up SetFormat in the help and it
> sugests it should work too but when I put the entries in
> '$HOME/.vim/c-support/templates/Templates' nothing happens. does it need
> to be in any particular place in the file??
> --

if i put it at the top of Templates, it works for me..

original:
SetFormat( 'DATE', '%D'      )

* Created     :  09/08/14 09:38:59 AM


updated:
SetFormat( 'DATE', '%F'      )

* Created     :  2014-09-08 09:40:41 AM




$  head Templates

§ ==========================================================
§  User Macros
§ ==========================================================

SetFormat( 'DATE', '%F'      )
SetMacro( 'AUTHOR',      'Reid Thompson' )
SetMacro( 'AUTHORREF',   'rthompso' )


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.