1
0

EasyMotion.vim 2.3 KB

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