-
Notifications
You must be signed in to change notification settings - Fork 1
/
gvimrc
41 lines (36 loc) · 1.21 KB
/
gvimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
" @author Sergey Markelov (2011)
function! FoldSpellBalloon()
let foldStart = foldclosed(v:beval_lnum)
let foldEnd = foldclosedend(v:beval_lnum)
let lines = []
" Detect if we are in a fold
if foldStart < 0
" Detect if we are on a misspelled word
let lines = spellsuggest(spellbadword(v:beval_text)[ 0 ], 5, 0)
else
" we are in a fold
let numLines = foldEnd - foldStart + 1
" if we have too many lines in fold, show only the first 14
" and the last 14 lines
if(numLines > 31)
let lines = getline(foldStart, foldStart + 14 )
let lines += ['-- Snipped ' . ( numLines - 30 ) . ' lines --']
let lines += getline(foldEnd - 14, foldEnd)
else
"less than 30 lines, lets show all of them
let lines = getline(foldStart, foldEnd)
endif
endif
" return result
return join(lines, has("balloon_multiline") ? "\n" : " ")
endfunction
set balloonexpr=FoldSpellBalloon()
set ballooneval
set balloondelay=400
""""""""""""""""""""
" MacVim
set antialias
set transparency=10
set macmeta
macm Window.Select\ Previous\ Tab key=<D-S-Left>
macm Window.Select\ Next\ Tab key=<D-S-Right>