Edit: Narrow to Defun

edit.narrowToDefun

Restrict the buffer to the function around the caret.

How to run it

Open the command palette (M-x in the Emacs keymap) and search for Edit: Narrow to Defun, then press Enter. It also has a default keybinding:

Emacs C-xnd

See also