Vimmers,

I wanted to know how I can open a class file in hierarchy.

For example, my source would have this line:

        org.postgresql.someclass;

I want to open it using something like this (type cf on the file name).

        nnoremap <silent> cf :exec 'sp '.findfile(substitute(expand('<cfile>'),
        '^/*','',''))<cr>

The actual file path would be:

        ./org/postgresql/someclass.java


I'm not sure how to have vim recognize "." double as a file separator. 
'^.*' didn't work. I guess it's tricky since "." can be in the file name 
(at least for the extension), but assuming I have only one "." at the end 
for the extension, what would be the map syntax?

set path and suffixesadd is not an issue.



Thanks.

Ben Kim


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to