Skip to content

Instantly share code, notes, and snippets.

[
{
"type":"function",
"supports":[
"ag",
"grep",
"rg",
"git-grep"
],
"language":"elisp",
((type . [function supports [ag grep rg git-grep] language elisp regex \\((defun|cl-defun)\\s+JJJ\\j tests [(defun test (blah) (defun test
(cl-defun test (blah) (cl-defun test
] not [(defun test-asdf (blah) (defun test-blah
(cl-defun test-asdf (blah) (cl-defun test-blah
]])
(type . [variable supports [ag grep rg git-grep] language elisp regex \\(defvar\\b\\s*JJJ\\j tests [(defvar test (defvar test
]])
(type . [variable supports [ag grep rg git-grep] language elisp regex \\(defcustom\\b\\s*JJJ\\j tests [(defcustom test (defcustom test
]])
(type . [variable supports [ag grep rg git-grep] language elisp regex \\(setq\\b\\s*JJJ\\j tests [(setq test 123)] not [setq test-blah 123)]])
command! Restclient echon system(join(['emacs',expand('%'),'--quick','--batch','--eval="'
\ .'(progn (setq package-load-list ''((restclient t)))'
\ .'(package-initialize)(require ''restclient)(restclient-mode)'
\ .'(goto-char (point-min)) (forward-line (1- '.line('.').'))'
\ .'(restclient-http-send-current)'
\ .'(while restclient-within-call (sit-for 0.05))'
\ .'(switch-to-buffer \"*HTTP Response*\" )(princ (buffer-substring-no-properties (point-min)(point-max)))(terpri)))"'
\ , '2>/dev/null']))
@bounceme
bounceme / fc
Created February 27, 2017 18:18
https://github.com/flycheck/flycheck/blob/master/flycheck.el#L4097
@bounceme
bounceme / filterqf
Last active February 11, 2017 20:32
function! g:FilterQf(ob)
let [cc,bnr] = [[],bufnr('%')]
let shm = &shortmess
set shortmess+=A
for i in a:ob
silent! exe 'hide keepalt keepjumps b ' . get(i,'bufnr')
let [ln,cl] = [get(i,'lnum'),get(i,'col')]
if synIDattr(synID(ln, cl ? cl : matchend(getline(ln),'^\s*\S'),0),'name')
\ !~? 'string\|regex\|comment'
call add(cc,deepcopy(i))
" https://github.com/bounceme/poppy.vim
function! g:Compose(...)
let l:args = a:000
return {...->eval(execute("let ret = a:000|let i = (len(".string(l:args).")-1)"
\ ."|while i>-1|let ret = [call(".string(l:args)."[i],ret)]"
\ ."|let i -= 1|endwhile|echon string(ret[0])"))}
endfunction
echom Compose('toupper','join','uniq','split','printf')('%s','aa bb aa aa b b b b')
@bounceme
bounceme / neomakefly.vim
Last active October 4, 2016 04:59
on-the-fly ide
augroup async
au!
augroup END
function! MYIDE()
au! async
if !empty(neomake#GetJobs()) || &buftype ==? 'nofile'
return
endif
if filereadable('s:neomaketemp')
call delete(s:neomaketemp)