Using macOS, you may have had experiences of handling plist files. For example,
~/Library/Preferences/.GlobalPreferences.plist file holds some configurations of macOS. When you type
defaults write -g ApplePressAndHoldEnabled -bool false on terminal, the following lines are added to
So when you dig down the preferences or resources of macOS system, you’ll meet plist files.
darfink’s vim-plist plugin handles *.plist files quite well. A plist file is in one of three formats; json, binary, xml. macOS is bundled with the
plutil command that can convert a plist file from one format to another. The plugin also uses
plutil to handle read and write of plist files.
The plugin registers autocmd for
FileReadCmd to read *.plist files,
FileWriteCmd to write *.plist files.
BufWrite events are triggered after reading the file into the buffer, but
BufWriteCmd events are triggered before reading the file, and that autocmd should handle actual read and write operation of that file. These differences make handling plist files more complex.