May I suggest adding an editing command with a key binding to Xcode that expands the current selection according to the structure of the code?
This is a very common editing feature in other IDE's and it is a sorely missed in Xcode.
For example:
Intellij: https://www.jetbrains.com/go/guide/tips/expanding-shrinking-selection/
VS Code: https://code.visualstudio.com/docs/getstarted/tips-and-tricks#_shrink-expand-selection