From e27e7d65c4414e0a75d6cbcc100f65f67773f706 Mon Sep 17 00:00:00 2001 From: haya14busa Date: Wed, 12 Feb 2014 13:11:31 +0900 Subject: [PATCH] Handle CSApprox: do not use CSApprox by default Github: #99 #98 #90 #35 #31 --- autoload/EasyMotion/highlight.vim | 4 ++-- doc/easymotion.txt | 11 ++++++++++- plugin/EasyMotion.vim | 3 ++- t/easymotion_spec.vim | 3 ++- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/autoload/EasyMotion/highlight.vim b/autoload/EasyMotion/highlight.vim index 11d245c..d1c774d 100644 --- a/autoload/EasyMotion/highlight.vim +++ b/autoload/EasyMotion/highlight.vim @@ -2,7 +2,7 @@ " FILE: highlight.vim " AUTHOR: haya14busa " Reference: https://github.com/t9md/vim-smalls -" Last Change: 11 Feb 2014. +" Last Change: 12 Feb 2014. " License: MIT license {{{ " Permission is hereby granted, free of charge, to any person obtaining " a copy of this software and associated documentation files (the @@ -130,7 +130,7 @@ function! EasyMotion#highlight#init() "{{{ call EasyMotion#highlight#InitHL(g:EasyMotion_hl_inc_search, s:target_hl_inc) call EasyMotion#highlight#InitHL(g:EasyMotion_hl_inc_cursor, s:target_hl_inc_cursor) call EasyMotion#highlight#InitHL(g:EasyMotion_hl_move, s:target_hl_move) - if exists(':CSApprox') == 2 + if exists(':CSApprox') == 2 && g:EasyMotion_force_csapprox "TODO: better solution or remove completly CSApprox! endif diff --git a/doc/easymotion.txt b/doc/easymotion.txt index 36539f5..8a0e574 100644 --- a/doc/easymotion.txt +++ b/doc/easymotion.txt @@ -1,4 +1,4 @@ -*easymotion.txt* Version 2.0 Last change:11 Feb 2014. +*easymotion.txt* Version 2.0 Last change:12 Feb 2014. ______ __ ___ __ _ @@ -956,6 +956,15 @@ There are two ways to override the default colors: hi link EasyMotionTarget2Second MatchParen < +Use CSApprox *EasyMotion_force_csapprox* + *g:EasyMotion_force_csapprox* + if you install CSApprox & want to use gui color for EasyMotion, set this + option to 1. +> + let g:EasyMotion_force_csapprox = 1 +< + Default: 0 + ------------------------------------------------------------------------------ Custom mappings *easymotion-custom-mappings* diff --git a/plugin/EasyMotion.vim b/plugin/EasyMotion.vim index 867da21..9ecccfe 100644 --- a/plugin/EasyMotion.vim +++ b/plugin/EasyMotion.vim @@ -3,7 +3,7 @@ " Author: Kim Silkebækken " haya14busa " Source: https://github.com/Lokaltog/vim-easymotion -" Last Change: 06 Feb 2014. +" Last Change: 12 Feb 2014. " == Script initialization {{{ if expand("%:p") ==# expand(":p") unlet! g:EasyMotion_loaded @@ -42,6 +42,7 @@ let g:EasyMotion_cursor_highlight = get(g: , 'EasyMotion_cursor_highlight' , let g:EasyMotion_use_regexp = get(g: , 'EasyMotion_use_regexp' , 1) let g:EasyMotion_add_search_history = get(g: , 'EasyMotion_add_search_history' , 1) let g:EasyMotion_off_screen_search = get(g: , 'EasyMotion_off_screen_search' , 1) +let g:EasyMotion_force_csapprox = get(g: , 'EasyMotion_force_csapprox' , 0) let g:EasyMotion_show_prompt = get(g: , 'EasyMotion_show_prompt' , 1) let g:EasyMotion_prompt = \ get(g: , 'EasyMotion_prompt' , 'Search for {n} character(s): ') diff --git a/t/easymotion_spec.vim b/t/easymotion_spec.vim index eb0aa9f..aea740e 100644 --- a/t/easymotion_spec.vim +++ b/t/easymotion_spec.vim @@ -1,7 +1,7 @@ "============================================================================= " FILE: t/easymotion_spec.vim " AUTHOR: haya14busa -" Last Change: 06 Feb 2014. +" Last Change: 12 Feb 2014. " Test: https://github.com/kana/vim-vspec " Refer: https://github.com/rhysd/clever-f.vim " Description: EasyMotion test with vim-vspec @@ -462,6 +462,7 @@ describe 'Default settings' Expect g:EasyMotion_off_screen_search ==# 1 Expect g:EasyMotion_prompt ==# 'Search for {n} character(s): ' Expect g:EasyMotion_command_line_key_mappings ==# {} + Expect g:EasyMotion_force_csapprox ==# 0 " }}} " highlight {{{