On 2010-08-03, Tim Johnson wrote:
> I have the following function:
> " ------------------------------------------------------------------
> " Start an edit command with the Project root file path 
> " ------------------------------------------------------------------
> function! EditWithProjectRootPath()
>       let path=GetFilePath()
>       execute ":e " . path  
> endfunction
> 
> The effect of this function is that I get a directory listing.
> What I *really* want to have happen is have my cursor at the 
> end of the path so that I can enter further path segments and
> a file name:
> such as
> 
> :e /path/to/my/project/directory/^
> 
> where the caret represents the cursor
> So I need to suppress the execution until I have added further
> text.

How about this?

    :cmap E e <C-R>=GetFilePath()<CR>

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

Reply via email to