Skip to content

Instantly share code, notes, and snippets.

@yuya-matsushima
Created September 2, 2011 12:04
Show Gist options
  • Select an option

  • Save yuya-matsushima/1188446 to your computer and use it in GitHub Desktop.

Select an option

Save yuya-matsushima/1188446 to your computer and use it in GitHub Desktop.
vimでCodeIgniterでhogehogeする為の関数。vimrcに追加または読み込む
function! Cucfirst(str)
return substitute(strpart(a:str,0,strlen(a:str)-4), '\w\+', '\u\0', "")
endfunction
function! CiFilePos(str)
if a:str =~ ".\.system.\."
return '.' . matchstr(a:str, "\/system/.*$")
elseif a:str =~ ".\.application.\."
return '.' . matchstr(a:str, "\/application/.*$")
else
return a:str
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment