NICH
Server IP : 127.0.1.1  /  Your IP : 216.73.216.172
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux bahcrestlinepropertiesllc 5.15.0-113-generic #123-Ubuntu SMP Mon Jun 10 08:16:17 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/vim/vim82/pack/dist/opt/cfilter/plugin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/share/vim/vim82/pack/dist/opt/cfilter/plugin/cfilter.vim
" cfilter.vim: Plugin to filter entries from a quickfix/location list
" Last Change: Aug 23, 2018
" Maintainer: Yegappan Lakshmanan (yegappan AT yahoo DOT com)
" Version: 1.1
"
" Commands to filter the quickfix list:
"   :Cfilter[!] /{pat}/
"       Create a new quickfix list from entries matching {pat} in the current
"       quickfix list. Both the file name and the text of the entries are
"       matched against {pat}. If ! is supplied, then entries not matching
"       {pat} are used. The pattern can be optionally enclosed using one of
"       the following characters: ', ", /. If the pattern is empty, then the
"       last used search pattern is used.
"   :Lfilter[!] /{pat}/
"       Same as :Cfilter but operates on the current location list.
"
if exists("loaded_cfilter")
    finish
endif
let loaded_cfilter = 1

func s:Qf_filter(qf, searchpat, bang)
    if a:qf
	let Xgetlist = function('getqflist')
	let Xsetlist = function('setqflist')
	let cmd = ':Cfilter' . a:bang
    else
	let Xgetlist = function('getloclist', [0])
	let Xsetlist = function('setloclist', [0])
	let cmd = ':Lfilter' . a:bang
    endif

    let firstchar = a:searchpat[0]
    let lastchar = a:searchpat[-1:]
    if firstchar == lastchar &&
		\ (firstchar == '/' || firstchar == '"' || firstchar == "'")
	let pat = a:searchpat[1:-2]
	if pat == ''
	    " Use the last search pattern
	    let pat = @/
	endif
    else
	let pat = a:searchpat
    endif

    if pat == ''
	return
    endif

    if a:bang == '!'
	let cond = 'v:val.text !~# pat && bufname(v:val.bufnr) !~# pat'
    else
	let cond = 'v:val.text =~# pat || bufname(v:val.bufnr) =~# pat'
    endif

    let items = filter(Xgetlist(), cond)
    let title = cmd . ' /' . pat . '/'
    call Xsetlist([], ' ', {'title' : title, 'items' : items})
endfunc

com! -nargs=+ -bang Cfilter call s:Qf_filter(1, <q-args>, <q-bang>)
com! -nargs=+ -bang Lfilter call s:Qf_filter(0, <q-args>, <q-bang>)

Anon7 - 2022
AnonSec Team