Skip to content

Instantly share code, notes, and snippets.

View hotchpotch's full-sized avatar
🏠
Working from home

Yuichi Tateno (secon) hotchpotch

🏠
Working from home
View GitHub Profile
@hotchpotch
hotchpotch / gist:58516
Created February 5, 2009 02:59
Firefox のウィンドウにうつったら一度 Esc をぜったいおくる
Loop
{
WinWaitActive, ahk_class MozillaUIWindowClass
WinGetActiveTitle, Title
IfInString, Title, Vimperator, {
ControlSend,,{Esc}
}
WinWaitNotActive, ahk_class MozillaUIWindowClass
}
var PLUGIN_INFO =
<VimperatorPlugin>
<name>{NAME}</name>
<description>CPAN search</description>
<description lang="ja">CPAN モジュールを検索し、補完します。</description>
<minVersion>2.0</minVersion>
<maxVersion>2.0pre</maxVersion>
<updateURL>http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/cpan-search.js</updateURL>
<author mail="hotchpotch@gmail.com" homepage="http://tako3.net/http://d.hatena.ne.jp/secondlife/">Yuichi Tateno</author>
<license>MPL 1.1/GPL 2.0/LGPL 2.1</license>
(function() {
var p = function (arg) {
Application.console.log(arg);
// liberator.log(arg);
}
function $X (exp, context, resolver) {
context || (context = document);
var Doc = context.ownerDocument || context;
#!/usr/bin/env ruby
require 'readline'
require 'socket'
host = ARGV.shift || 'localhost'
port = ARGV.shift || 4444
history_file = nil
begin
#!/usr/bin/env ruby
require 'pathname'
require 'fileutils'
coderepos_dir = Pathname.new(ENV['HOME']).join('svn/coderepos/lang/javascript/vimperator-plugins/trunk/')
vimp_dir = Pathname.new("/mnt/c/Documents\ and\ Settings/gorou/vimperator/plugin/")
cc = coderepos_dir.children
vimp_dir.children.each do |plugin|
/*
* %s, %d, %f only
*/
const _SPRINTF_HASH = {
'%s': String,
'%d': parseInt,
'%f': parseFloat,
};
var sprintf = function (str) {
" mappings
noremap <BS> <NOP>
noremap j 5j
noremap J <C-d>
noremap k 5k
noremap K <C-u>
noremap L l
noremap H h
noremap h <C-p>
commands.addUserCommand(['bdd[omain]'],
'buffer delete by match domain',
function (args) {
var domain = args.string;
let count = 0;
Application.activeWindow.tabs.forEach(function(t) {
// t #=> fuelIBrowserTab
if (t.uri.scheme.indexOf('http') != -1 &&
t.uri.host.indexOf(domain) != -1) {
t.close();
*** fuzzyfinder.vim.org 2009-04-13 14:42:27.000000000 +0900
--- fuzzyfinder.vim 2009-03-12 11:30:02.000000000 +0900
***************
*** 569,574 ****
--- 569,581 ----
return a:str[:(a:len - len(s:ABBR_TRIM_MARK) - 1)] . s:ABBR_TRIM_MARK
endfunction
+ function! s:TrimFirst(str, len)
+ if a:len <= 0 || len(a:str) <= a:len
mappings.addUserMap([modes.COMMAND_LINE], ['<C-i>'], 'show list', function() {
liberator.eval('completions.complete(true, false); completions.itemList.show();', commandline.input);
});