Commands
Query execution and editing commands (:TD, :TDO, :TDE, :TDV, :TDM, :TDMV, :TDF, :TDFF, :TDCodeAction) are buffer-local to buffers with filetype teradata.
Global utilities (:TDH, :TDR, :TDHelp, :TDU, :TDS, :TDB, :TDJ, :TDSync, :TDRerun) are available across any buffer.
Several commands accept an optional count [N] (defaults to 1). For example, :3TDO runs the statement under the cursor plus the next 2 statements.
Query execution
| Command |
Description |
:[N]TD |
Syntax-check the current statement plus the next N-1 statements using Tree-sitter node boundaries. No execution. |
:[range]TDE |
Syntax-check the visual selection (split on ;). |
:[N]TDO |
Run the current statement plus the next N-1 statements via BTEQ and display results in a split. Respects retlimit. |
:[range]TDV |
Run statements of the visual selection (split on ;) and display results. Visual equivalent of :TDO. |
:[N]TDM |
Multistatement execution: send current statement plus next N-1 statements as a single BTEQ job. Useful for transactions. |
:[range]TDMV |
Multistatement run for the visual selection submitted as one BTEQ job. |
:TDRerun |
Re-run the most recent query exactly as sent. Creates a new BTEQ job and updates or re-opens the result grid. Bound to g. in SQL buffers and . in result buffers. |
History & search
| Command |
Description |
:TDH |
Open the query history buffer. Browse past runs; press <CR> to open a query and its results side-by-side. |
:TDR |
Search through past queries by content. Requires ripgrep, bat, and a supported picker (fzf-lua, snacks, telescope, fzf.vim, or native). |
Bookmarks
| Command |
Description |
:TDB |
Open the bookmark manager to browse and run saved snippets (global and per-user). |
:[range]TDBAdd |
Save the visual selection as a new bookmark. Prompts for name and scope. |
Jobs
| Command |
Description |
:TDJ |
Open the Jobs Manager: a live view of in-flight and completed BTEQ jobs. Press <CR> to jump to job output/log. |
| Command |
Description |
:[N]TDF |
Reformat the current statement plus next N-1 statements using the built-in Tree-sitter formatter (experimental). |
:TDFF |
Reformat every statement in the current buffer (experimental). |
:TDCodeAction |
Open code actions at cursor position (e.g. rename alias, expand *, toggle column qualification). |
| Command |
Description |
:TDSync |
Build or refresh the local metadata index (databases, tables, columns) used for autocompletion. |
:TDU |
Open the user profile manager (switch active connection, add or delete profiles). |
:TDS |
Open the settings manager (interactively adjust retlimit, filter_db, and replacements). |
:TDHelp |
Open the quick reference cheat sheet in a split window. |
:checkhealth vim-teradata |
Inspect configuration and verify TTU binaries, Tree-sitter parser, and connection profiles. |