Sublime Forum

Shell Script (Bash) <F12> jump to variable declaration location

#1

Handy are the jumps to declarations of functions in Sublime Text build 3126.

Why not have this functionality to jump to location where variables are declared?

Example:
$EFI_LABEL -> jump to ->

  1. readonly EFI_LABEL or
  2. declare EFI_LABEL or
  3. first occurence of EFI_LABEL=
0 Likes

#2

It’s a little more work, but you can press CTRLP and type @variable: to browse through all the variables in the view.

I’m not sure exactly how “goto definition” works, but I’m pretty certain it searches for an entity.name scope with the same name. Variable assignments in Bash receive variable.other.readwrite.assignment instead.

0 Likes