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:
" Ag / git grep | |
function! s:ag_to_qf(line) | |
let parts = split(a:line, ':') | |
return { 'filename': parts[0] | |
\,'lnum': parts[1] | |
\,'col': parts[2] | |
\,'text': join(parts[3:], ':') | |
\ } | |
endfunction |
" 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 | |
" |
let g:mapleader = "\<SPACE>" | |
" Show white spaces at the end of a line | |
set list listchars=tab:▸\ ,eol:¬,trail:· | |
" edit this nvim config | |
nnoremap <silent> <leader>ev :vs $HOME/.config/nvim/init.vim<CR> | |
" auto-reload | |
augroup VimConfig | |
au! |
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!' |
" reverse-i-search | |
function! s:get_history() | |
redir => history | |
silent! history | |
redir END | |
return map(split(history, '\n'), "strpart(v:val, 9)") | |
endfunction | |
function! s:run_cmd(cmd) | |
execute a:cmd | |
endfunction |
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 |
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 |
set fish_git_dirty_color red | |
set fish_git_not_dirty_color green | |
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 $fish_git_dirty_color)$branch(set_color normal) | |
else |
I hereby claim:
To claim this, I am signing this object:
" Ignore some folders and files for CtrlP indexing | |
let g:ctrlp_custom_ignore = { | |
\ 'dir': '\.git$\|\.yardoc\|node_modules\|log\|tmp$', | |
\ 'file': '\.so$\|\.dat$|\.DS_Store$' | |
\ } |