Skip to content

Instantly share code, notes, and snippets.

@h14i
Last active August 29, 2015 13:56
Show Gist options
  • Save h14i/9293391 to your computer and use it in GitHub Desktop.
Save h14i/9293391 to your computer and use it in GitHub Desktop.
yet another ruby include configs.
" support rack app?
let &l:include = '^\s*\<\%(load\|autoload\|require_relative\|require\|include\|use\|register\)\>\s*:\=["'']\=\(\h\w*\)["'']\=,\='
let &l:includeexpr = "substitute(substitute(tolower(substitute(substitute(v:fname,'\\(\\u\\+\\)\\(\\u\\l\\)','\\1_\\2','g'),'\\(\\l\\|\\d\\)\\(\\u\\)','\\1_\\2','g')),'::','/','g'),'$','.rb','')"
" setlocal path=/to/your/...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment