A collection of Visual Studio Code snippets designed to speed up object and route development for OpenBVE. Supports .csv (Object & Route), .b3d, and .animated formats.
- Comprehensive: Covers basic to advanced commands (MeshBuilder, Vertex, Face, Track, Signals, etc.).
- Smart Placeholders: Quickly fill in coordinates, colors, and textures without manual typing.
- Doc-Aligned: Descriptions are based on the official OpenBVE Hugo Documentation.
- 4x Blocks: Insert 4 vertices or 4 faces at once with automatically sequenced numbering.
- Valid JSON: Pre-validated and ready to use in VS Code.
Best if you want the snippets to be always available.
- Open VS Code.
- Go to File > Preferences > Configure User Snippets.
- Select New Global Snippets file... for each format:
- Name it
openbve-csv.code-snippets, then paste the content ofOpenbveCSV.code-snippet. - Name it
openbve-route.code-snippets, then paste the content ofOpenbveRoute.code-snippet. - Repeat for B3D and Animated formats.
- Name it
- Tip: You can also merge all snippet contents into a single global file.
The fastest way if you don't want to copy-paste.
- Create a folder named
.vscodein your project root. - Copy all
.code-snippetfiles from this repo into that folder. - Snippets will be automatically detected by VS Code.
- 4x Commands: Use prefixes like
vexx(4 Vertex) oraff(4 Face) for faster building. PressTABto move between fields. - Smart Scoping: Add
"scope": "csv"inside your global snippet file to restrict them to CSV files only. - Language Association: Add this to your
settings.jsonso VS Code recognizes OpenBVE formats:"files.associations": { "*.csv": "csv", "*.b3d": "plaintext", "*.animated": "plaintext" }
Kumpulan snippet Visual Studio Code untuk mempercepat pembuatan objek dan route di OpenBVE. Mendukung format .csv (Object & Route), .b3d, dan .animated.
- Lengkap: Mencakup perintah dasar hingga lanjut (MeshBuilder, Vertex, Face, Track, Sinyal, dll).
- Placeholder Pintar: Memudahkan pengisian koordinat, warna, dan tekstur tanpa perlu ngetik manual.
- Sesuai Dokumentasi: Deskripsi perintah diambil langsung dari dokumentasi resmi OpenBVE Hugo.
- Blok 4x: Masukkan 4 vertex atau 4 face sekaligus dengan penomoran otomatis yang sudah urut.
- Valid JSON: Struktur file sudah benar dan siap digunakan di VS Code.
Cocok kalau kamu ingin snippet ini selalu aktif di VS Code.
- Buka VS Code.
- Pilih menu File > Preferences > Configure User Snippets.
- Pilih New Global Snippets file... untuk setiap format:
- Buat nama
openbve-csv.code-snippets, lalu copy isi dariOpenbveCSV.code-snippet. - Buat nama
openbve-route.code-snippets, lalu copy isi dariOpenbveRoute.code-snippet. - Lakukan hal yang sama untuk format B3D dan Animated.
- Buat nama
- Tip: Kamu juga bisa menggabungkan semuanya ke dalam satu file global saja.
Cara paling cepat kalau kamu tidak mau repot copy-paste isi file.
- Buat folder bernama
.vscodedi dalam folder project kamu. - Copy semua file
.code-snippetdari repo ini ke dalam folder tersebut. - Snippet akan otomatis aktif saat kamu mengerjakan project di folder itu.
- Command 4x: Pakai prefix seperti
vexx(untuk 4 Vertex) atauaff(untuk 4 Face). TekanTABuntuk pindah antar kolom. - Filter Bahasa (Scope): Tambahkan
"scope": "csv"di dalam file snippet global agar hanya muncul di file CSV. - Asosiasi File: Tambahkan setting ini di
settings.jsonVS Code kamu:"files.associations": { "*.csv": "csv", "*.b3d": "plaintext", "*.animated": "plaintext" }