I recently discovered 'cdpath', and noticed VIM is doing a good job at it, 
except :cd doesn't autocomplete the valid paths from the 'cdpath'. I wrote this 
script as a hack to work around it :

function! s:CdComplete(ArgLead, CmdLine, CursorPos)
  let pattern = empty(a:ArgLead) ? '*/' : '*' . a:ArgLead . '*/'
  return map(globpath(&cdpath, pattern, 1, 1), 'fnamemodify(v:val, ":h:t")')
endfunction

command! -bar -nargs=1 -complete=customlist,s:CdComplete Cd cd <args>

But surely this should be supported natively, doesn't sound like it would 
require huge change, would anyone be able to throw some light into why this is 
the case ?

-- 
-- 
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui