Add a config file that is easily saveable to dotfiles
Opened this issue · 0 comments
gibfahn commented
Currently if I want to save my config, I can go symlink ~/Library/Preferences/dexterleng.vimac.plist
into my dotfiles repo, however there are two issues with this:
- On startup, if the file is a symlink, Vimac deletes the symlink and creates a new file, so any changes I make in Vimac aren't persisted.
- the defaults file includes the SULastCheckTime, which means it changes on every launch, polluting git history.
Current file looks something like this:
{
"HintCharacters" => "tnseriaodhplfuwyq;gjvmc,x.z/bk4738291056"
"hintModeActivationCount" => 5
"HintModeShortcut" => {length = 257, bytes = 0x62706c69 73743030 d4010203 04050607 ... 00000000 000000c7 }
"holdSpaceHintModeActivationEnabled" => 0
"NSWindow Frame com.sindresorhus.Preferences.FrameAutosaveName" => "000 000 000 000 0 0 0000 0000 "
"ScrollCharacters" => "h,n,e,i,d,u,G,gg"
"ScrollModeShortcut" => {length = 257, bytes = 0x62706c69 73743030 d4010203 04050607 ... 00000000 000000c7 }
"ScrollSensitivity" => 49
"SUHasLaunchedBefore" => 1
"SULastCheckTime" => 2021-08-05 10:44:43 +0000
"SULastProfileSubmissionDate" => 2021-08-05 10:44:42 +0000
"SUSendProfileInfo" => 1
}
Today you can use defaults write
for most things, e.g.:
defaults write dexterleng.vimac.plist holdSpaceHintModeActivationEnabled -bool true
which is probably a reasonable alternative, although persisting still has to be done manually.
But that gets a bit harder with HintModeShortcut
and ScrollModeShortcut
, which are of type data
.