You can do dap
, or vap
, etc to select a paragraph. I want to be able to select/yank/delete the entire file.
One way to do this would be to have:
vnoremap af ggoG$
nnoremap yaf ggVGy
nnoremap daf ggVGd
But is there a way to create a new 'text object selector; (like p
for paragraph, w
for word, etc) but with
f` for 'file? E.g. with omap?
ap
invap
ordap
selects current paragraph - I would like to effectively create a new 'text object selector' (or whatever you would call thep
invap
). I have reworded the title to hopefully be cleaeromap af :normal Vaf<CR> vnoremap af ggoG$