I'm trying to use the feature g<C-A>
in a vimscript function to renumber a visual selection-ed list, but it never does the renumbering.
function! ReNumber()
execute "normal! g$\<C-A>"
endfunction
I've tried incorporating the notion of range as suggested by this and this.
function! ReNumber() range
execute a:firstline .. ',' .. a:lastline .. "normal! g$\<C-A>"
endfunction
I have tried using a remapping for g<C-A>
and it does work, but unsure if I could use the remapped key in my vimscript function
vnoremap <C-H> g<C-A>
How do I use g<C-A>
in my vimscript function, when I call the function on a visually selected chunk of text?
$
? An example of transformation before and after would help to understand what you want to achieve :-)g<C-a>
but you are trying to useg$<C-a>
.<C-a>
in anorm
command based on this.:help
.