diff options
-rw-r--r-- | .github/CODEOWNERS | 3 | ||||
-rw-r--r-- | runtime/ftplugin/solidity.vim | 15 | ||||
-rw-r--r-- | runtime/indent/solidity.vim | 14 | ||||
-rw-r--r-- | runtime/syntax/solidity.vim | 10 |
4 files changed, 32 insertions, 10 deletions
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 03c269cf14..213b9af868 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -210,6 +210,7 @@ runtime/ftplugin/scss.vim @tpope runtime/ftplugin/sdoc.vim @gpanders runtime/ftplugin/sed.vim @dkearns runtime/ftplugin/sh.vim @dkearns +runtime/ftplugin/solidity.vim @cothi runtime/ftplugin/solution.vim @dkearns runtime/ftplugin/spec.vim @ignatenkobrain runtime/ftplugin/ssa.vim @ObserverOfTime @@ -299,6 +300,7 @@ runtime/indent/sass.vim @tpope runtime/indent/scala.vim @derekwyatt runtime/indent/scss.vim @tpope runtime/indent/sh.vim @chrisbra +runtime/indent/solidity.vim @cothi runtime/indent/systemverilog.vim @Kocha runtime/indent/tcl.vim @dkearns runtime/indent/tcsh.vim @dkearns @@ -470,6 +472,7 @@ runtime/syntax/sdoc.vim @gpanders runtime/syntax/sed.vim @dkearns runtime/syntax/sh.vim @cecamp runtime/syntax/sm.vim @cecamp +runtime/syntax/solidity.vim @cothi runtime/syntax/spec.vim @ignatenkobrain runtime/syntax/sqloracle.vim @chrisbra runtime/syntax/squirrel.vim @zenmatic diff --git a/runtime/ftplugin/solidity.vim b/runtime/ftplugin/solidity.vim new file mode 100644 index 0000000000..abe9f2ff26 --- /dev/null +++ b/runtime/ftplugin/solidity.vim @@ -0,0 +1,15 @@ +" Vim filetype plugin file +" Language: Solidity +" Maintainer: Cothi (jiungdev@gmail.com) +" Original Author: tomlion (https://github.com/tomlion/vim-solidity) +" Last Change: 2022 Sep 27 +" 2023 Aug 22 Vim Project (did_ftplugin, undo_ftplugin) + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +setlocal commentstring=//\ %s + +let b:undo_ftplugin = "setlocal commentstring<" diff --git a/runtime/indent/solidity.vim b/runtime/indent/solidity.vim index caed726c0a..55a07c015a 100644 --- a/runtime/indent/solidity.vim +++ b/runtime/indent/solidity.vim @@ -1,9 +1,11 @@ " Vim indent file -" Language: Solidity -" Acknowledgement: Based off of vim-javascript -" Maintainer: Cothi (jiungdev@gmail.com) -" Original Author: tomlion (https://github.com/tomlion/vim-solidity) -" Last Changed: 2022 Sep 27 +" Language: Solidity +" Maintainer: Cothi (jiungdev@gmail.com) +" Original Author: tomlion (https://github.com/tomlion/vim-solidity) +" Last Change: 2022 Sep 27 +" 2023 Aug 22 Vim Project (undo_indent) +" +" Acknowledgement: Based off of vim-javascript " " 0. Initialization {{{1 " ================= @@ -20,6 +22,8 @@ setlocal nosmartindent setlocal indentexpr=GetSolidityIndent() setlocal indentkeys=0{,0},0),0],0\,,!^F,o,O,e +let b:undo_indent = "setlocal indentexpr< indentkeys< smartindent<" + " Only define the function once. if exists("*GetSolidityIndent") finish diff --git a/runtime/syntax/solidity.vim b/runtime/syntax/solidity.vim index e552446e10..a46d041a10 100644 --- a/runtime/syntax/solidity.vim +++ b/runtime/syntax/solidity.vim @@ -1,10 +1,10 @@ " Vim syntax file -" Language: Solidity -" Maintainer: Cothi (jiungdev@gmail.com) -" Original Author: tomlion (https://github.com/tomlion/vim-solidity/blob/master/syntax/solidity.vim) -" Last Changed: 2022 Sep 27 +" Language: Solidity +" Maintainer: Cothi (jiungdev@gmail.com) +" Original Author: tomlion (https://github.com/tomlion/vim-solidity/blob/master/syntax/solidity.vim) +" Last Change: 2022 Sep 27 " -" Additional contributors: +" Contributors: " Modified by thesis (https://github.com/thesis/vim-solidity/blob/main/indent/solidity.vim) if exists("b:current_syntax") |