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.
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.
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
Add
Plug 'thesis/vim-solidity', { 'branch': 'main' }to the configuration file.Run
:PlugInstallin 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.
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
Add the documented
solidity_foldingaugroup andFileType soliditysetting withfoldmethod=syntaxto the configuration file.Open a Solidity file and use
zcto close a fold orzoto 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.
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

