Besides type in cmdline directly, I also use
vnoremap <F2> :<c-u>exec join(getline("'<","'>"),"\n")<CR>
nnoremap <F2> :exec getline(".")<CR>
nnoremap <F3> :.w !sed 's/\r$// ; s/^\s*\$\s*\(.*\)\s*/\1/' \|bash -o pipefail<CR>
to run vim/shell command in current buffer. eg,
<F2>
to run current line as vim command.<F3>
to run current line as shell command.4<F3>
to run curent line and 3 lines below it as shell command.
So how can I disable expansion of %
,
- at cmdline, eg
:!awk 'BEGIN { print 4 % 3} '
exec
+getline()
s/%/\\%/g
when multiple ones.