hello,
I'm trying to add skeleton to new files having a filetype (eg python)
here's what I've tried :
autocmd BufNewFile if &filetype == "python" 0r ~/.vim/python.skel |
normal G | let IndentStyle = "python" | endif
with no luck when I open a new file like this :
: bel new | set filetype=python
I know skeleton works , because I have this line that adds it when open
a named new file
au BufNewFile *.py 0r ~/.vim/python.skel | normal G | let IndentStyle =
"python"
PS: i noticed, when I open a new file with the command above, that
adding startinsert at the end causes loading to be much longer and may
corrupt dipslay.
this doesn't work very well:
: bel new | set filetype=python | startinsert
this works well:
: bel new | startinsert | set filetype=python
--
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_use/7e35a6db-2c07-fe80-bd99-fd908adc8fc1%40sfr.fr.