Still related to the previous question, but switching mode with
exe "a" doesn't seem to work, I still have to press the
a button manually
Here upon opening a newly created a file, a template is in use and the cursor will be moved to the right position, then erase the tag, and switch to the
appending (editing) mode.
function LoadFile() 0r ~/.vim/skel/tmpl.%:e exe "normal /<CURSOR>\<Cr>" exe "s#<CURSOR>##" exe "a" endf autocmd! BufNewFile * silent! call LoadFile()