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.
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)
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
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
>
>
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
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