]>
Commit | Line | Data |
---|---|---|
0d23b6e5 BB |
1 | " EasyMotion - Vim motions on speed! |
2 | " | |
3 | " Author: Kim Silkebækken <kim.silkebaekken+vim@gmail.com> | |
4 | " Source repository: https://github.com/Lokaltog/vim-easymotion | |
5 | ||
6 | " Script initialization {{{ | |
7 | if exists('g:EasyMotion_loaded') || &compatible || version < 702 | |
8 | finish | |
9 | endif | |
10 | ||
11 | let g:EasyMotion_loaded = 1 | |
12 | " }}} | |
13 | " Default configuration {{{ | |
14 | " Default options {{{ | |
15 | call EasyMotion#InitOptions({ | |
16 | \ 'leader_key' : '<Leader><Leader>' | |
17 | \ , 'keys' : 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
18 | \ , 'do_shade' : 1 | |
19 | \ , 'do_mapping' : 1 | |
20 | \ , 'grouping' : 1 | |
21 | \ | |
22 | \ , 'hl_group_target' : 'EasyMotionTarget' | |
23 | \ , 'hl_group_shade' : 'EasyMotionShade' | |
24 | \ }) | |
25 | " }}} | |
26 | " Default highlighting {{{ | |
27 | let s:target_hl_defaults = { | |
28 | \ 'gui' : ['NONE', '#ff0000' , 'bold'] | |
29 | \ , 'cterm256': ['NONE', '196' , 'bold'] | |
30 | \ , 'cterm' : ['NONE', 'red' , 'bold'] | |
31 | \ } | |
32 | ||
33 | let s:shade_hl_defaults = { | |
34 | \ 'gui' : ['NONE', '#777777' , 'NONE'] | |
35 | \ , 'cterm256': ['NONE', '242' , 'NONE'] | |
36 | \ , 'cterm' : ['NONE', 'grey' , 'NONE'] | |
37 | \ } | |
38 | ||
39 | call EasyMotion#InitHL(g:EasyMotion_hl_group_target, s:target_hl_defaults) | |
40 | call EasyMotion#InitHL(g:EasyMotion_hl_group_shade, s:shade_hl_defaults) | |
41 | ||
42 | " Reset highlighting after loading a new color scheme {{{ | |
43 | augroup EasyMotionInitHL | |
44 | autocmd! | |
45 | ||
46 | autocmd ColorScheme * call EasyMotion#InitHL(g:EasyMotion_hl_group_target, s:target_hl_defaults) | |
47 | autocmd ColorScheme * call EasyMotion#InitHL(g:EasyMotion_hl_group_shade, s:shade_hl_defaults) | |
48 | augroup end | |
49 | " }}} | |
50 | " }}} | |
51 | " Default key mapping {{{ | |
52 | call EasyMotion#InitMappings({ | |
53 | \ 'f' : { 'name': 'F' , 'dir': 0 } | |
54 | \ , 'F' : { 'name': 'F' , 'dir': 1 } | |
55 | \ , 't' : { 'name': 'T' , 'dir': 0 } | |
56 | \ , 'T' : { 'name': 'T' , 'dir': 1 } | |
57 | \ , 'w' : { 'name': 'WB' , 'dir': 0 } | |
58 | \ , 'W' : { 'name': 'WBW', 'dir': 0 } | |
59 | \ , 'b' : { 'name': 'WB' , 'dir': 1 } | |
60 | \ , 'B' : { 'name': 'WBW', 'dir': 1 } | |
61 | \ , 'e' : { 'name': 'E' , 'dir': 0 } | |
62 | \ , 'E' : { 'name': 'EW' , 'dir': 0 } | |
63 | \ , 'ge': { 'name': 'E' , 'dir': 1 } | |
64 | \ , 'gE': { 'name': 'EW' , 'dir': 1 } | |
65 | \ , 'j' : { 'name': 'JK' , 'dir': 0 } | |
66 | \ , 'k' : { 'name': 'JK' , 'dir': 1 } | |
67 | \ , 'n' : { 'name': 'Search' , 'dir': 0 } | |
68 | \ , 'N' : { 'name': 'Search' , 'dir': 1 } | |
69 | \ }) | |
70 | " }}} | |
71 | " }}} | |
72 | ||
73 | " vim: fdm=marker:noet:ts=4:sw=4:sts=4 |