OpenViSTAI · Agents · Blockchain · Crypto
Menu
Developer Tools

Vim Solidity

Vim Solidity is a Vim Script plugin that adds Solidity syntax highlighting, context-aware indentation and code folding to Vim and Neovim. It also highlights NatSpec comments and Yul assembly, and recognizes Foundry test and script file naming patterns.

Independent OpenViST project profile, based on linked sources.

Vim Solidity — OpenViST project profile in Developer Tools.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when you want Solidity-aware editing support in Vim or Neovim, particularly for syntax highlighting, indentation and folding. Pair it with an LSP client and Solidity language server if you also need IDE functions such as go-to-definition or hover.

Who it is for

  • Solidity developers who edit smart-contract source in Vim or Neovim.
  • Developers working with Solidity contracts, NatSpec comments, Yul assembly or Foundry-named test and script files.

Documented uses

  • Recognize Solidity keywords and language constructs while editing contract files.
  • Keep indentation aligned with Solidity functions, contracts and blocks.
  • Collapse and reopen contracts, functions and assembly blocks.
  • Distinguish Foundry `.t.sol` test files and `.s.sol` script files from regular `.sol` files.
Before you choose

Requirements & limits

The repository identifies the plugin as MIT-licensed and documents support for Vim 8.0 or later and Neovim. It describes the plugin as having no external dependencies.

  • The documented Solidity range is 0.8.0 through 0.8.24 and later, with backward compatibility for 0.7.x.
  • Installation instructions cover vim-plug, Vundle, Pathogen, native Vim packages and lazy.nvim.
  • The plugin focuses on syntax, indentation and folding; it does not include LSP features, linting, completion or compiler integration.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install Vim Solidity with vim-plug

Add the plugin through vim-plug so Vim or Neovim can load its Solidity editing support.

Before you start

  • Vim 8.0 or later, or Neovim.
  • vim-plug installed.
  • Access to the Vim configuration file: ~/.vimrc or ~/.config/nvim/init.vim.

Steps

  1. Add Plug 'thesis/vim-solidity', { 'branch': 'main' } to the configuration file.

  2. Run :PlugInstall in Vim or Neovim.

Expected outcome

The plugin is installed through vim-plug and provides Solidity syntax highlighting, indentation and code folding.

Guide limitations

  • The plugin does not provide LSP features, linting, code completion or compiler integration.
Source-based practical guide

Enable syntax-based Solidity folding

Configure Vim or Neovim to use the plugin's Solidity syntax folds.

Before you start

  • Vim Solidity installed.
  • Access to the Vim configuration file.

Steps

  1. Add the documented solidity_folding augroup and FileType solidity setting with foldmethod=syntax to the configuration file.

  2. Open a Solidity file and use zc to close a fold or zo to open one.

Expected outcome

Syntax folds can be used for Solidity constructs, including contracts, functions and assembly blocks.

Guide limitations

  • This guide configures folding only; it does not set up compilation or language-server features.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
13 October 2026
Original website title
thesis/vim-solidity · Official homepage title · retained in its source language