Skip to content

Instantly share code, notes, and snippets.

~/.vim[merging]% git merge akita
fatal: cannot read object 19084786987d7ec8d545b3608856c5e45dd5ab23 'snippets~akita': It is a submodule!
Merge with strategy recursive failed.
~/.vim[merging]%
# Color Coding
# http://www.alloycode.com/2010/6/26/automatic-color-coding-for-script-console-and-irb
begin
require "ap"
IRB::Irb.class_eval do
def output_value
ap @context.last_value
end
end
rescue LoadError => e
iabbrev <buffer> ddate <C-R>=strftime("%Y-%m-%d")<CR>
iabbrev <buffer> ttime <C-R>=strftime("%H:%M:%S")<CR>
iabbrev <buffer> ddatetime <C-R>=strftime("%Y-%m-%d %H:%M:%S")<CR>
#!/usr/bin/env ruby
require 'tasklist'
during '2010 September' do
on '2010-09-03' do
task 'Take out garbage'
task 'Wash car'
end
on '2010-09-02' do
/Users/kevinc/.rvm/gems/ruby-1.8.7-p302@dms/gems/actionpack-2.3.2/lib/action_controller/vendor/rack-1.0/rack.rb:17: warning: already initialized constant VERSION
map <C-[> <Esc>
except iTerm,MacVim do
map <C-j> <Down>
map <C-k> <Up>
map <C-h> <Left>
map <C-l> <Right>
end
only Chrome do
disable "Remote Desktop Connection"
map "<Ctrl-[>", "Escape"
map "<Ctrl-u>", "<Cmd-z>"
map "<Ctrl-m>", "<Ctrl-F2>"
except /iTerm/, /MacVim/ do
map "<Ctrl-j>", "Down"
map "<Ctrl-k>", "Up"
map "<Ctrl-h>", "Left"
# ViKing can ignore entire applications
disable "Remote Desktop Connection"
# Basic mapping
map "<Ctrl-[>", "Escape"
map "<Ctrl-m>", "<Ctrl-F2>"
# Nice for debugging.
map "<Ctrl-v>", alert("Hello, World.")
@kevincolyar
kevincolyar / .vimrc
Created April 10, 2011 01:33
Fixes problem of vim not seeing rvm settings.
" Ensure vim always runs from a shell, rvm needs this.
set shell=/bin/sh
@kevincolyar
kevincolyar / vi_input.rb
Created April 23, 2011 05:03
Sample Keymando Plugin - Vi Input
class Vi < Plugin
@mode = 'insert'
class << self; attr_accessor :mode; end
def self.normal?
lambda { return Vi.mode == 'normal'}
end
def self.insert?
lambda { return Vi.mode == 'insert'}
end
def self.toggle