diff options
author | katherine <shmibs@shmibbles.me> | 2018-03-23 22:00:15 -0700 |
---|---|---|
committer | katherine <shmibs@shmibbles.me> | 2018-03-23 22:00:15 -0700 |
commit | fcc7e32d32fd7a91f0466a013e2a90fa8fdef8df (patch) | |
tree | b9b691556ff0a40d3e8de6f2a4f2c4c0444e53d5 /.vimrc | |
parent | 3d358aaaec51e6e94bc0cd6c6bda5e7ae5757be3 (diff) | |
download | dotfiles-fcc7e32d32fd7a91f0466a013e2a90fa8fdef8df.tar.gz |
clean up vim skeleton loading
Diffstat (limited to '.vimrc')
-rw-r--r-- | .vimrc | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -284,14 +284,15 @@ function! Settings_skel_read() if filereadable(split(&rtp, ',')[0] . "/skel/" . &ft) == 0 return 1 end - execute 'r ' . split(&rtp, ',')[0] . "/skel/" . &ft - "move cursor to START - execute "normal ggJ/%START%\<CR>:%s/%START%//g\<CR>" - redraw! + execute 'silent! r ' . split(&rtp, ',')[0] . "/skel/" . &ft + "read the date into %DATE% + execute '%s/%DATE%/' . system("date '+%a, %B %d, %Y'|tr -d '\n'") . '/ge' + "move cursor to %START% + execute "silent! normal! ggJ/%START%\<CR>:s/%START%//\<CR>" endfunction autocmd FileType * call Settings_skel_read() -""write mode" for markup-type formats +""write mode" for prose-y formats function! Settings_sub_wmodetoggle() if &fo =~ 'a' setlocal formatoptions-=a |