I am looking at a scenario where in order to keep track of changes to my setup, rather than delete functions and keymaps defined in
vimrc or other plugin I add commands which disable those functions and keymaps further down the execution sequence.
For example in the example below how would undo the mapping of the
<cr> key and
undefine the function like it was never created in the first place?
cnoremap <silent> <cr> <cr>:call <SID>CommandCallback()<cr> function! s:CommandCallback() let last_command = @: if last_command =~ 'tabnew' echomsg "Tabnew was called" endif endfunction
:Disarmfunction which try to do what you're looking for.