Re: Automatically adding header into file with specific extension

2006-10-18 Thread Mikolaj Machowski
Dnia środa, 18 października 2006 10:19, Gundala Viswanath napisał: > Hi, > > I want to be able to have VIM automatically > insert this line: :help skeleton m.

Re: Automatically adding header into file with specific extension

2006-10-18 Thread Tim Chase
au BufNewFile *.py,*.egg :call setline(1, "#!/usr/bin/python") But, how can we insert more than 1 lines? For example I want: #!/usr/bin/python import os import sys To build on Yakov's suggestion, you should be able to put whatever lines you want in a file (called, say ~/.python_template)

Re: Automatically adding header into file with specific extension

2006-10-18 Thread Gundala Viswanath
Thanks Yakov, It works! au BufNewFile *.py,*.egg :call setline(1, "#!/usr/bin/python") But, how can we insert more than 1 lines? For example I want: #!/usr/bin/python import os import sys To be inserted. -- Gundala Viswanath

Re: Automatically adding header into file with specific extension

2006-10-18 Thread ymc014
ly adding header into file with specific extension > Hi, > > I want to be able to have VIM automatically > insert this line: > > #!/usr/bin/python > > Whenever I open a NEW file with *.py or *.egg extension > for example > > under bash > $ vi mycode.py > >

Re: Automatically adding header into file with specific extension

2006-10-18 Thread Yakov Lerner
On 10/18/06, Gundala Viswanath <[EMAIL PROTECTED]> wrote: Hi, I want to be able to have VIM automatically insert this line: #!/usr/bin/python Whenever I open a NEW file with *.py or *.egg extension How about this (in your ~./vimrc): au BufNewFile *.py,*.egg :call setline(1, "#!/usr/bin/pyt

Automatically adding header into file with specific extension

2006-10-18 Thread Gundala Viswanath
Hi, I want to be able to have VIM automatically insert this line: #!/usr/bin/python Whenever I open a NEW file with *.py or *.egg extension for example under bash $ vi mycode.py or $ vi mycode.egg or under VI : e mycode.py Is it possible? -- Gundala Viswanath