Skip to content

Instantly share code, notes, and snippets.

@junegunn
junegunn / vimawesome.vim
Last active May 10, 2023 15:50
Plugin completion using VimAwesome API
" ----------------------------------------------------------------------------
" 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'
@imjasonh
imjasonh / markdown.css
Last active February 12, 2024 17:18
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@jamonholmgren
jamonholmgren / README.md
Last active August 29, 2015 14:15
RubyMotion REPL documentation helper.

Lets you check Cocoa Touch documentation from the RubyMotion REPL.

screenshot

License: MIT, 2015 Jamon Holmgren

@PeterRincker
PeterRincker / quick-replace.vim
Last active April 18, 2022 20:20 — forked from orlp/gist:8c25ed4abb36372bc6fe
Quick Replacements - gn with an n afterwards
" 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
@callahanrts
callahanrts / github.vim
Last active November 25, 2021 09:14
Vim command to open a browser tab at the selected line of any git project.
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>
@alxjrvs
alxjrvs / gist:4b73771294ea25feb2f7
Last active August 29, 2015 14:06
Android-motion Gotchas!

#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.
@staltz
staltz / introrx.md
Last active May 6, 2024 01:44
The introduction to Reactive Programming you've been missing
@elmart
elmart / prepare-commit-msg
Created May 9, 2014 18:53
Git prepare-commit-msg hook to automatically add task context headings
#!/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.
@dblandin
dblandin / Rakefile
Last active June 17, 2016 15:30 — forked from ParkinT/Rakefile
RubyMotion Configuration and Deploy/Release
# -*- 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/
@wellle
wellle / append.vim
Last active March 17, 2023 13:02
Commands to append after (and insert before) any text object. http://redd.it/1z93ww
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