Skip to content

Instantly share code, notes, and snippets.

View osak's full-sized avatar

Osamu Koga (osa_k) osak

View GitHub Profile
nnoremap <silent> <Plug>select_cstyle_if :<C-u>call <SID>select_cstyle_if()<CR>
function! s:select_cstyle_if() " {{{
let orig_view = winsaveview()
let if_start_pos = []
while searchpair('{', '', '}', 'bW', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string"') != 0
let brace_start_pos = getpos('.')
normal! ge
let save = @"
normal! yl
function! s:eval_S_expression() " {{{
let ch = strpart(getline('.'), col('.')-1, 1)
let skip = 'index(["string", "schemeChar"], synIDattr(synID(line("."), col("."), 0), "name")) != -1'
if ch == ')'
let endline = line('.')
let startline = searchpairpos('(', '', ')', 'nbW', skip)[0]
elseif ch == '('
let startline = line('.')
let endline = searchpairpos('(', '', ')', 'nW', skip)[0]
else
# -*- coding: utf-8
miquire :addon, 'addon'
miquire :core, 'environment'
miquire :addon, 'settings'
require 'net/http'
module Net
class <<HTTP
alias new_org new
@osak
osak / mikutter-cairo-stringid-patch
Created May 8, 2011 13:33
このパッチあてたらmikutter-cairoがうごいた
Index: core/mui/cairo_timeline.rb
===================================================================
--- core/mui/cairo_timeline.rb (リビジョン 300)
+++ core/mui/cairo_timeline.rb (作業コピー)
@@ -23,7 +23,7 @@
# }
a
},
- :kind => :message_id, :widget => :text, :type => Integer, :label => ''},
+ :kind => :message_id, :widget => :text, :type => String, :label => ''},
Index: mentions.rb
===================================================================
--- mentions.rb (リビジョン 351)
+++ mentions.rb (作業コピー)
@@ -25,7 +25,7 @@
plugin.add_event(:favorite){ |service, fav_by, message|
if UserConfig[:favorited_by_anyone_act_as_reply] and fav_by[:idname] != service.idname
main.add(message)
- main.favorite(fav_by, message)
+ #main.favorite(fav_by, message)
/home/osa/app/mikutter/trunk/core/lib/lazy.rb:20:in `method_missing': undefined method `[]' for nil:NilClass (NoMethodError)
from /home/osa/app/mikutter/trunk/core/post.rb:114:in `block in user'
/home/osa/app/mikutter/trunk/core/lib/lazy.rb:20:in `method_missing': undefined method `[]' for nil:NilClass (NoMethodError)
from /home/osa/app/mikutter/trunk/core/post.rb:114:in `block in user'
1
ギャラクシーエンジェル galaxy_angel 0 600
1
galaxy_angel
11
A 0 600
B 0 610
C 0 610
D 0 610
E 0 640
Index: core/addon/proxy/proxy.rb
===================================================================
--- core/addon/proxy/proxy.rb (リビジョン 398)
+++ core/addon/proxy/proxy.rb (作業コピー)
@@ -75,15 +75,16 @@
def self.gen_record(name, radio)
radio.signal_connect('toggled'){ |widget|
- UserConfig[:proxy_enabled] = name }
+ UserConfig[:proxy_enabled] = name if widget.active? }
" An example for a vimrc file.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2006 Nov 16
"
" To use it, copy it to
" for Unix and OS/2: ~/.vimrc
" for Amiga: s:.vimrc
" for MS-DOS and Win32: $VIM\_vimrc
" for OpenVMS: sys$login:.vimrc
warning: {MIKUTTER_DIR}/core/message.rb:169:in `receive_to?': argument error: {:id=>121248683, :idname=>"osa_k", :name=>"Koga Osamu", :profile_image_url=>"http://a2.twimg.com/profile_images/1186285557/555ec229-b02e-4841-b1b1-afaad201b20c_normal.jpg"} is not passed User
warning: {MIKUTTER_DIR}/core/message.rb:169:in `receive_to?': in {MIKUTTER_DIR}/core/message.rb:169:in `receive_to?'
warning: {MIKUTTER_DIR}/core/watch.rb:22:in `rescue in block in scan_and_yield': ArgumentError
from {MIKUTTER_DIR}/core/utils.rb:277:in `type_strict'
from {MIKUTTER_DIR}/core/message.rb:169:in `receive_to?'
from {MIKUTTER_DIR}/core/message.rb:134:in `to_me?'
from {MIKUTTER_DIR}/core/watch.rb:44:in `block (2 levels) in event_factory'
from {MIKUTTER_DIR}/core/watch.rb:44:in `select'
from {MIKUTTER_DIR}/core/watch.rb:44:in `block in event_factory'
from {MIKUTTER_DIR}/core/watch.rb:20:in `block in scan_and_yield'