1
0
mirror of https://github.com/amix/vimrc synced 2025-06-16 01:25:00 +08:00

Updated plugins

This commit is contained in:
Amir Salihefendic
2018-11-01 11:03:42 +01:00
parent 44dca49794
commit d2d303593e
105 changed files with 2141 additions and 510 deletions

View File

@ -24,7 +24,7 @@ if exists("*GoIndent")
finish
endif
function! GoIndent(lnum)
function! GoIndent(lnum) abort
let prevlnum = prevnonblank(a:lnum-1)
if prevlnum == 0
" top of file
@ -38,10 +38,17 @@ function! GoIndent(lnum)
let ind = previ
if prevl =~ ' = `[^`]*$'
" previous line started a multi-line raw string
return 0
endif
for synid in synstack(a:lnum, 1)
if synIDattr(synid, 'name') == 'goRawString'
if prevl =~ '\%(\%(:\?=\)\|(\|,\)\s*`[^`]*$'
" previous line started a multi-line raw string
return 0
endif
" return -1 to keep the current indent.
return -1
endif
endfor
if prevl =~ '[({]\s*$'
" previous line opened a block
let ind += shiftwidth()