vlang(9)vlang - V programming language
hkvlang.emf - V programming language hook definition
vlang.eaf - V programming language abbreviation file
vlang.etf - V programming language template file
.v - V-lang
The vlang file type templates share much with the c(9) template definitions, utilising the electric 'C' features for automatic layout of text.
General Editing
Hilighting
Auto Layout
restyle-region(3) and restyle-buffer(3) are available to reformat (re-layout) selected sections of the buffer, or the whole buffer, respectively.
Comments may be formatted using esc o, which reformats the comments according to the current fill paragraph. If a comment commences with /***... then the comment is automatically formatted to a box.
Folding and Information Hiding
Navigation via Item List
Abbreviations
Working Environment
Short Cuts
C-c C-c - Comment out the current line.
C-c C-d - Uncomment the current line.
C-c C-e - Comment to the end of the line with stars (*).
A-C-i - Restyle the current region.
esc q - Format a comment.
esc o - Format a comment.
f2 - (Un)fold the current region.
C-f2 - (Un)fold all regions.
f6 - List items.
esc f6 - Close item list,
Executing, Formatting and Linting V Code
The hilighting or the addition of new item list matches is typically extended using a file myvlang.emf.
As this language shares the same extension (.v) as Verilog files there can be a conflict between these two major-modes. MicroEmacs attempts to detect which major mode to use based on the content of the file, but this can go wrong. The best solution to this problem is to add a file content identifier, i.e. add a line like the following to one of the first 2 lines of the file:
// -*- vlang -*-
Alternatively, if there are no verilog files and you do not wish to edit them, add the following function to your myvlang.emf file:
define-macro ftest-vlang set-variable .result 100 !emacro
This will ensure all .v files, without a content identifier, will have vlang major-mode applied.
major-mode(2), abbrev-list(3), c(9), collapse-all(3), collapse-current(3), compile(3), expand-abbrev-handle(3), file-exec(3), file-format(3), file-lint(3), item-list(3), restyle-buffer(3), restyle-region(3), time(2m).
(c) Copyright JASSPA 2026
Last Modified: 2026/01/18
Generated On: 2026/01/31