xaizek / dotvim (License: Unspecified) (since 2018-12-07)
Vim configuration and plugins.
Commit c9d7b657629d0d5dd6a3e6c28495da549f2a4bd6

Expand "{:" as "{\n};"
Author: xaizek
Author date (UTC): 2021-08-24 12:01
Committer name: xaizek
Committer date (UTC): 2021-08-24 12:01
Parent(s): 8b3bcd95e8f08574efa807fcd07d518cb2484915
Signing key: 99DC5E4DB05F6BE2
Tree: df78a6cca74ce7772888026ea4ecff29eab5e0a7
File Lines added Lines deleted
vimrc 10 0
File vimrc changed (mode: 100644) (index 9d1cf46..1ef09bf)
... ... function! s:ExpandBracket()
202 202 return ',' return ','
203 203 endfunction endfunction
204 204
205 inoremap <silent> : <c-r>=<SID>ExpandBracketWithSemicolon()<cr>
206 function! s:ExpandBracketWithSemicolon()
207 let l:line = getline('.')
208 let l:col = col('.') - 2
209 if '{' == l:line[l:col]
210 return "\<bs>{\<esc>o};\<esc>\"_O"
211 endif
212 return ':'
213 endfunction
214
205 215 " ------------------------------------------------------------------------------ " ------------------------------------------------------------------------------
206 216
207 217 " use unix-style eol by default " use unix-style eol by default
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/dotvim

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/dotvim

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master