-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
15 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
" vim-qf - Tame the quickfix window | ||
" Maintainer: romainl <[email protected]> | ||
" Version: 0.0.9 | ||
" Version: 0.1.0 | ||
" License: MIT | ||
" Location: after/ftplugin/qf.vim | ||
" Website: https://github.com/romainl/vim-qf | ||
|
@@ -50,6 +50,8 @@ if exists("g:qf_mapping_ack_style") | |
else | ||
nnoremap <buffer> O <CR>:cclose<CR> | ||
endif | ||
" preview entry under the cursor | ||
nnoremap <buffer> p :call qf#PreviewFileUnderCursor()<CR> | ||
endif | ||
|
||
" filter the location/quickfix list | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
" vim-qf - Tame the quickfix window | ||
" Maintainer: romainl <[email protected]> | ||
" Version: 0.0.9 | ||
" Version: 0.1.0 | ||
" License: MIT | ||
" Location: autoload/qf.vim | ||
" Website: https://github.com/romainl/vim-qf | ||
|
@@ -13,6 +13,15 @@ | |
let s:save_cpo = &cpo | ||
set cpo&vim | ||
|
||
" open the current entry in th preview window | ||
function qf#PreviewFileUnderCursor() | ||
let cur_list = b:isLoc == 1 ? getloclist('.') : getqflist() | ||
let cur_line = getline(line('.')) | ||
let cur_file = substitute(cur_line, '|.*$', '', '') | ||
let cur_pos = substitute(cur_line, '^\(.\{-}|\)\(\d\+\)\(.*\)', '\2', '') | ||
execute "pedit +" . cur_pos . " " cur_file | ||
endfunction | ||
|
||
" helper function | ||
" " returns 1 if the window with the given number is a quickfix window | ||
" " 0 if the window with the given number is not a quickfix window | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
" vim-qf - Tame the quickfix window | ||
" Maintainer: romainl <[email protected]> | ||
" Version: 0.0.9 | ||
" Version: 0.1.0 | ||
" License: MIT | ||
" Location: plugin/qf.vim | ||
" Website: https://github.com/romainl/vim-qf | ||
|