Created
June 28, 2020 14:23
-
-
Save njpearman/95d0d2bed23f421527553a1307224c66 to your computer and use it in GitHub Desktop.
VimScript journal opener
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" My first super-simple and hardcoded bit of VimScript | |
" that opens up a markdown-based journal file | |
function! JournalToday() | |
let filename = strftime("~/journal/%Y-%m-%d.markdown") | |
echo "Opened journal: " . filename | |
execute "vsplit" filename | |
endfunction | |
" executing a function is literal: enter command-line mode, enter call and the | |
" function name, and press return | |
nnoremap <leader>jt :call JournalToday()<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment