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
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
em to suppor this kind
of autocompletion.
--
Gundala Viswanath
I'm afraid only vim internal indenter can be used for partial(block) tidying.
How do you do that Yakov? I believe your earlier suggestion
gg=G
doesn't do partial right?
--
Gundala Viswanath
avorite options for "indent" Tony.
Second thing is that whenever I do:
:'<,'>!indent -kr
of a particular block. After the formatting,
it pushes the block to the first column, in the vi editor.
Is there a way to maintain the current position
of the block with indent?
--
Gundala Viswanath
Thanks Yakov,
gg=G
:help =
But it seems to me that works on Global basis strictly.
How can we localize the cleanup within a visual block?
Moreoever how can we customize the indentation, bracing, etc?
Since with Perl this customization is captured within .perltidyrc.
--
Gundala Viswanath
?
--
Gundala Viswanath