On 2013-12-05, dza wrote:
> Hello guys.
>
> I need to assemble a :write line for a VimL/VimScript.
>
> I can use the expand modifiers yes %:t:r - but it doesn't give me
> a filetype in the case of ".vimrc" for example, so I need the
> variable to check whether it's set or not and put it at the end of
> the file.
Something like this?
:exe 'w %:t:r'.&filetype
See
:help :exe
HTH,
Gary
--
--
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/groups/opt_out.
Thursday, December 5, 2013
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment