Handle CSApprox: do not use CSApprox by default

Github: #99 #98 #90 #35 #31
This commit is contained in:
haya14busa 2014-02-12 13:11:31 +09:00
parent e01bc0305e
commit e27e7d65c4
4 changed files with 16 additions and 5 deletions

View File

@ -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

View File

@ -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*

View File

@ -3,7 +3,7 @@
" Author: Kim Silkebækken <kim.silkebaekken+vim@gmail.com>
" haya14busa <hayabusa1419@gmail.com>
" Source: https://github.com/Lokaltog/vim-easymotion
" Last Change: 06 Feb 2014.
" Last Change: 12 Feb 2014.
" == Script initialization {{{
if expand("%:p") ==# expand("<sfile>: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): ')

View File

@ -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 {{{