Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fast close #7

Closed
bitboxer opened this issue Jul 29, 2010 · 7 comments
Closed

Fast close #7

bitboxer opened this issue Jul 29, 2010 · 7 comments

Comments

@bitboxer
Copy link
Contributor

Is it possible to close the split window with a simple keystroke ? e.g. esc ?

@mileszs
Copy link
Owner

mileszs commented Jul 29, 2010

ack.vim uses Vim's quickfix window (http://vimdoc.sourceforge.net/htmldoc/quickfix.html). You could map a key to close the quickfix window via the command :ccl . For instance:

map :-) :ccl<ENTER>

I do not plan to build such a command into ack.vim, as I'd rather not usurp default quickfix window behavior for users who may not want such a thing, and I don't want to clobber a key that might be assigned to something that someone already uses.

Does that make sense?

@bitboxer
Copy link
Contributor Author

It makes sense not to map a key to that, but in Ack.vim I can press escape and in NERDTree I can press q to close the window. That's not a complete binding, that key is only available when navigating in that window.

@mileszs
Copy link
Owner

mileszs commented Jul 29, 2010

Interesting. Perhaps I'll look into it at some point. I'm no vim-script expert, unfortunately. You're welcome to have at it yourself, as well. ;-)

@bitboxer
Copy link
Contributor Author

I updated the ack.vim and sent you a pull request. Hope you like it. Pressing q in the Ack buffer will close the window

@mileszs
Copy link
Owner

mileszs commented Jul 29, 2010

Damn! I go to lunch, and the feature is finished before I get back! It looks like it was pretty simple, too. (Not to diminish your efforts, which I greatly appreciate.) Thanks!

@bitboxer
Copy link
Contributor Author

Yeah, one of the good things that come out of timezones :) . I will cook my dinner now.

With that method you can also add #3

@hafeyang
Copy link

" Ecs to close quickfix window
nnoremap <silent> <ESC> :ccl<CR>

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants