Lets you check Cocoa Touch documentation from the RubyMotion REPL.
License: MIT, 2015 Jamon Holmgren
" ---------------------------------------------------------------------------- | |
" vimawesome.com | |
" ---------------------------------------------------------------------------- | |
function! VimAwesomeComplete() abort | |
let prefix = matchstr(strpart(getline('.'), 0, col('.') - 1), '[.a-zA-Z0-9_/-]*$') | |
echohl WarningMsg | |
echo 'Downloading plugin list from VimAwesome' | |
echohl None | |
ruby << EOF | |
require 'json' |
* { | |
font-size: 12pt; | |
font-family: monospace; | |
font-weight: normal; | |
font-style: normal; | |
text-decoration: none; | |
color: black; | |
cursor: default; | |
} |
" Quick Replace | |
" Makes *``cgn like workflows faster by automatically moving to next match. Repeat with `.` | |
" | |
" Requires repeat.vim | |
" | |
" Example mappings: | |
" nmap cm <Plug>(quick-replace) | |
" xmap C <Plug>(quick-replace) | |
" | |
" mnemonic: cm for change matches |
function! ShowOnGithub() | |
let u = system("echo ${${${$(git --git-dir=.git config --get remote.origin.url)#git@github.com:}%.git}#https://github.com/} | xargs echo -n") | |
silent exec "!open "."https://github.com/".u."/blob/master/".@%.'\#L'.line(".") | |
endfunction | |
command! -nargs=0 ShowOnGithub call ShowOnGithub() | |
nnoremap <Leader>gh :ShowOnGithub<CR> |
#Two Gotcha's In the @RubyMotion getting started guide for Android
##The NDK Does not Support API level L
I got this error when I tried to rake device
for the first time.
ERROR! It looks like your version of the NDK does not support API level L. Switch to │ 7 structure: Structure
a lower API level or install a more recent NDK.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#!/bin/bash | |
# | |
# Called by "git commit" with the name of the file that has the | |
# commit message, followed by the description of the commit | |
# message's source. The hook's purpose is to edit the commit | |
# message file. If the hook fails with a non-zero status, | |
# the commit is aborted. | |
# | |
# This hook automatically inserts Task/Subtask headings into commit messages. | |
# Each line in .git/task file gets added as a level. |
# -*- coding: utf-8 -*- | |
$:.unshift('/Library/RubyMotion/lib') | |
require 'motion/project/template/ios' | |
require 'bundler' | |
Dir.glob('./config/*.rb').each { |file| require file } | |
if ARGV.join(' ') =~ /spec/ | |
Bundler.require :default, :development, :spec | |
elsif ARGV.join(' ') =~ /testflight/ |
nnoremap <silent> <Leader>a :set opfunc=Append<CR>g@ | |
nnoremap <silent> <Leader>i :set opfunc=Insert<CR>g@ | |
function! Append(type, ...) | |
call feedkeys("`]a", 'n') | |
endfunction | |
function! Insert(type, ...) | |
call feedkeys("`[i", 'n') | |
endfunction |