Skip to content

Instantly share code, notes, and snippets.

@mattn
Created April 23, 2013 02:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattn/5440363 to your computer and use it in GitHub Desktop.
Save mattn/5440363 to your computer and use it in GitHub Desktop.
diff --git a/plugin/alpaca_english.vim b/plugin/alpaca_english.vim
index 0b73ead..7bb85ff 100644
--- a/plugin/alpaca_english.vim
+++ b/plugin/alpaca_english.vim
@@ -28,20 +28,15 @@ if exists('g:loaded_alpaca_english')
endif
let g:loaded_alpaca_english = 1
+let s:plugin_root_dir = expand('<sfile>:p:h:h')
+
" initialize"{{{
" Function for initializing "{{{
function! s:initialize()
let g:alpaca_english_enable = get(g:, 'alpaca_english_enable', 1)
let g:alpaca_english_max_candidates = get(g:, 'alpaca_english_max_candidates', 20)
- " とりあえずRubyだけ対応
- if exists('g:neobundle#default_options')
- let dir = neobundle#get_neobundle_dir()
- let g:alpaca_english_db_path = get(g:, 'alpaca_english_db_path',
- \ dir . '/alpaca_english/db/ejdict.sqlite3')
- let g:alpaca_english_root_dir = get(g:, 'alpaca_english_root_dir',
- \ dir . '/alpaca_english')
-
- endif
+ let g:alpaca_english_db_path = get(g:, 'alpaca_english_db_path', s:plugin_root_dir . '/db/ejdict.sqlite3')
+ let g:alpaca_english_root_dir = get(g:, 'alpaca_english_root_dir', s:plugin_root_dir)
endfunction "}}}
if get(g:, 'alpaca_english_enable', 0) "{{{
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment