# Code navigation
> The editor resolves every name in your query (CTEs, aliases, columns, tables), so it can jump to where a thing is defined, list every place it's used, rename it everywhere at once, and tell you what it is when you hover.
Source: https://docs.querylab.io/writing-sql/code-navigation/
**hover a column**
```sql
WITH failed_tests AS (
SELECT
«hl:vehicle_id»,
make,
completed_date
FROM `ace-analytics.warehouse.fact_mot_test`
WHERE test_result = 'FAILED'
)
SELECT f.vehicle_id, f.make
FROM failed_tests AS f
```
## Keyboard shortcuts
| Action | Keys | Also |
| ---------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| Go to Definition | `F12` | ⌘-click (Ctrl-click on Windows and Linux); right-click → Go to Definition |
| Go to References | `⇧ F12` (`Shift F12` on Windows and Linux) | right-click → Go to References |
| Rename Symbol | `F2` | right-click → Rename Symbol |
| Peek Definition | `⌘ F12` (`Ctrl F12` on Windows and Linux) | |
Go to Definition only appears in the right-click menu when the cursor is on a name the editor can resolve.
## Go to Definition
What happens depends on what the name is:
- A name defined in the query (a CTE, a table or column alias, a temp table, a pipe-syntax alias, a graph variable or label): the cursor moves to the definition. `F12` again on an alias declaration goes on to the CTE or table behind it.
- A schema table or column: opens the table in the schema tree (for a column, its Schema tab with that column highlighted). A table you can't access shows a warning.
- A function or a `DECLARE` variable: nothing.
Works the same in dbt and Dataform files; inside a Jinja expression nothing resolves.
## Go to References
`⇧`
`F12` (`Shift`
`F12` on Windows and Linux) opens the references peek under the line:
every occurrence, definition included, click to jump.
```sql
WITH user_stats AS (
SELECT user_id, COUNT(*) AS n
FROM `ace-analytics.warehouse.events`
GROUP BY user_id
)
SELECT * FROM «hl:user_stats»
UNION ALL
SELECT * FROM user_stats
```
Go to References on user_stats lists three locations: the definition and both FROM clauses.
References are found for CTEs, table aliases, column aliases, temp tables, pipe aliases, graph variables, and schema columns (every use of `vehicle_id` from that table, qualified or not). For a CTE the list also includes its aliases and their `alias.column` uses. Schema tables and functions have no reference search.
## Rename
`F2` on a CTE, a table alias, a column alias, a temp table, a pipe
alias or a graph variable renames the definition and every reference in the
current editor. A CTE rename leaves aliases pointing at it alone (`FROM
failed_tests AS f` keeps `f`).
Schema tables, schema columns, functions and query parameters can't be renamed; `F2` on them does nothing, silently.
## Hover
Every resolvable identifier shows a **Property / Value** card: type, source and nullability for a column; row count, partitioning, clustering and a column list for a table; the defining line for a CTE; parameters and return type for a function.
**hover a table**
```sql
SELECT vehicle_id, completed_date
FROM «hl:`ace-analytics.warehouse.fact_mot_test`»
```
MOT test fact table.
mot_test_id: STRING · vehicle_id: STRING · completed_date: DATE ·
completed_timestamp: TIMESTAMP · expiry_date: DATE? · test_result: STRING
When [column lineage](https://docs.querylab.io/writing-sql/lineage/) knows the position, the card gains _Derives from_ and _Side inputs_ rows. Signature help for functions is covered in [auto-completions](https://docs.querylab.io/writing-sql/auto-completions/#functions-and-signature-help).
## Inlay hints
Gray annotations in the code, no hover needed:
```sql
SELECT make, test_result, COUNT(*) AS tests
FROM `ace-analytics.warehouse.fact_mot_test` AS t
JOIN `ace-analytics.warehouse.dim_vehicle` AS v USING (vehicle_id)
GROUP BY 1, 2
ORDER BY 3 DESC ← tests
```
- `GROUP BY 1`, `ORDER BY 2`, `PARTITION BY 1` → `← column` after the number (alias if there is one, else the expression).
- `GROUP BY ALL` → `← make, test_result`, the columns it will group by.
- Unqualified columns in a query with JOINs → `[t.]` before the column, so you can see which table it came from.
- `ROWS BETWEEN 2 PRECEDING AND CURRENT ROW` → `← 3 rows total`.
- `-- querylab:tablesample=1` → ` TABLESAMPLE 1%` after each table that will be sampled; see [TABLESAMPLE](https://docs.querylab.io/writing-sql/tablesample/).
- In dbt and Dataform files, the compiled table name after `ref()`, `source()`, `resolve()`.
Settings → Editor → SQL Editor → Inlay Hints (also listed under [Settings](https://docs.querylab.io/settings/#sql-editor)):
- Show column position hints (selected): Display which column a GROUP BY, ORDER BY, or PARTITION BY position number refers to (e.g., ← user_id)
- Show table & window hints (selected): Display the source table for ambiguous JOIN columns, and the total row count for window frames
- Show variable types: Display inferred types for columns and variables (e.g., : INT64)
The dbt and Dataform hints have their own switches under Settings → SQL Frameworks.