memo.xight.org

日々のメモ

カテゴリ : vi

1ページ目 / 全1ページ

VI-bindings in Mozilla Firefox

Firefox\res\builing\userHTMLBindings.xml (Johan Fredin - VI-bindings in Mozilla Firefox より)

<?xml version="1.0"?>
<!-- In order to work correctly, this file must be named -->
<!-- res/builtin/userHTMLBindings.xml in the mozilla tree. -->

<bindings id="htmlBindings"
	xmlns="http://www.mozilla.org/xbl"
	xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
	
	<binding id="browserUser">
		<handlers>
			<handler event="keypress" key="k" command="cmd_scrollLineUp"/>
			<handler event="keypress" key="j" command="cmd_scrollLineDown"/>
			<handler event="keypress" key="l" command="cmd_scrollRight"/>
			<handler event="keypress" key="h" command="cmd_scrollLeft"/>
		</handlers>
	</binding>
	
</bindings>


user.js (Johan Fredin - VI-bindings in Mozilla Firefox より)

// Find As You Type Configuration:
// Set this pref to false to disable Find As You Type:
user_pref("accessibility.typeaheadfind", true);
// If you set this pret to true, typing can automatically start Find As You Type.
// If false (default), you must hit / (find text) or ' (find links) before your search.
user_pref("accessibility.typeaheadfind.autostart", false);
// Set this pref to false if you want Find As You Type to search normal text too:
user_pref("accessibility.typeaheadfind.linksonly", false);
// Set this pref to true if you require that the link starts with the entered text:
user_pref("accessibility.typeaheadfind.startlinksonly", false);
// This is the time in milliseconds for the Find As You Type to stop watching for keystrokes:
user_pref("accessibility.typeaheadfind.timeout", 3000);


Reference

  Johan Fredin - VI-bindings in Mozilla Firefox (formerly Firebird)
  http://legonet.org/~griffin/firefox_vi-bindings.html

via

  TokuLog! - 2005-02-08
  http://tokuhirom.dnsalias.org/~tokuhirom/cl/2005-02-08-1.html

正規表現のエスケープ

Summary

  vi 上で正規表現を扱う場合に,エスケープしなければならない文字,エスケープしてはならない文字.
| + 要エスケープ
^ $ . * エスケープ不要
( ) 両方エスケープが必要
{ } 初めだけエスケープが必要
[ ] エスケープ不要
- 追記
  C/Migemo を使用する際,呼び出したせ域表現をそのまま使用できないので,調べていたら発見.
  C/Migemo では --vim オプションを使用すればOKらしい.

$ /usr/local/bin/cmigemo --vim --dict /usr/local/share/migemo/euc-jp/migemo-dict --word キーワード

- Reference
  Stray Penguin - Linux Memo (vi)
  http://www.asahi-net.or.jp/~aa4t-nngk/vi.html#search