Skip to content

Commit

Permalink
New features for 0.0.7
Browse files Browse the repository at this point in the history
- '{' and '}' added to jump to next file grouping
- ':Keep' added
- ':Reject' added
- ':Find' is on its way to deprecation
  • Loading branch information
romainl committed Apr 5, 2016
1 parent a5ba706 commit e5db57c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
12 changes: 8 additions & 4 deletions after/ftplugin/qf.vim
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.6
" Version: 0.0.7
" License: Vim License (see :help license)
" Location: after/ftplugin/qf.vim
" Website: https://github.com/romainl/vim-qf
Expand All @@ -17,10 +17,12 @@ let b:undo_ftplugin = "setl fo< com< ofu<"

" text wrapping is pretty much useless in the quickfix window
setlocal nowrap

" relative line numbers don't make much sense either
" but absolute numbers do
setlocal norelativenumber
setlocal number

" we don't want quickfix buffers to pop up when doing :bn or :bp
set nobuflisted

Expand Down Expand Up @@ -55,8 +57,10 @@ if exists("g:qf_mapping_ack_style")
endif

" filter the location/quickfix list
" (kept for backward compatibility)
" usage:
" :Filter foo
" :Filter foo <-- same as :Keep foo
" :Filter! foo <-- same as :Reject foo
command! -buffer -nargs=1 -bang Filter call qf#FilterList(<q-args>, expand("<bang>") == "!" ? 1 : 0)

" keep entries matching the argument
Expand Down Expand Up @@ -84,13 +88,13 @@ command! -buffer -nargs=1 Doline call qf#DoList(1, <q-args>)
" :Dofile %s/^/---
command! -buffer -nargs=1 Dofile call qf#DoList(0, <q-args>)

" experimental feature
" TODO: allow customization
" jump to previous/next file grouping
nnoremap <silent> <buffer> } :call qf#NextFile()<CR>
nnoremap <silent> <buffer> { :call qf#PreviousFile()<CR>
" quit Vim if the last window is a quickfix window
autocmd qf BufEnter <buffer> if winnr('$') < 2 | q | endif
autocmd qf BufEnter <buffer> if winnr('$') < 2 | q | endif
autocmd qf BufWinEnter <buffer> call qf#ReuseTitle()

let &cpo = s:save_cpo
5 changes: 2 additions & 3 deletions autoload/qf.vim
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.6
" Version: 0.0.7
" License: Vim License (see :help license)
" Location: autoload/qf.vim
" Website: https://github.com/romainl/vim-qf
Expand All @@ -13,8 +13,7 @@
let s:save_cpo = &cpo
set cpo&vim

" experimental feature
" jump to previous/next file chunk
" jump to previous/next file grouping
function qf#GetFilePath(line) abort
return substitute(a:line, '|.*$', '', '')
" | | +- no flags
Expand Down
4 changes: 2 additions & 2 deletions plugin/qf.vim
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.6
" Version: 0.0.7
" License: Vim License (see :help license)
" Location: plugin/qf.vim
" Website: https://github.com/romainl/vim-qf
Expand Down Expand Up @@ -34,7 +34,7 @@ nnoremap <expr> <silent> <Plug>QfSwitch &filetype == "qf" ? "<C-w>p" : "<C-w>b"
augroup qf
autocmd!
autocmd QuickFixCmdPost [^l]* cwindow
autocmd QuickFixCmdPost l* lwindow
autocmd QuickFixCmdPost l* lwindow
augroup END

let &cpo = s:save_cpo

0 comments on commit e5db57c

Please sign in to comment.