QFEnter : Open a Quickfix item in a window you choose
| script karma
Downloaded by 394
Comments, bugs, improvements
script versions (upload new version)
|A normal mode example : https://f.cloud.github.com/assets/5915359/1632228/bb76dc72-5774-11e3-83d1-2933b95d5b81.gif
A visual mode example : https://f.cloud.github.com/assets/5915359/2006385/61c6f720-8717-11e3-806b-d0f276af3ef9.gif
More information : https://github.com/yssl/QFEnter
QFEnter allows you to open a Quickfix item in a window you choose.
You can choose the window by giving it a focus just before jumping to Quickfix window.
You can also open multiple items at once by including them in the visual block.
In Quickfix window,
Normal mode : Open an item under cursor in a previously focused window.
Visual mode : Open items in visual block in a previously focused window. As a result, the last item appears in the window.
Normal mode : Open an item under cursor in a new vertical split from a previously focused window.
Visual mode : Open items in visual block in a sequence of new vertical splits from a previously focused window.
Normal mode : Open an item under cursor in a new horizontal split from a previously focused window.
Visual mode : Open items in visual block in a sequence of new horizontal splits from a previously focused window.
Normal mode : Open an item under cursor in a new tab.
Visual mode : Open items in visual block in a sequence of new tabs.
Quickfix window is automatically opened in the new tab to help you open other Quickfix items.
You can change the key mappings in your .vimrc. The default setting is,
let g:qfenter_open_map = ['<CR>', '<2-LeftMouse>']
let g:qfenter_vopen_map = ['<Leader><CR>']
let g:qfenter_hopen_map = ['<Leader><Space>']
let g:qfenter_topen_map = ['<Leader><Tab>']
Default opening methods for QuickFix items are quite inconvenient,
- You cannot select a window in which a file is opened when you press `<Enter>` in Quickfix.
> Hitting the <Enter> key or double-clicking the mouse on a line has the same effect. The
file containing the error is opened in the window above the quickfix window.
It is inconsistent with other Quickfix commands like `:cnext` and `:cprev` which open a file in a previously focused window.
- You also cannot specify the window when you use `Ctrl-W <Enter>`,
because Vim always create a new horizontal split window above Quickfix window and open a file in it.
There is even no command for 'open in new vertical split window'.
They are confusing and bother me every time, so I wrote a simple plugin to make up for these weak points.
It's name comes from the most basic way to open a file from Quickfix window - the `<Enter>` key.
Click on the package to download.
ip used for rating: 184.108.40.206
||- now QFEnter supports vim's 'switchbuf' option.
if you change 'switchbuf' option, QFEnter adapts its behavior to the changed option.
- thanks to sergey-vlasov!
- update document for 'switchbuf' option.
|| - subdivide g:qfenter_keep_quickfixfocus option for each command.
e.g. g:qfenter_keep_quickfixfocus.open, g:qfenter_keep_quickfixfocus.cnext,
- bug fix : not updated window for already opened file when g:qfenter_keep_quickfixfocus==1
- thanks for mMontu!
||- visual mode support to open multiple Quickfix items at once
- add option to keep focus in Quicifix window after opening items (g:qfenter_keep_quickfixfocus)
- support :cnext and :cprev command to open items
- improve auto quickfix open when 'open in new tab'
- restore view(cursor position, scroll..) of quickfix window to auto-opened quickfix window
- restore size of quickfix window to auto-opened quickfix window
- now you don't need to provide g:qfenter_copen_modifier option. QFEnter now smartly determine whether the new quickfix window is botright or topleft, vertical or horizontal.
- change g:qfenter_ttopen_map option name to g:qfenter_topen_map (backward compatibility maintained)
- remove '<Tab><Tab>' from default mapping
|| - now, Quickfix window is automatically opened after "open in a new tab"
- add options about Quickfix auto opening
- add one more default mapping for "open in a new tab"
- code refactoring
|| - change default mapping for "open a file in a new tab"
||- add new feature
: open a file under cursor in new tab window.
: register custom "cc" command with g:qfenter_cc_cmd