Skip to content

Instantly share code, notes, and snippets.

@romainl
romainl / ccr.vim
Last active November 9, 2024 21:06
Make various list-like commands more intuitive
" Background here: https://gist.github.com/romainl/047aca21e338df7ccf771f96858edb86
" with help from https://github.com/teoljungberg
function! CCR()
let cmdline = getcmdline()
let filter_stub = '\v\C^((filt|filte|filter) .+ )*'
command! -bar Z silent set more|delcommand Z
if getcmdtype() !~ ':'
return "\<CR>"
endif