EthanBrown.SublimeText2.UtilPackages
- Sublime package featuring the best general utility, file manipulation, navigation, sidebar enhancements, themes, color schemes, etc - AdvancedNewFile, ConsoleExec, EncodingHelper, KeymapManager, MoveTab, Navigation History, Open Recent Files, OpenSearchResult, RecentActiveFiles, Search Anywhere, SideBarEnhancements, Sublime Files, Soda Theme - Also includes a custom keybinding package hosted on GitHub - Merges in customized settings for User Preferences - Fixed minor bug in JSON helpers when adding to a simple map
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"installed_packages":
|
||||
[
|
||||
"AdvancedNewFile",
|
||||
"ConsoleExec",
|
||||
"EncodingHelper",
|
||||
"KeymapManager",
|
||||
"MoveTab",
|
||||
"Navigation History",
|
||||
"Open Recent Files",
|
||||
"OpenSearchResult",
|
||||
"Package Control",
|
||||
"RecentActiveFiles",
|
||||
"Search Anywhere",
|
||||
"SideBarEnhancements",
|
||||
"Sublime Files",
|
||||
"Theme - Soda",
|
||||
"ZZZ.EthanBrown.SublimeKeyMap.Util"
|
||||
],
|
||||
"package_name_map": {
|
||||
"SublimeKeyMap.Util": "ZZZ.EthanBrown.SublimeKeyMap.Util"
|
||||
},
|
||||
"repositories":
|
||||
[
|
||||
"https://github.com/abrookins/OpenSearchResult",
|
||||
"https://github.com/Iristyle/SublimeKeyMap.Util"
|
||||
]
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"close_windows_when_empty": true,
|
||||
"highlight_modified_tabs": true,
|
||||
"ignored_packages":
|
||||
[
|
||||
"Caret History",
|
||||
"GotoRecent",
|
||||
"MultiTaskBuild",
|
||||
"Open Related",
|
||||
"QuickFileMove",
|
||||
"SublimeREPL"
|
||||
],
|
||||
"theme": "Soda Dark.sublime-theme"
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"term_command": "{{term_command}}"
|
||||
}
|
@@ -0,0 +1,47 @@
|
||||
$package = 'EthanBrown.SublimeText2.UtilPackages'
|
||||
|
||||
function Get-CurrentDirectory
|
||||
{
|
||||
$thisName = $MyInvocation.MyCommand.Name
|
||||
[IO.Path]::GetDirectoryName((Get-Content function:$thisName).File)
|
||||
}
|
||||
|
||||
# simulate the unix command for finding things in path
|
||||
# http://stackoverflow.com/questions/63805/equivalent-of-nix-which-command-in-powershell
|
||||
function Which([string]$cmd)
|
||||
{
|
||||
Get-Command -ErrorAction "SilentlyContinue" $cmd |
|
||||
Select -ExpandProperty Definition
|
||||
}
|
||||
|
||||
try {
|
||||
. (Join-Path (Get-CurrentDirectory) 'JsonHelpers.ps1')
|
||||
. (Join-Path (Get-CurrentDirectory) 'SublimeHelpers.ps1')
|
||||
|
||||
$sublimeUserDataPath = Get-SublimeUserPath
|
||||
$sublimeFilesFileName = 'SublimeFiles.sublime-settings'
|
||||
$sublimeFiles = Join-Path (Get-CurrentDirectory) $sublimeFilesFileName
|
||||
|
||||
# TODO: this doesn't actually work in the Sublime plugin right now, but might in the future
|
||||
$ps = (Which powershell)
|
||||
$psRoot = Split-Path $ps
|
||||
|
||||
$escapedPs = $ps -replace '\\', '\\'
|
||||
([IO.File]::ReadAllText($sublimeFiles)) -replace '{{term_command}}', $escapedPs |
|
||||
Out-File -FilePath (Join-Path $sublimeUserDataPath $sublimeFilesFileName) -Force -Encoding ASCII
|
||||
|
||||
$packageControl = (Join-Path (Get-CurrentDirectory) 'Package Control.sublime-settings')
|
||||
Merge-PackageControlSettings -FilePath $packageControl
|
||||
|
||||
$preferences = (Join-Path (Get-CurrentDirectory) 'Preferences.sublime-settings')
|
||||
Merge-Preferences -FilePath $preferences
|
||||
|
||||
if (Get-Process -Name sublime_text -ErrorAction SilentlyContinue)
|
||||
{
|
||||
Write-Warning 'Please close and re-open Sublime Text to force packages to update'
|
||||
}
|
||||
Write-ChocolateySuccess $package
|
||||
} catch {
|
||||
Write-ChocolateyFailure $package "$($_.Exception.Message)"
|
||||
throw
|
||||
}
|
Reference in New Issue
Block a user