On Thu, Oct 4, 2012 at 1:50 PM, Vladimir Kotal <vladimir.ko...@oracle.com> wrote: > On 10/04/12 02:12, Jacobo de Vera wrote: >> >> Hi All, >> >> I recently wrote a simple Vim plugin to launch different types of >> OpenGrok searches with the word under the cursor or the currently >> selected text from Vim. >> >> You are welcome to check it out if you think you might find it useful, >> any feedback is appreciated. Here it is: >> >> https://github.com/jdevera/vim-opengrok-search >> > > Looks cool. It even works nicely when executed on remote machine with NFS > home and X11 forwarding (in that case it just opens new tab in Firefox on > local workstation). Thanks for checking it out!
> > I have 3 things: > - use the same keywords as OpenGrok (full, defs, refs, path, hist) Makes sense, I'll add it to my list > - having another way to select text for searching would be very handy, > e.g. like cscope search - say if the cursor is at the first '(' character on > line with 'if (mdb_vread(&vn, sizeof (vnode_t), wsp->walk_addr) == -1) {' it > would search for 'mdb_vread' This is working like you describe for me, I am also expanding <cword>, just like the cscope mappings do. Maybe I misunderstood what you meant? > - project selection: dynamic selection of projects would be great > - e.g. if full path to the file being edited contains substring 'foo' > then 'myproject-foo' OpenGrok project will be selected. I am doing something similar myself at the moment, where I want to select different opengrok instances and projects based on the path of the files I'm opening. I'm using autocommands for this, which I think is the way to go, I'd rather not add this functionality to the plugin to keep it simple. e.g. augroup OpenGrokFooBar au! au BufRead,BufNew */foobar/trunk* \ let b:ogs_app_url = 'http://foobar.example.com/source' | \ let b:ogs_project = 'trunk' | \ let g:ogs_browser_command = 'google-chrome' augroup END > > > v. > _______________________________________________ > opengrok-discuss mailing list > opengrok-discuss@opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/opengrok-discuss -- Jacobo de Vera _______________________________________________ opengrok-discuss mailing list opengrok-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opengrok-discuss