This file contains hidden or 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
(defun autoload-if-found (function file &optional docstring interactive type) | |
"set autoload if. FILE has found." | |
(and (locate-library file) | |
(autoload function file docstring interactive type))) |
This file contains hidden or 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
require 'rubygems' | |
require 'colored' | |
require 'terminal-table/import' | |
class String | |
alias_method :to_s_orig, :to_s | |
def to_s | |
str = self.to_s_orig | |
if ::ELIMINATE_ANSI_ESCAPE | |
str = str.sub(/^\e\[[\[\e0-9;m]+m/, "") |
This file contains hidden or 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
" method: | |
"============================================================ | |
let s:m = {} | |
fun! s:m.capitalize() | |
return substitute(self.data,'^\(.\)','\u\1',"") | |
endfun | |
fun! s:m.upcase() | |
return toupper(self.data) | |
endfun |
This file contains hidden or 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
fun! MoveSelectedText(direction) range | |
if a:direction == 'j' | |
let cmd = a:firstline . ",". a:lastline . "move " . (a:lastline + 1) | |
elseif a:direction == 'k' | |
let cmd = a:firstline. ",". a:lastline . "move " . (a:firstline - 2) | |
elseif a:direction == 'l' | |
let cmd = "normal gv>>" | |
elseif a:direction == 'h' | |
let cmd = "normal gv<<" | |
endif |
This file contains hidden or 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
./configure --enable-rubyinterp --with-macsdk=10.5 --with-features=huge --enable-perlinterp --enable-pythoninterp --enable-tclinterp | |
vim src/auto/config.mk | |
RUBY_SRC = if_ruby.c | |
RUBY_OBJ = objects/if_ruby.o | |
RUBY_PRO = if_ruby.pro | |
RUBY_CFLAGS = -I/Users/maeda_taku/.rvm/src/ruby-1.8.7-p302 | |
RUBY_LIBS = -lruby-static -lpthread -ldl -lobjc -L/Users/maeda_taku/.rvm/rubies/ruby-1.8.7-p302/lib |
This file contains hidden or 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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'appscript' | |
num = ARGV[0] | |
unless num | |
puts " #{File.basename($0)} 0-10" | |
exit 2 | |
end |
This file contains hidden or 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
#!/usr/bin/env ruby | |
module Kernel | |
private | |
def this_method | |
caller[0][/`([^']*)'/, 1] | |
end | |
def calling_method | |
caller[1][/`([^']*)'/, 1] |
This file contains hidden or 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
"=========================================== | |
" help Python | |
"=========================================== | |
" vim.eval(str) *python-eval* | |
" Evaluates the expression str using the vim internal expression | |
" evaluator (see |expression|). Returns the expression result as: | |
" - a string if the Vim expression evaluates to a string or number | |
" - a list if the Vim expression evaluates to a Vim list | |
" - a dictionary if the Vim expression evaluates to a Vim dictionary | |
" Dictionaries and lists are recursively expanded. |
This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding: utf8 -*- | |
# クラス | |
class Spam(object): | |
"""docstring for Spam""" | |
# クラス属性 | |
class_atrr = "This is class attribute" |
This file contains hidden or 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
# -*- coding: utf8 -*- | |
import vim | |
import sys | |
import re | |
import os | |
def normal(str): | |
vim.command("normal! "+str) | |
def select_all_buffer(): |
OlderNewer