Skip to content

Commit

Permalink
Merge pull request robertbasic#12 from robertbasic/easy
Browse files Browse the repository at this point in the history
Add TitleCase helper
  • Loading branch information
robertbasic authored Jan 2, 2020
2 parents 26c9773 + cf120cc commit 4c776e6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions autoload/hugohelper.vim
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ function! hugohelper#TitleToSlug()
exe 'normal! f-r f-r '
endfun

function! hugohelper#TitleCase()
normal gg
exe '/^title'
normal! vi"u~
endfun

function! hugohelper#Draft()
call s:set_key('draft', 'true')
endfun
Expand Down
1 change: 1 addition & 0 deletions plugin/hugohelper.vim
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ command! -nargs=0 HugoHelperUndraft call hugohelper#Undraft()
command! -nargs=0 HugoHelperDateIsNow call hugohelper#DateIsNow()
command! -nargs=0 HugoHelperLastmodIsNow call hugohelper#LastmodIsNow()
command! -nargs=0 HugoHelperTitleToSlug call hugohelper#TitleToSlug()
command! -nargs=0 HugoHelperTitleCase call hugohelper#TitleCase()
command! -nargs=1 HugoHelperHighlight call hugohelper#Highlight(<f-args>)
command! -range -nargs=1 HugoHelperLink call hugohelper#Link(<f-args>)

Expand Down

0 comments on commit 4c776e6

Please sign in to comment.