Skip to content

Instantly share code, notes, and snippets.

View itsip's full-sized avatar

Ian Paterson itsip

View GitHub Profile
@itsip
itsip / .vimrc
Created September 11, 2018 17:27
Step through to vue files
" Go to vue component
nnoremap <leader>vu :call GoToVue()<CR>
function! GoToVue()
execute "set isk+=-"
normal "lyiw
execute "set isk-=-"
let filename = @l
let file = system("find resources/assets/js -name " . filename . ".vue")
execute "edit " . file
@itsip
itsip / .vimrc
Created September 5, 2018 14:57
function for going to plugin
" Go to github plugin page
nnoremap <leader>pl :call GoToPlugin()<CR><CR>
function! GoToPlugin()
normal "lyi'
let plugin = @l
execute "!open https://www.github.com/" . plugin
endfunction
@itsip
itsip / .vimrc
Last active September 19, 2017 21:59
function for stepping through blade partials
nnoremap <leader>p :call GoToPartial()<CR>
function! GoToPartial()
normal "lyi'
let partial = @l
let file = substitute(partial, "\\.", "/", "g")
execute "edit resources/views/" . file . ".blade.php"
endfunction