On 08/03/10 15:22, Tim Johnson wrote:
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
Unless you have additional work to be done, I'd just stick it in
a mapping which, without a trailing <cr> will leave you hanging
at the prompt:
:nnoremap <f4> :e <c-r>=GetFilePath()<cr>
(note the trailing <cr> is for the expression-register, not the
Ex command).
-tim
PS: While I know there are likely lots of Tim Johnsons out there,
are you related to Dale & Flo, where the 4 of us all attended MC
together?
--
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