aboutsummaryrefslogtreecommitdiffstats
path: root/plugin/grappele.vim
blob: be001ea1b38277cd9336c2de0b5646dce33f05ff (plain)
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
if exists('g:loaded_grappele')
	finish
endif
let g:loaded_grappele = 1


nnoremap <silent> <expr> <Plug>GrappeleRecall grappele#Recall()
vnoremap <silent> <expr> <Plug>GrappeleRecall grappele#Recall()
onoremap <silent> <expr> <Plug>GrappeleRecall grappele#ORecall()

if !maparg('G', 'n')
	nnoremap <silent> <expr> G grappele#Grappele(v:count)
endif

if !maparg('G', 'v')
	vnoremap <silent> <expr> G grappele#Grappele(v:count)
endif

if !maparg('G', 'o')
	onoremap <silent> <expr> G grappele#Grappele(v:count)
endif

if !hasmapto('<Plug>GrappeleRecall', 'n') || !maparg('gG', 'n')
	nmap gG <Plug>GrappeleRecall
endif

if !hasmapto('<Plug>GrappeleRecall', 'v') || !maparg('gG', 'v')
	vmap gG <Plug>GrappeleRecall
endif

if !hasmapto('<Plug>GrappeleRecall', 'o') || !maparg('gG', 'o')
	omap gG <Plug>GrappeleRecall
endif