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

Change {{ insert-mdoe mapping to {,
`{{` sometimes occurs in code.
Author: xaizek
Author date (UTC): 2021-07-04 14:56
Committer name: xaizek
Committer date (UTC): 2021-07-04 14:56
Parent(s): 20cb430ef64144dde7177a7dcb3bdaacbd04a6bb
Signing key: 99DC5E4DB05F6BE2
Tree: a6192f0f22524859b5d15ce17e652d7c53416a23
File Lines added Lines deleted
vimrc 3 3
File vimrc changed (mode: 100644) (index 896df35..b95b94f)
... ... nnoremap <silent> cp :let g:substitutemotion_reg = v:register
185 185 \ <bar> set opfunc=libedit#subm#SubstituteMotion<CR>g@ \ <bar> set opfunc=libedit#subm#SubstituteMotion<CR>g@
186 186
187 187 " ------------------------------------------------------------------------------ " ------------------------------------------------------------------------------
188 " expand double { ("{{") as {<cr>}
188 " expand "{," as "{\n}"
189 189
190 inoremap <silent> { <c-r>=<SID>ExpandBracket()<cr>
190 inoremap <silent> , <c-r>=<SID>ExpandBracket()<cr>
191 191 function! s:ExpandBracket() function! s:ExpandBracket()
192 192 let l:line = getline('.') let l:line = getline('.')
193 193 let l:col = col('.') - 2 let l:col = col('.') - 2
 
... ... function! s:ExpandBracket()
199 199 return "\<cr>\<esc>o}\<esc>k^" return "\<cr>\<esc>o}\<esc>k^"
200 200 endif endif
201 201 endif endif
202 return '{'
202 return ','
203 203 endfunction endfunction
204 204
205 205 " ------------------------------------------------------------------------------ " ------------------------------------------------------------------------------
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