Skip to content

Instantly share code, notes, and snippets.

command! -nargs=+ lazy autocmd VimperatorEnter .* <args>
lazy fmaps -u='mail\.google\.com/mail' c / j k n p o u e x s r a # [ ] ? gi gs gt gd ga gc
lazy fmaps -u='mail\.google\.com/mail/.*/[0-9a-f]+$' c / j,n k,p n,j p,k o u e x s r a # [ ] ? gi gs gt gd ga gc
lazy fmaps -u='www\.google\.co\.jp/reader' -events=vkeypress j k n p m s v A r S N P X O gh ga gs gt gu u / ? J K
lazy fmaps -u='(fastladder|livedoor)\.com/reader' j k s a p o v c i,p <Space> <S-Space> z b < > q w e,g
lazy fmaps -u='https?://www\.rememberthemilk\.com/home/' j k m i c t ? d F,f G,g S,s L,l Y,y H,h M,m <Del> <C-S-Left> <C-S-Right>
lazy fmaps -u='http://code.google.com/p/vimperator-labs/issues/list' o j k
lazy fmaps -u='http://code.google.com/p/vimperator-labs/issues/detail' u
mappings.addUserMap(
[modes.COMMAND_LINE],
['<C-i>'],
'Edit commandline by external editor',
function () {
io.withTempFiles(
function (file) {
file.write(commandline.command);
editor.editFileExternally(file.path);
commandline.open(":", file.read(), modes.EX);
@anekos
anekos / style-loader.js
Created March 8, 2010 22:34
vimpのstylesディレクトリから *.css をロード
io.getRuntimeDirectories('styles').forEach(function (dir) {
dir.readDirectory().forEach(function (file) {
if (file.exists() && file.isFile() && /\.css$/.test(file.path))
io.source(file.path);
});
});
@anekos
anekos / zoom-em-all.js
Created March 14, 2010 07:06
Firefox 全体をズームするよ
let zoomEmAll = function (mustaine) {
const docViewer =
window.QueryInterface(Ci.nsIInterfaceRequestor).
getInterface(Ci.nsIWebNavigation).
QueryInterface(Ci.nsIDocShell).
contentViewer.
QueryInterface(Ci.nsIMarkupDocumentViewer);
docViewer.fullZoom = mustaine;
}
@anekos
anekos / for-tss-tab-background.css
Created March 15, 2010 05:05
TreeStyleTab の隙間用壁紙
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url-prefix("chrome://") {
.tabs-container {
background: url('file:///foo/bar/baz.png');
background-position: 750px 0px
}
}
@anekos
anekos / current-plugins.txt
Created March 15, 2010 22:18
使ってるプラグイン一覧
_libly.js
_smooziee.js
_vimperatorrc.js
alert.js
amebanow.js
appendAnchor.js
applauncher.js
asdfghjkl.js
auto-copy.js
auto-focus-frame.js
let g:plugin_loader_roots = "/project/coderepos/vimp-plugin"
js <<EOM
liberator.globalVariables.plugin_loader_plugins = <>
happy_hacking_vimperator
...
zoom-em-all
</>.toString().split(/\s+/).filter(function(n) !/^!/.test(n));
EOM
@anekos
anekos / local-mappings.js
Created March 16, 2010 02:22
ローカルなマッピングの設定方法 for Vimperator 2.3 later
(function () {
function addLocalMappings(buffer, maps) {
maps.forEach(
function (map) {
let [cmd, action, extra] = map;
let actionFunc = action;
extra || (extra = {});
@anekos
anekos / remove_default_mappings.js
Created March 18, 2010 05:20
]] [[ などのマッピングを消すサンプル #vimperator
(function removeCandy (cs)[[map.names=[] for each (map in mappings.getCandidates(modes.NORMAL, c))] for each (c in cs.split(/\s+/))])('[ ]');
@anekos
anekos / pika-dorei.js
Created March 22, 2010 12:08
ピカ奴隷
commands.addUserCommand(
['pikadorei'],
'You Slave of Pika!',
function () {
let (doc=content.document,colors='red green blue'.split(/\s/),i=0)
setInterval(function() doc.body.style.backgroundColor=colors[(i++,i%=colors.length)], 100)
},
{},
true
);