これ使ってみた つvimperator

インストールしつつ無効にし続けてきたvimperatorを触ってみた。


いいねこれ。
といってもvimもそんなに使わないしFirefoxの設定も適当なぬるぬる人間なので、設定は切り貼りだしvimp pluginもまだ3つしか使ってない。
js分からないからかゆいところに手が届かないし。
それでも楽しげです。

環境

Mac OS X 10.6.2
Firefox 3.5.7


LDRize, Autopagerize, Tombloo, Hatena Bookmark(addonの)を常時使用してる。
これにVimperator 2.2が加わった。

不都合な真実

まだ触り初めて二日目だけど、不都合に感じている所をいくつか。

  • OSごとクラッシュする様になった

.vimperatorrcを変えながら試行錯誤していたら、時々OSを巻き込んでクラッシュする様になってしまった。
原因も分からなくて困った。もしかしたらvimp関係無いかもしれないけど。

  • vimpの動作が緩慢

URL直打ちとかブックマークにアクセスするにはAwesomeBarを使っていたけど、
これを完全に :tabopen などで置き換えるには動作が緩慢すぎる。
自分のFirefox環境がいけないのだろうか。。 (ちなみにCore2 2.16GHzのOld MacBook。)
なのでホントは消したいツールバーが消せない。
その上、AwesomeBarを使おうとしてcmd+l でフォーカスを移したと思ったらvimpにフォーカスを取り替えされる事がある。
もしかしたら :set focuscontent をしなければ違うのかな。 わからない。

  • Hint mode が上手く使える気がしない
  • vimp pluginのfeedSomekeys_2.js の設定方法がよく分からない

これは自分の頭が弱いからなので後でちゃんと調べておこう。
とりあえずはGmail, GCal, Tumblr, Livedoor Readerはほぼ今まで通り使える様になった気がしているので最低限の設定は出来た。

追記

feedSomekey_2.jsの設定方法を確認した。
タイプしたキーを変換してwebコンテンツに渡す設定が分からなかったんだけど、

autocmd LocationChange .*\\.foo\\.com/ :fmap lhs,rhs

とすれば良いらしい。
途中で古いver.の頃の設定を参照していたので混同したみたい。。


追記終わり。

  • Firefoxの動作が今までよりも緩慢になった気がする

Firefoxを遅くさせる三大addonの内二つを入れてしまった。

.vimperatorrc

retletさんの.vimperatorrc

otsuneさんの.vimperatorrc

辺りとその他webページを参考に設定を書いてる。
今のところはこんな感じ。

"2.2 (created: 2009/10/28 19:04:27)
" ----- main options -----

" m Menubar
" T Toolbar
" B Bookmark bar
" n Tab number 
" N Tab number over image
" b Bottom scrollbar
" r Right scrollbar
" l Left scrollbar (l and r are mutually exclusive)
set guioptions=rmbT

set runtimepath=/Users/termin/.vimperator
source! /Users/termin/.vimperatorrc.local

" vim: set ft=vimperator:

" ブラウザタイトルの変更
set titlestring=Vimperator
" ページ全体で検索語を強調表示
set hlsearch
" 検索語の大文字小文字を無視
" set ignorecase
"ビープ音を鳴らさずビジュアルベルを使用
set visualbell
"ビジュアルベルを無効化
hi Bell display: none;
" 新しいタブで開く
" all			All commands
" addons		:addo[ns] command
" downloads		:downl[oads] command
" extoptions	:exto[ptions] command
" help			:h[elp] command
" javascript	:javascript! or :js! command
" prefs			:pref[erences]! or :prefs! command
set newtab=all
" exモード時のインクリメント補完. tabを押さなくても補完する
set wildoptions=auto
" input要素にfocusを奪われないようにする
set focuscontent
" Items which are completed at the :open prompts. Available items:
" default: slf
" s Search engines and keyword URLs 
" f Local files 
" l Firefox location bar entries (bookmarks and history sorted in an intelligent way) 
" b Bookmarks 
" h History 
" S Search engine suggestions 
" t Open tabs
set complete=slS
" リンク先の表示位置
" 0 Don’t show link destination
" 1 Show the link in the status line
" 2 Show the link in the command line
set showstatuslinks=2

" ----- Key Mappings -----
" <C-x>: The control or ctrl key.
" <A-x>: The alt key.
" <M-x>: The meta key, windows key, or command key
" <S-x>: The shift key.

" <M-A-Left>/<M-A-Right>かh/lでタブ移動
map <M-A-Left> <C-p>
map <M-A-Right> <C-n>
map h <C-p>
map l <C-n>
"<S-M-Left>/<S-M-Right>で現在のタブの位置変更
map <S-M-Left>  :tabmove! -1<CR>
map <S-M-Right> :tabmove! +1<CR>
" <M-f>でvimpによる検索/
map <M-f> /
" tumblrでtキーを使う為、Tで代用する
map T :tabopen 
" textareaにフォーカス
" map e gi
map e <M-i>
" URL中の数字を++/--
noremap ++ <C-a>
noremap -- <C-x>
" 直前にフォーカスしていたタブに戻る 
noremap <C-w> <M-w>
map d <C-w>

" ----- Plugin Options  -----

" feedSomekeys_2.js
autocmd LocationChange .* :fmapc
" autocmd LocationChange fastladder\\.com/reader :fmap j k s a r p o v c <Space> <S-Space> < > T
autocmd LocationChange reader\\.livedoor\\.com/reader :fmap j k s a r p o f v c <Space> <S-Space> < > T
autocmd LocationChange .*\\.tumblr\\.com/ :fmap t
" autocmd LocationChange mail\\.google\\.com/mail :fmap! -depth 4 c / j k n p o u e x s r a # [ ] z ? gi gs gt gd ga gc
autocmd LocationChange 'mail\\.google\\.com/mail' :fmap c / j k n p o u e x s r a # [ ] z ? gi gs gt gd ga gc
autocmd LocationChange 'www\\.google\\.com/calendar/' :fmap! -vkey -event keydown j k t a d w m x c e &lt;Del> / + q s ?

" ----- その他 -----
" フィードボタンをステータスラインに移動
javascript <<EOM
(function () {
    var feedButton = document.getElementById('feed-button');
        feedButton.parentNode.removeChild(feedButton);
    var feedPanel  = document.createElement('statusbarpanel');
        feedPanel.setAttribute('id', 'feed-panel-clone');
        feedPanel.appendChild(feedButton.cloneNode(true));
    document.getElementById('status-bar').insertBefore(
        feedPanel,
        document.getElementById('security-button')
    );
})();
EOM