- Vim Rspec - Run specs from within Vim
- Vim Tmux Runner - Send arbitrary text and commands from a Vim session to a tmux pane.
- Vim Tmux Navigator - Navigate between Vim and tmux panes seamlessly
- Tbone - Alternate plugin bridge between Vim and Tmux
This file contains 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
" Change the current working directory to the directory that the current file you are editing is in. | |
nnoremap <Leader>cd :cd <C-R>=escape(expand('%:p:h'), ' ')<CR><CR> | |
" Opens a file with the current working directory already filled in so you have to specify only the filename. | |
nnoremap <Leader>e :e <C-R>=escape(expand('%:p:h'), ' ')<CR>/ | |
nnoremap <Leader>s :split <C-R>=escape(expand('%:p:h'), ' ')<CR>/ | |
nnoremap <Leader>v :vsplit <C-R>=escape(expand('%:p:h'), ' ')<CR>/ |
This file contains 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
# Kill current session and switch to next | |
tk () { | |
current_session=$(tmux display-message -p '#S') | |
tmux switch-client -n | |
tmux kill-session -t "$current_session" | |
} |
This file contains 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
function! PrintGivenRange() range | |
echo "firstline ".a:firstline." lastline ".a:lastline | |
echo "firstline contents" . getline(a:firstline) | |
echo "lastline contents" . getline(a:lastline) | |
endfunction | |
command! -range PassRange <line1>,<line2>call PrintGivenRange() | |
vmap ,pr :PassRange<cr> |
This file contains 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
# Use vim keybindings in copy mode | |
setw -g mode-keys vi | |
bind-key -t vi-copy v begin-selection | |
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy" | |
unbind -t vi-copy Enter | |
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy" |
This file contains 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 "fitgem" | |
require "pp" | |
require "yaml" | |
config_file = begin | |
File.open(".fitgem.yml") | |
rescue Object => e | |
puts 'No .fitgem.yml config file found' |
Summary of the keymaps active on http://perspectiveapp.com. Note, these are only active on the /projects, /next, and /now pages.
\<Esc>
=> Refocus the current list (projects, next, now)g:p
=> Go to Projects pageg:x
=> Next Actions pageg:w
=> Now Items page
This file contains 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
// Compiled js version of spanWrapper library written in coffeescript. | |
// Source code can be found in https://gist.github.com/4075843 | |
var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; | |
window.CJT || (window.CJT = {}); | |
CJT.SpanWrapper = (function() { | |
SpanWrapper.prototype.STRING_NOT_FOUND = -1; |
This file contains 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
window.CJT or= {} | |
class CJT.SpanWrapper | |
STRING_NOT_FOUND: -1 | |
constructor: (options={}) -> | |
@tagname = options.tagname ? 'span' | |
@classname = options.classname ? '' | |
wrap: (target, searchString) => |
This file contains 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
preRender = -> | |
canvas = document.getElementById 'preRender' | |
context = canvas.getContext '2d' | |
radius = 20 | |
centerX = centerY = radius + 1 | |
context.beginPath() | |
context.arc centerX, centerY, radius, 0, (2 * Math.PI), false | |
x = Math.floor(radius - (radius / 3)) |