Skip to content

Instantly share code, notes, and snippets.

Avatar

inside

View GitHub Profile
@inside
inside / lodash-get-to-ramda-path.js
Last active Nov 14, 2019
A codemod transforming lodash get to ramda path
View lodash-get-to-ramda-path.js
// This transform converts stuff like:
//
// import get from 'lodash/get'
// const bar = get(foo, 'foo.bar', 'baz')
//
// to
//
// import { pathOr } from 'ramda'
// const bar = pathOr('baz', ['foo', 'bar'], foo)
//
@inside
inside / .vimrc
Created Dec 5, 2012
Vim tab map for completion
View .vimrc
" This can conflict with the default mappings provided by snipmate.
" See the after directory in .vim/bundle/snipMate/after
function! SuperCleverTab()
if strpart(getline('.'), 0, col('.') - 1) =~ '^\s*$'
return "\<Tab>"
elseif pumvisible()
return "\<c-n>"
else
if &omnifunc != ''
return "\<C-X>\<C-O>"
You can’t perform that action at this time.