General
- Enable/disable features globally; toggle quick actions in the Command Palette.
How to install, configure, and use RDF editing in VS Code with real-time validation, autocompletion, prefix refactoring, and triple-management. The demos are in GIFs — click any to enlarge.
rdfusion-x.y.z.vsix
.
The extension activates automatically when you open a
.ttl
(Turtle) or .jsonld
(JSON-LD)
file.
.ttl
or .jsonld
file.
foaf:
) or start
authoring a triple. Autocomplete and validation appear as you
type.
RDFusion exposes settings in File → Preferences → Settings (search “RDFusion”) or via settings.json. Configurations are also available through the Command Palette.
As you edit, the extension checks syntax, other restrictions enabled, and SHACL constraints and shows inline diagnostics.
Syntax errors and warnings are underlined as you type, with details shown inline.
If your workspace contains SHACL shapes, they are applied automatically if enabled.
Use Command-Palette or Settings to enable/disable checks. Basic parsing errors are prioritized; deeper checks run when syntax is corrected.
See Configuration & Settings to enable/disable validations.
@prefix ex: <http://example.org/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
ex:Homer a foaf:Person ;
foaf:name "Homer Simpson" ;
foaf:age 39 .
ex:Bart a foaf:Person ;
foaf:name "Bart Simpson" .
@prefix ex: <http://example.org/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
ex:PersonShape a sh:NodeShape ;
sh:targetClass foaf:Person ;
sh:property [
sh:path foaf:name ;
sh:minCount 1 ;
sh:message """At least one name is
required for a person."""@en ;
] ;
sh:property [
sh:path foaf:age ;
sh:minCount 1 ;
sh:datatype xsd:integer ;
sh:message """Age is required and
must be an integer."""@en ;
] .
prefix:
(e.g.,
foaf:
) shows terms.
@context
or a compact IRI
shows terms and ensures prefixes are declared.
Terms come from your open files and remote vocabularies (e.g., FOAF via direct derefrencing / or LOV). Remote results are cached.
Suggestions inside triples, prefix declarations, and JSON-LD contexts.
Accepting a completion for an undeclared prefix auto-adds
@prefix
(Turtle) or a context entry (JSON-LD).
Compact IRIs across your JSON-LD file. The refactor updates
@context
and rewrites matches.
Disable remote lookups when offline, and adjust auto-declare options in Settings.
@prefix ex: <http://example.org/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
ex:Homer a foaf:Person ;
foaf:name "Homer Simpson" ;
foaf:age 39 .
{
"@context": {
"ex": "http://example.org/",
"foaf": "http://xmlns.com/foaf/0.1/"
},
"@id": "ex:Homer",
"@type": "foaf:Person",
"foaf:name": "Homer Simpson",
"foaf:age": 39
}
Use Command Palette → RDFusion: Filter Triples by … to generate a new tab view containing only matching triples.
Group by Subject groups triples under their subject; Sort Triples orders triples for cleaner look.
Use RDFusion: Format Document to apply consistent indentation, prefix mapping, ... .
Toggle visual shortening for long IRIs (e.g.,
http://example.org/.../Concept
). This improves
readability without changing file content.
Select multiple RDF files and run RDFusion: Merge Files. The result is a single grouped Turtle document opened in a new tab.
Compare current open turtle file with HEAD or a specific commit in Git. The diff view compares RDF-aware changes.
Run RDFusion: Generate VoID Description to compute counts (triples, distinct subjects/objects, classes) and output a VoID Turtle in a new tab.