I created a script to delete the current file:

fun! s:Deleter()
    if !exists("g:delete_dialogue")
      let g:delete_dialogue = "Are you sure to delete this file?"
    endif
    if !exists("g:confermdeletefile")
      let g:confermdeletefile = "&Yes\n&No"
    endif
    let f = confirm(g:delete_dialogue, g:confermdeletefile,
"Question")
    if f == 1
          :silent exe "echo delete(@%)"
          echo (@%) "deleted"
          exe "bw!"
        elseif f == 2
          return
    endif
  endfun

----------------------------------

This script works well.
I only would like to insert the current filename in the question:

Are you sure to delete this file? -->
Are you sure to delete "filename.ext"?

How can I realize this?

Tnx in advance.

-- 
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

Reply via email to