Skip to content

hbarcelos/vim-solidity

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vim-solidity

Yet another maintained syntax Solidity, the smart contract programming language for Ethereum.

Heavily inspired by thesis/vim-solidity.

Main Changes

  • Add support for some missing Solidity features
    • unchecked { ... } blocks
    • receive and fallback functions
    • Numeric separators
  • Improve import syntax highlighting
  • Improve pragma syntax highlighting
  • Use heuristic for user-defined types
  • Use saner highlights for contract, interface, library and struct
  • Highlight function and event names on definition
  • Use special colors for Solidity global variables and builtin functions

before-after-1 Before / After

before-after-2 Before / After

before-after-3 Before / After

before-after-4 Before / After

Known Issues

  • Folding is not working properly in all cases.

Installation

Vim Plug

Add the following line to your ~/.vimrc:

Plug 'thesis/vim-solidity'

Vundle

Add the following line to your ~/.vimrc:

Plugin 'thesis/vim-solidity'

Pathogen

Run the following command:

git clone https://github.com/hbarcelost/vim-solidity.git ~/.vim/bundle/vim-solidity

No Plugin Manager

Copy all of the files manually into your ~/.vim.

Configuration

augroup solidity_folding
    au!
    au FileType solidity setlocal foldmethod=syntax
augroup END

Will enable Solidity code-folding based on the included syntax file. This might have an impact on editing performance.

About

Syntax highlighting for Solidity in Vim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 100.0%