Closing window with choices provided by JavaSearch, when one is selected

4 views
Skip to first unread message

Petr Sobotka

unread,
Jan 10, 2012, 8:27:54 AM1/10/12
to eclim...@googlegroups.com
Hello,

Is there any way to modify behavior of JavaSearch and CSearch, which return multiple choices to close window with choices after one is selected? 

Same would be useful for context search...

--
Thanks a lot,
Petr Sobotka aka Pietro

Eric Van Dewoestine

unread,
Jan 11, 2012, 4:53:36 PM1/11/12
to eclim...@googlegroups.com

There is no current way to accomplish this but I don't think it would
be too hard to add. I'll add it to my todo list.

--
eric

jurgen

unread,
Feb 2, 2012, 11:50:50 AM2/2/12
to eclim-user
JavaSearch is imensely better that the cscope thingy I was using.
I do wish when opening a new window buffer, instead of the target
being centered in the screen, it was at the top of the screen.
Any way to do that? Thanks Jurgen

Eric Van Dewoestine

unread,
Feb 12, 2012, 7:29:16 PM2/12/12
to eclim...@googlegroups.com

I actually changed my mind on this one. I think this is better served
as a user defined mapping since I think it highly depends on the
context as to whether a user would want the quickfix window to be
closed so the user should be hitting a differ key to indicate the
behavior they want in that situation.

You can add your own mapping like one of the examples below to a
~/.vim/ftplugin/qf.vim file (vimfiles/ftplugin/... on Windows):

" open the selected file and close quickfix on 'e' (for edit)
nnoremap <buffer> <silent> e <cr>:cclose<cr>

" always close the quickfix when picking a result
nnoremap <buffer> <silent> <cr> <cr>:cclose<cr>

--
eric

Petr Sobotka

unread,
Feb 13, 2012, 6:22:58 AM2/13/12
to eclim...@googlegroups.com
Hi Eric, 

Thanks a lot for the solution! 

It works perfectly.
I just have to update close command as I need to close location window and not quickfix window (substitute :cclose to :lclose)  : 

nnoremap <buffer> <silent> <cr> <cr>:lclose<cr>

--
Cheers,
Petr Sobotka aka Pietro

2012/2/13 Eric Van Dewoestine <erva...@gmail.com>

--
eric

--
You received this message because you are subscribed to the Google Groups "eclim-user" group.
To post to this group, send email to eclim...@googlegroups.com.
To unsubscribe from this group, send email to eclim-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/eclim-user?hl=en.





Reply all
Reply to author
Forward
0 new messages