Up: Semantic mode   [Contents][Index]

2.1.1 Semantic mode user commands

Semantic mode provides a number of commands for navigating, querying, and editing source code in a language-aware manner. These commands generally act on tags, which are the source-code units deemed “important” by the present programming language (e.g., functions in the C programming language).

These commands may be used in any buffer that has been parsed by Semantic. Several of them prompt for a tag name using the minibuffer; here, the TAB key can be used to complete tag names. Others act on the current tag, meaning the tag at (or around) point.

C-c , j

Prompt for a tag defined in the current file, and move point to it (semantic-complete-jump-local).

C-c , J

Prompt for a tag defined in any file that Emacs has parsed, and move point to it (semantic-complete-jump).

C-c , l

Display a list of the possible completions of the current tag (semantic-analyze-possible-completions).

C-c , g

Prompt for a tag, and display a list of tags that call it (semantic-symref-symbol). This relies on the presence of an external symbol reference tool. See SymRef.

C-c , G

Display a list of tags that call the current tag (semantic-symref). This relies on the presence of an external symbol reference tool. See SymRef.

C-c , p

Move point to the previous tag (senator-previous-tag).

C-c , n

Move point to the next tag (senator-next-tag).

C-c , u

Move point “up” one reference (senator-go-to-up-reference). The meaning of “up” is language-dependent; in C++, for instance, this means moving to the parent of the current tag.

C-c , SPC

Display a list of possible completions for the symbol at point (semantic-complete-analyze-inline). This also activates a special set of keybindings for choosing a completion: RET accepts the current completion, M-n and M-p cycle through possible completions, TAB completes as far as possible and then cycles, and C-g or any other key aborts the completion. See Smart Completion.

C-c , C-w

Kill the current tag (senator-kill-tag). This removes the text for that tag, placing it in the kill ring. You can retrieve the text with C-y. This also places the tag in the tag ring, so that you can yank it with \C-c,\C-y, below.

C-c , M-w

Copy the current tag into the kill ring as well as the tag ring (senator-copy-tag).

C-c , C-y

Yank a tag from the tag ring (senator-yank-tag).

C-c , r

Copy the current tag into a register (senator-copy-tag-to-register). With an optional argument, kill it as well. This allows you to insert or jump to that tag with the usual register commands. See Registers in Emacs manual.

C-c , up

Transpose the current tag with the previous one (senator-transpose-tags-up).

C-c , down

Transpose the current tag with the next one (senator-transpose-tags-down).

Up: Semantic mode   [Contents][Index]