Skip to content

Instantly share code, notes, and snippets.

@mriddle
Last active August 21, 2018 22:06
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mriddle/5242269 to your computer and use it in GitHub Desktop.
Save mriddle/5242269 to your computer and use it in GitHub Desktop.
My Boxen puppet-sublime config
class config::sublime {
define addpkg {
$packagedir = "/Library/Application Support/Sublime Text 2/Packages/"
$pkgarray = split($name, '[/]')
$pkgname = $pkgarray[1]
exec { "git clone https://github.com/${name}.git":
cwd => "/Users/${::luser}${packagedir}",
provider => 'shell',
creates => "/Users/${::luser}${packagedir}${pkgname}",
path => "${boxen::config::homebrewdir}/bin",
require => [Package['SublimeText2'], Class['git']],
}
}
$base = "/Users/${::luser}/Library/Application Support"
$structure = [ "${base}/Sublime Text 2", "${base}/Sublime Text 2/Packages" ]
file { $structure:
ensure => 'directory',
owner => "${::luser}",
mode => '0755',
}->
file { "${boxen::config::bindir}/subl":
ensure => link,
target => '/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl',
mode => '0755',
require => Package['SublimeText2'],
}->
file { "${base}/Sublime Text 2/Packages/User/Default (OSX).sublime-keymap":
content => '[{ "keys": ["super+ctrl+r"], "command": "reveal_in_side_bar"}]',
}->
file { "${base}/Sublime Text 2/Packages/User/Preferences.sublime-settings":
content => '
{
"color_scheme": "Packages/Color Scheme - Default/Solarized (Light).tmTheme",
"trim_trailing_white_space_on_save": true,
"tab_size": 2,
"translate_tabs_to_spaces": true
}'
}
addpkg { [
"jisaacks/GitGutter",
"surjikal/sublime-coffee-compile",
"jashkenas/coffee-script-tmbundle",
"revolunet/sublimetext-markdown-preview",
"SublimeColors/Solarized",
"wbond/sublime_package_control",
"eklein/sublime-text-puppet",
]:
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment