This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"{{{ | |
"Buffer全部から検索して結果をQuickFixに出力する | |
"http://ogijun.g.hatena.ne.jp/secondlife/20080310/1205128105 | |
function Moregrep(word) | |
if exists("s:hasqf") | |
silent ccl | |
endif | |
cexpr '' " clear quickfix | |
let current = bufnr('%') | |
silent exec ':bufdo | try | vimgrepadd ' . '/' . a:word .'/j/' . ' % | catch | endtry' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name amazonPlusHatenaLink | |
// @namespace d.hatena.ne.jp/sugarbabe335/ | |
// @description add HatenaAsinLink for amazon page | |
// @include http://www.amazon.co.jp/* | |
// ==/UserScript== | |
location.href.match(/(product|dp|ASIN)\/(.{10})\/?/i); | |
var string = "http://d.hatena.ne.jp/asin/"+RegExp.$2; | |
var node = xpath("//div[@class='buying']/*[last()]"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name addPermLink4tumblrDashboard | |
// @namespace d.hatena.ne.jp/sugarbabe335/ | |
// @description add PermLink fot tumblr Dashboard page | |
// @include http://www.tumblr.com/dashboard/* | |
// @include http://www.tumblr.com/dashboard | |
// ==/UserScript== | |
(function(){ | |
var ol = document.getElementById('posts'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (NSMutableDictionary *) _parse:(NSXMLNode *)node{ | |
NSMutableDictionary *dict = [NSMutableDictionary dictionary]; | |
NSArray *childs = [node children]; | |
for(NSXMLNode *_node in childs){ | |
if([_node name]){ | |
NSMutableDictionary *_d = [self _parse:_node]; | |
if([[dict objectForKey:[node name]] count] == 0){ | |
[dict setObject:[NSMutableDictionary dictionary] forKey:[node name]]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
F941 $G! | |
F942 $G" | |
F943 $G# | |
F944 $G$ | |
F945 $G% | |
F946 $G& | |
F947 $G' | |
F948 $G( | |
F949 $G) | |
F94A $G* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"{{{ | |
"bsd style brace | |
function! BSDStyleBrace() | |
let l:num = 0 | |
while l:num <= line('$') | |
let l:line = getline(l:num) | |
let l:t = matchstr(l:line, "\s*{\s*") | |
if l:t != "" | |
silent execute ':'.l:num | |
silent execute 'delete' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"textobj-php | |
if exists('g:loaded_textobj_php') | |
finish | |
endif | |
call textobj#user#plugin('php', { | |
\ '-': { | |
\ '*pattern*' : ['<?php\|<?=\|<?', '?>\(/\)\@!'], | |
\ 'select-a': 'aP', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! ToggleFont() | |
if &guifont=~"あくあフォント" | |
set guifont= | |
set guifontwide= | |
else | |
set guifont=あくあフォント:h13 | |
set guifontwide=あくあフォント:h13 | |
endif | |
endfunction | |
command! ToggleFont :call ToggleFont() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"{{{ vim-latex | |
"http://vim.g.hatena.ne.jp/y_yanbe/20080918/1221724545 | |
set shellslash | |
set grepprg=grep\ -nH\ $* | |
let g:Tex_DefaultTargetFormat='pdf' | |
let g:Tex_CompileRule_pdf = 'dvipdfmx $*.dvi' | |
let g:Tex_CompileRule_dvi = 'platex --interaction-nonstopmode $*' | |
let g:Tex_FormatDependency_pdf='dvi,pdf' | |
let g:Tex_ViewRule_pdf = 'open -a /Applications/Preview.app' | |
let g:Tex_IgnoredWarnings = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"{{{ taskpaper.vim | |
map <silent><space>td <Plug>ToggleDone | |
function! s:OpenTaskPaper() | |
let g:Taskpaper_default_path = '/path/to/file' | |
execute 'e '.g:Taskpaper_default_path | |
setlocal noswapfile | |
setlocal nonumber | |
noremap <buffer> <silent> q :close<Cr> | |
endfunction | |
nnoremap <silent><space>ts :<C-u>split \| call <SID>OpenTaskPaper()<Cr> |
OlderNewer