Photo by rawpixel / Unsplash

Background

因為目前 vim default 還沒 support solidity 的 color. 變成我有時候在寫程式時蠻痛苦的. 剛好發現有這個plugin. 所以立馬來安裝並且記錄一下.

Install Vundle

$ sudo apt-get install git curl
$ git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle

vimrc

/usr/share/vim/vimrc

把下列的設定貼到 vimrc 開頭中

set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" alternatively, pass a path where Vundle should install plugins
"let path = '~/some/path/here'
"call vundle#rc(path)

" let Vundle manage Vundle, required
Plugin 'gmarik/vundle'

filetype plugin indent on     " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList          - list configured plugins
" :PluginInstall(!)    - install (update) plugins
" :PluginSearch(!) foo - search (or refresh cache first) for foo
" :PluginClean(!)      - confirm (or auto-approve) removal of unused plugins
"
" see :h vundle for more details or wiki for FAQ
" NOTE: comments after Plugin commands are not allowed.
" Put your stuff after this line

完成後在 Vim 中執行 :PluginInstall 安裝 vimrc 中所設定的 plugins

Install vim-solidity

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

Add the following line to your ~/.vimrc:

Plugin 'tomlion/vim-solidity'

完成後在 Vim 中執行 :PluginInstall 安裝 vimrc 中所設定的 plugins. 這樣則大功告成.

Reference