I hereby claim:
- I am davidmh on github.
- I am chaac (https://keybase.io/chaac) on keybase.
- I have a public key whose fingerprint is 91DC 6839 9375 4082 600D 9318 9D55 8125 A705 A525
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
set fish_git_dirty_color red | |
set fish_git_not_dirty_color white | |
function parse_git_branch | |
set -l branch (git branch 2> /dev/null | grep -e '\* ' | sed 's/^..\(.*\)/\1/') | |
set -l git_status (git status -s) | |
if test -n "$git_status" | |
echo (set_color normal)$branch(set_color $fish_git_dirty_color)●(set_color normal) | |
else |
let mapleader = "<Space>" | |
unmap b | |
map <Leader>b :buffer | |
map #n nextSearchResult | |
map n :execute #nzz<CR> | |
site '*://*.reddit.com/*' { | |
unmap j | |
unmap k | |
set numerichints |
<?php # -*- coding: utf-8 -*- | |
namespace WPSE; | |
/* Plugin Name: Fast Next/Prev Post Links | |
* Plugin URI: http://wordpress.stackexchange.com/q/101435/ | |
*/ | |
add_action( | |
'fast_prev_post_link', | |
__NAMESPACE__ . '\fast_prev_post_link', | |
10, |
function! Cmd2QuickFix(command, prompt, use_swoop) | |
" use the current word as the default value | |
let default = expand("<cword>") | |
call inputsave() | |
let pattern = input(a:prompt, default) | |
call inputrestore() | |
if empty(pattern) | |
echo a:command . ' needs a pattern, see :h ' . a:command | |
else | |
exe 'silent ' . a:command . ' ' . pattern . ' | redraw!' |
" Term bindings | |
" | |
" Spawns | |
" open shell on the current window | |
nnoremap <c-t><c-e> :e term://$SHELL<CR>A | |
" open vertical shell | |
nnoremap <c-t><c-v> <c-w><c-v><c-w><c-l>:e term://$SHELL<CR>A | |
" open horizontal shell | |
nnoremap <c-t><c-s> <c-w><c-s><c-w><c-j>:e term://$SHELL<CR>A | |
" |
With UltiSnips
mkdir -p ~/.vim/UltiSnips/
cat nerdwallet.snippets >> ~/.vim/UltiSnips/javascript.snippets
Converted from sublime snippets using: https://github.com/rendom/Sublimetext-snippets-to-Ultisnips
Most of the snippets work just fine, some others need some extra translation.
#!/bin/sh | |
# Called by "git push" after it has checked the remote status, but before anything has been | |
# pushed. If this script exits with a non-zero status nothing will be pushed. | |
# | |
# This hook is called with the following parameters: | |
# | |
# $1 -- Name of the remote to which the push is being done | |
# $2 -- URL to which the push is being done | |
# |
command! ZoomServer call system('tmux resize-pane -Z -t 2') | |
command! ZoomClient call system('tmux resize-pane -Z -t 1') | |
command! RestartClient call system('tmux send-keys -t 1 C-c "npm run dev" Enter') | |
command! RestartServer call system('tmux send-keys -t 2 C-c "npm run start-dev" Enter') | |
nnoremap <silent> <leader>zc :ZoomClient<CR> | |
nnoremap <silent> <leader>zs :ZoomServer<CR> | |
nnoremap <silent> <leader>rc :RestartClient<CR> | |
nnoremap <silent> <leader>rs :RestartServer<CR> |