Skip to content

Instantly share code, notes, and snippets.

"{{{
"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'
// ==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');
- (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]];
}
F941 $G!
F942 $G"
F943 $G#
F944 $G$
F945 $G%
F946 $G&
F947 $G'
F948 $G(
F949 $G)
F94A $G*
"{{{
"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'
"textobj-php
if exists('g:loaded_textobj_php')
finish
endif
call textobj#user#plugin('php', {
\ '-': {
\ '*pattern*' : ['<?php\|<?=\|<?', '?>\(/\)\@!'],
\ 'select-a': 'aP',
function! ToggleFont()
if &guifont=~"あくあフォント"
set guifont=
set guifontwide=
else
set guifont=あくあフォント:h13
set guifontwide=あくあフォント:h13
endif
endfunction
command! ToggleFont :call ToggleFont()
"{{{ 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 =
"{{{ 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>