I know that by typing @@ I execute the last @ command. But can anyone explain what @@ is in the code below (found in the vim help files)?:
function! CountSpaces(type, ...)
let sel_save = &selection
let reg_save = @@
if a:0
silent exe "normal! `<" . a:type . "`>y"
elseif a:type == 'line'
silent exe "normal! '[V']y"
elseif a:type == 'block'
silent exe "normal! `[\<C-V>`]y"
else
silent exe "normal! `[v`]y"
endif
echomsg strlen(substitute(@@, '[^ ]', '', 'g'))
let &selection = sel_save
let @@ = reg_save
endfunction
It appears to be a register, but it isn’t in the list at :help registers. From reading the code I’d guess it is the default register for yanking/deleting? Is this documented anywhere? All my searches just yield the @@ idiom that executes the last @ command.
:help @rgives meSo, @@ will have the value of the text deleted with a
d,c,sorxcommand,or the the text yanked with a
ycommand.