Skip to content

Instantly share code, notes, and snippets.

@GabrielMMelo
Last active April 1, 2022 09:28
Show Gist options
  • Save GabrielMMelo/374721c679852b0acc2b6c6be5c234cb to your computer and use it in GitHub Desktop.
Save GabrielMMelo/374721c679852b0acc2b6c6be5c234cb to your computer and use it in GitHub Desktop.
Batch file for start fast vim notes on Windows
@ECHO OFF
set yy=%date:~6,4%
set mm=%date:~3,2%
set dd=%date:~0,2%
SET today=%dd%-%mm%-%yy%
set hh=%time:~0,2%
set MM=%time:~3,2%
SET now=%hh%:%MM%
SET noteFilename="C:\Users\gabriel.marques.melo\Documents\notes\notes-%today%.md"
IF NOT EXIST %noteFilename% echo # Notes for %today% > %noteFilename%
START gvim.exe -c "norm Go" -c "norm Go## %now%" -c "norm zzo" -c "startinsert" %noteFilename%
Set oShell = CreateObject ("Wscript.Shell")
Dim strArgs
strArgs = "cmd /c fast_notes_vim.cmd"
oShell.Run strArgs, 0, false
@TriHydera
Copy link

TriHydera commented Apr 1, 2022

Use a variable for the user name or a way to get it from the computer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment