vim-patch:e34b51e95fd0

runtime(solidity): add new ftplugin (vim/vim#12877)

Set undo_{ftplugin,indent}

closes vim/vim#11240

e34b51e95f

Co-authored-by: dkearns <dougkearns@gmail.com>
Co-authored-by: cothi <jiungdev@gmail.com>
This commit is contained in:
Christian Clason 2023-08-23 10:09:32 +09:00
parent 810428c4d5
commit 0b7e1730bc
3 changed files with 29 additions and 10 deletions

View File

@ -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<"

View File

@ -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

View File

@ -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")