Hi,
In Ultisnips, I have a snippet:
snippet prg
!This is file : `!v expand('%:t:r')`
! Author= `!v expand($USER)`
! Started at: `date +%d.%m.%y`
! Last Modified : Wed 17 Jun 2015 04:09:27 PM BST
!
Program ${1:<++`!v expand('%:t:r')`}
Implicit None
${2:<++Start Typing++>}
End Program ${1/([^\n$]+).*/$1/}
endsnippet
And I am calling this as:
"let s:plugin_dir = $HOME.'/.vim/bundle/vimf90/'
let s:plugin_dir=filter(split(&rtp, ','), 'v:val =~ "/vimf90"')[0]
let s:templatedir=s:plugin_dir . '/templates/'
function! Prog(arg)
execute 'r ' . s:templatedir . a:arg . '.txt'
%substitute#\[:EVAL:\]\(.\{-\}\)\[:END:\]#\=eval(submatch(1))#ge
endfunction
So, I am expecting to have the snippet called. But what I am getting is:
!****<= A blank line at top
!File=i.f90
!Author=
!Created=Wed 04 Nov 2015 10:54:29 CET
!Last Modified=Wed 04 Nov 2015 10:54:29 CET
Program i
Implicit None
<++> !****<= Dont know why this <++> and 0 is coming
0
End Program i
So, Though this is called properly, I am getting few crap line. Can you kindly help me?
--
--
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 vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Wednesday, November 4, 2015
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment