I want to type \mv to be able to move/rename a file
the RenameFile command works fine
The \mv mapping should enter :RenameFile /<path>/<cursor><filename>
So that I can use Ctrl-e/k to delete change whatever I  want..
That's why I'm trying to substiute every character of the filname to
<left> to move the cursor. But I don't know what to put there exactly
This is my attempt:

" fun Exec () executes different strings in order (I can't cope with the |"{{{
" syntax in commandline)
fun! Exec(...)
  let i=1
  while i<=a:0
    exec a:{i}
    let i+=1
  endwhile
endfun"}}}
 
command -nargs=1 -complete=file RenameFile call Exec("call 
delete(expand('%'))","saveas <args>")
map <leader>mv 
:RenameFile<space><c-r>=expand('%')<cr><c-r>=substitute(expand('%:t'),'.','\\\<lt>left>','')<cr>

What to put there instead of \\\<lt>left> ?

Marc

Reply via email to