{"id":50765660,"url":"https://github.com/ortus-boxlang/vim-boxlang","last_synced_at":"2026-06-11T13:31:52.098Z","repository":{"id":338201278,"uuid":"1156656378","full_name":"ortus-boxlang/vim-boxlang","owner":"ortus-boxlang","description":"🧑‍💻 NeoVim Support For BoxLang","archived":false,"fork":false,"pushed_at":"2026-02-13T13:10:44.000Z","size":209,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"development","last_synced_at":"2026-03-14T10:46:30.267Z","etag":null,"topics":["boxlang","dynamic","jvm","language","neovim","vi","vim"],"latest_commit_sha":null,"homepage":"https://boxlang.io","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ortus-boxlang.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.YML","license":"license.txt","code_of_conduct":".github/CODE_OF_CONDUCT.MD","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":".github/SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"patreon":"ortussolutions"}},"created_at":"2026-02-12T22:36:47.000Z","updated_at":"2026-02-14T09:43:14.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ortus-boxlang/vim-boxlang","commit_stats":null,"previous_names":["ortus-boxlang/vim-boxlang"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ortus-boxlang/vim-boxlang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ortus-boxlang%2Fvim-boxlang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ortus-boxlang%2Fvim-boxlang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ortus-boxlang%2Fvim-boxlang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ortus-boxlang%2Fvim-boxlang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ortus-boxlang","download_url":"https://codeload.github.com/ortus-boxlang/vim-boxlang/tar.gz/refs/heads/development","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ortus-boxlang%2Fvim-boxlang/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34201840,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boxlang","dynamic","jvm","language","neovim","vi","vim"],"created_at":"2026-06-11T13:31:51.933Z","updated_at":"2026-06-11T13:31:52.092Z","avatar_url":"https://github.com/ortus-boxlang.png","language":"Vim Script","funding_links":["https://patreon.com/ortussolutions"],"categories":[],"sub_categories":[],"readme":"# 📦 VIM BOXLANG\n\nVim syntax highlighting for BoxLang - a dynamic JVM language and runtime.\n\n## 📑 Table of Contents\n\n- [📑 Table of Contents](#-table-of-contents)\n- [📖 Overview](#-overview)\n- [✨ Features](#-features)\n  - [BoxLang Script Syntax (`.bx`, `.bxs`)](#boxlang-script-syntax-bx-bxs)\n  - [BoxLang Template Syntax (`.bxm`)](#boxlang-template-syntax-bxm)\n- [⚡ Installation](#-installation)\n  - [Using lazy.nvim (Lua)](#using-lazynvim-lua)\n  - [Using vim-plug](#using-vim-plug)\n  - [Using Vundle](#using-vundle)\n  - [Using Pathogen](#using-pathogen)\n  - [Manual Installation](#manual-installation)\n  - [NeoVim](#neovim)\n- [📄 File Extensions](#-file-extensions)\n- [⚙️ Manual Filetype Setting](#️-manual-filetype-setting)\n- [🎨 Syntax Highlighting Examples](#-syntax-highlighting-examples)\n  - [Script Example (`.bx`, `.bxs`)](#script-example-bx-bxs)\n  - [Template Example (`.bxm`)](#template-example-bxm)\n- [🚀 BoxLang-Specific Features](#-boxlang-specific-features)\n- [🎨 Customization](#-customization)\n- [📁 Code Folding](#-code-folding)\n- [🔧 Troubleshooting](#-troubleshooting)\n  - [Syntax highlighting not working](#syntax-highlighting-not-working)\n  - [Colors look wrong](#colors-look-wrong)\n- [🤝 Contributing](#-contributing)\n- [📜 License](#-license)\n- [🔗 Related Projects](#-related-projects)\n\n## 📖 Overview\n\n\u003cdiv class=\"text-center\"\u003e\n\u003cimg src=\"vim-boxlang-class.png\"\u003e\n\u003c/div\u003e\n\nThis plugin provides comprehensive syntax highlighting for BoxLang script files (`.bx`, `.bxs`) and template files (`.bxm`). It includes support for:\n\n- **Script Syntax** - Pure BoxLang script with modern language features\n- **Template Syntax** - Markup-based BoxLang with `bx:` tags and HTML\n- **Cross-Syntax Embedding** - Template islands in script files and `\u003cbx:script\u003e` blocks in templates\n\n## ✨ Features\n\n### BoxLang Script Syntax (`.bx`, `.bxs`)\n\n- **Modern Keywords**: `class`, `interface`, `assert`, `final`, `package`, `abstract`, `static`\n- **Control Flow**: `if`, `else`, `for`, `while`, `do`, `switch`, `case`, `try`, `catch`, `finally`\n- **Operators**:\n  - Standard: `+`, `-`, `*`, `/`, `%`, `^`, `\u0026`, `\u0026\u0026`, `||`, `!`\n  - Comparison: `==`, `!=`, `\u003c\u003e`, `\u003e`, `\u003c`, `\u003e=`, `\u003c=`\n  - Strict equality: `===`, `!==`\n  - Elvis operator: `?:`\n  - Bitwise (BoxLang-specific): `b|`, `b\u0026`, `b^`, `b~`, `b\u003c\u003c`, `b\u003e\u003e`, `b\u003e\u003e\u003e`\n- **Functions**:\n  - Arrow functions: `=\u003e`\n  - Lambda functions: `-\u003e`\n  - Static BIF references: `::`\n- **Annotations**: `@name(...)` with complex parameter support\n- **String Interpolation**: `#expression#` within strings\n- **Comments**: `//`, `/* */`, `/** */` (JavaDoc-style)\n- **Component Islands**: Triple backtick template blocks embedded in script\n- **Data Structures**: Arrays, structs, queries\n- **Scopes**: `variables`, `local`, `arguments`, `request`, `session`, `application`, `server`, etc.\n\n### BoxLang Template Syntax (`.bxm`)\n\n- **HTML Support**: Custom lightweight HTML syntax highlighting\n  - Multi-color support: Distinct colors for special tags (`html`, `head`, `body`, `script`, `style`, `link`) vs standard tags\n  - `DOCTYPE` highlighting\n  - Full HTML comments support `\u003c!-- --\u003e`\n  - Integration within BoxLang tags\n- **bx: Tags**: Native BoxLang component tags\n  - Control flow: `\u003cbx:if\u003e`, `\u003cbx:elseif\u003e`, `\u003cbx:else\u003e`, `\u003cbx:for\u003e`, `\u003cbx:while\u003e`, `\u003cbx:switch\u003e`, `\u003cbx:case\u003e`\n  - Output: `\u003cbx:output\u003e`\n  - Functions: `\u003cbx:function\u003e`, `\u003cbx:argument\u003e`, `\u003cbx:return\u003e`\n  - Error handling: `\u003cbx:try\u003e`, `\u003cbx:catch\u003e`, `\u003cbx:finally\u003e`, `\u003cbx:throw\u003e`, `\u003cbx:rethrow\u003e`\n  - Components: `\u003cbx:component\u003e`, `\u003cbx:interface\u003e`, `\u003cbx:property\u003e`\n  - Utility: `\u003cbx:set\u003e`, `\u003cbx:include\u003e`, `\u003cbx:import\u003e`, `\u003cbx:param\u003e`\n  - Advanced: `\u003cbx:lock\u003e`, `\u003cbx:thread\u003e`, `\u003cbx:transaction\u003e`, `\u003cbx:abort\u003e`, `\u003cbx:exit\u003e`\n- **Expression Interpolation**: `#expression#` in text and attributes\n- **Template Comments**: `\u003c!--- ... ---\u003e`\n- **Embedded Script**: `\u003cbx:script\u003e` blocks with full script syntax highlighting\n- **Code Folding**: Automatic folding for tag regions\n\n## ⚡ Installation\n\n### Using [lazy.nvim](https://github.com/folke/lazy.nvim) (Lua)\n\nAdd this to your plugin configuration (e.g., `lua/plugins/boxlang.lua`):\n\n```lua\nreturn {\n  {\n    \"ortus-boxlang/vim-boxlang\",\n    ft = { \"boxlang\", \"boxlangTemplate\" }, -- Optional: lazy load on filetype\n    init = function()\n       -- Any custom configuration here\n    end,\n  }\n}\n```\n\n### Using [vim-plug](https://github.com/junegunn/vim-plug)\n\nAdd to your `.vimrc` or `init.vim`:\n\n```vim\nPlug 'ortus-solutions/vim-boxlang'\n```\n\nThen run:\n\n```vim\n:PlugInstall\n```\n\n### Using [Vundle](https://github.com/VundleVim/Vundle.vim)\n\nAdd to your `.vimrc`:\n\n```vim\nPlugin 'ortus-solutions/vim-boxlang'\n```\n\nThen run:\n\n```vim\n:PluginInstall\n```\n\n### Using [Pathogen](https://github.com/tpope/vim-pathogen)\n\n```bash\ncd ~/.vim/bundle\ngit clone https://github.com/ortus-solutions/vim-boxlang.git\n```\n\n### Manual Installation\n\n1. Clone this repository:\n\n   ```bash\n   git clone https://github.com/ortus-solutions/vim-boxlang.git\n   ```\n\n2. Copy the files to your vim runtime directory:\n\n   ```bash\n   cp -r vim-boxlang/syntax ~/.vim/\n   cp -r vim-boxlang/ftdetect ~/.vim/\n   ```\n\n### NeoVim\n\nFor NeoVim, use the same installation methods but replace `~/.vim` with:\n\n- Linux/macOS: `~/.config/nvim`\n- Windows: `~/AppData/Local/nvim`\n\n## 📄 File Extensions\n\nThe plugin automatically detects and applies syntax highlighting based on file extensions:\n\n- **`.bx`** - BoxLang script class/component files → Uses `boxlang` syntax\n- **`.bxs`** - BoxLang script files (executable) → Uses `boxlang` syntax\n- **`.bxm`** - BoxLang template/markup files → Uses `boxlangTemplate` syntax\n\n## ⚙️ Manual Filetype Setting\n\nIf automatic detection doesn't work, you can manually set the filetype:\n\n```vim\n\" For script files\n:setfiletype boxlang\n\n\" For template files\n:setfiletype boxlangTemplate\n```\n\nOr add to your file:\n\n```boxlang\n// For .bx/.bxs files, add at the top:\n// vim: set filetype=boxlang:\n```\n\n```html\n\u003c!--- For .bxm files, add at the top: ---\u003e\n\u003c!--- vim: set filetype=boxlangTemplate: ---\u003e\n```\n\n## 🎨 Syntax Highlighting Examples\n\n### Script Example (`.bx`, `.bxs`)\n\n```boxlang\n/**\n * BoxLang class example with modern syntax\n */\n@Component\nclass UserService {\n\n    property String name;\n    property Number age;\n\n    public function init() {\n        this.name = \"BoxLang\";\n        return this;\n    }\n\n    /**\n     * Get user with arrow function\n     */\n    public function getUser() =\u003e {\n        return {\n            name: this.name,\n            age: this.age,\n            active: true\n        };\n    }\n\n    // Lambda function\n    public function filter(array data) {\n        return data.filter((item) -\u003e item.active === true);\n    }\n\n    // Bitwise operations\n    public function bitwiseExample() {\n        var flags = 5 b| 3;  // Bitwise OR\n        return flags b\u0026 1;    // Bitwise AND\n    }\n}\n```\n\n### Template Example (`.bxm`)\n\n```html\n\u003c!--- BoxLang template example ---\u003e\n\u003cbx:output\u003e\n    \u003ch1\u003eWelcome to #variables.appName#!\u003c/h1\u003e\n\n    \u003cbx:if condition=\"user.isLoggedIn()\"\u003e\n        \u003cp\u003eHello, #user.getName()#\u003c/p\u003e\n    \u003cbx:else\u003e\n        \u003cp\u003ePlease log in\u003c/p\u003e\n    \u003c/bx:if\u003e\n\n    \u003cbx:for array=\"#items#\" index=\"i\" item=\"item\"\u003e\n        \u003cdiv class=\"item-##i##\"\u003e\n            #item.name#\n        \u003c/div\u003e\n    \u003c/bx:for\u003e\n\u003c/bx:output\u003e\n\n\u003cbx:script\u003e\n    // Embedded script with full syntax highlighting\n    function loadData() {\n        var data = queryExecute(\"SELECT * FROM users\");\n        return data;\n    }\n\u003c/bx:script\u003e\n```\n\n## 🚀 BoxLang-Specific Features\n\nThis syntax file is specifically designed for **BoxLang**, not CFML/ColdFusion. Key differences:\n\n- Uses `bx:` prefix for tags (not `cf`)\n- Highlights `class` keyword (BoxLang native, vs CFML's `component`)\n- Supports bitwise operators (`b|`, `b\u0026`, `b^`, `b~`, `b\u003c\u003c`, `b\u003e\u003e`, `b\u003e\u003e\u003e`)\n- Strict equality operators (`===`, `!==`)\n- Arrow functions (`=\u003e`) and lambda functions (`-\u003e`)\n- `assert` statement\n- `castas` operator\n- Modern keywords: `final`, `package`, `interface` as first-class\n\nA separate CFML syntax file is available for ColdFusion compatibility mode.\n\n## 🎨 Customization\n\nYou can customize the highlighting by adding to your `.vimrc`:\n\n```vim\n\" Example: Change keyword color\nhi boxlangKeyword ctermfg=cyan guifg=#00ffff\n\n\" Example: Change string color\nhi boxlangStringSingle ctermfg=green guifg=#00ff00\nhi boxlangStringDouble ctermfg=green guifg=#00ff00\n\n\" Example: Customize operator color\nhi boxlangOperator ctermfg=yellow guifg=#ffff00\n\n\" Example: Make bitwise operators stand out\nhi boxlangBitwiseOp ctermfg=magenta guifg=#ff00ff\n```\n\n## 📁 Code Folding\n\nThe syntax files include folding support for major code blocks:\n\n```vim\n\" Enable folding in your .vimrc\nset foldenable\nset foldmethod=syntax\nset foldlevelstart=10\n\n\" Toggle fold with 'za'\n\" Open all folds with 'zR'\n\" Close all folds with 'zM'\n```\n\nFolds are automatically created for:\n\n- Classes and interfaces\n- Functions\n- Control structures (`if`, `for`, `while`, `switch`, `try`)\n- Tag regions in templates\n\n## 🔧 Troubleshooting\n\n### Syntax highlighting not working\n\n1. Verify filetype is set correctly:\n\n   ```vim\n   :set filetype?\n   ```\n\n2. Check if syntax is enabled:\n\n   ```vim\n   :syntax on\n   ```\n\n3. Reload the syntax file:\n\n   ```vim\n   :syntax clear\n   :edit\n   ```\n\n### Colors look wrong\n\nEnsure your color scheme supports the standard vim highlight groups. You can test with a built-in scheme:\n\n```vim\n:colorscheme desert\n:colorscheme murphy\n```\n\n## 🤝 Contributing\n\nContributions are welcome! Please:\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Test with various BoxLang files\n5. Submit a pull request\n\n## 📜 License\n\nApache 2.0 - See LICENSE file for details.\n\n## 🔗 Related Projects\n\n- [BoxLang](https://boxlang.io) - Official BoxLang website\n- [BoxLang Runtime](https://github.com/ortus-solutions/boxlang) - BoxLang runtime and compiler\n- [VSCode BoxLang](https://marketplace.visualstudio.com/items?itemName=ortus-solutions.vscode-boxlang) - BoxLang extension for VS Code\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fortus-boxlang%2Fvim-boxlang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fortus-boxlang%2Fvim-boxlang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fortus-boxlang%2Fvim-boxlang/lists"}