Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save vishaltelangre/5075346 to your computer and use it in GitHub Desktop.

Select an option

Save vishaltelangre/5075346 to your computer and use it in GitHub Desktop.

Revisions

  1. vishaltelangre revised this gist Feb 4, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion auto_install_sublime_packages.markdown
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    * Oh, fuckin' `ctrl+shift+p``Package Control: Install Package` is very nasty... right?
    * To install packages, every time pressing ' `ctrl+shift+p``Package Control: Install Package` is very cumbersome task... right?

    * After fresh installation of ST2, open it and <code>ctrl+`</code> and hit enter after pasting below line [(1)][1]:

  2. vishaltelangre revised this gist Mar 3, 2013. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions auto_install_sublime_packages.markdown
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    * Oh, fuckin' `ctrl+shift+p``Package Control: Install Package` is very nasty... right?

    * After fresh installation of ST2, open it and <code>ctrl+`</code> and hit enter after pasting below line (1)[1]:
    * After fresh installation of ST2, open it and <code>ctrl+`</code> and hit enter after pasting below line [(1)][1]:

    ```python
    import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print('Please restart Sublime Text to finish installation')
    @@ -13,7 +13,7 @@
    cd $HOME/.config/sublime-text-2/Packages/User && touch Package\ Control.sublime-settings
    ```

    * Add below json _(these packages were stable at the time of writing this gist, maybe you can add yours to it)_ to this above created file, and save it (2)[2]:
    * Add below json _(these packages were stable at the time of writing this gist, maybe you can add yours to it)_ to this above created file, and save it [(2)][2]:

    ```json
    {
  3. vishaltelangre revised this gist Mar 3, 2013. 1 changed file with 2 additions and 5 deletions.
    7 changes: 2 additions & 5 deletions auto_install_sublime_packages.markdown
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,6 @@
    Automate package installation in (fresh) ST2
    ============================================

    * Oh, fuckin' `ctrl+shift+p``Package Control: Install Package` is very nasty... right?

    * After fresh installation of ST2, open it and <code>ctrl+`</code> and hit enter after pasting below line [[1]][1]:
    * After fresh installation of ST2, open it and <code>ctrl+`</code> and hit enter after pasting below line (1)[1]:

    ```python
    import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print('Please restart Sublime Text to finish installation')
    @@ -16,7 +13,7 @@ Automate package installation in (fresh) ST2
    cd $HOME/.config/sublime-text-2/Packages/User && touch Package\ Control.sublime-settings
    ```

    * Add below json _(these packages were stable at the time of writing this gist, maybe you can add yours to it)_ to this above created file, and save it [[2]][2]:
    * Add below json _(these packages were stable at the time of writing this gist, maybe you can add yours to it)_ to this above created file, and save it (2)[2]:

    ```json
    {
  4. vishaltelangre created this gist Mar 3, 2013.
    158 changes: 158 additions & 0 deletions auto_install_sublime_packages.markdown
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,158 @@
    Automate package installation in (fresh) ST2
    ============================================

    * Oh, fuckin' `ctrl+shift+p``Package Control: Install Package` is very nasty... right?

    * After fresh installation of ST2, open it and <code>ctrl+`</code> and hit enter after pasting below line [[1]][1]:

    ```python
    import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print('Please restart Sublime Text to finish installation')
    ```
    * Restart ST2.

    * Open terminal, and navigate to Sublime's dir under your home folder by below command and create file w/ name `Package Control.sublime-settings` there in:

    ```bash
    cd $HOME/.config/sublime-text-2/Packages/User && touch Package\ Control.sublime-settings
    ```

    * Add below json _(these packages were stable at the time of writing this gist, maybe you can add yours to it)_ to this above created file, and save it [[2]][2]:

    ```json
    {
    "installed_packages":
    [
    "Alignment",
    "Alternative Autocompletion",
    "ApacheConf.tmLanguage",
    "Auto Encoding for Ruby",
    "Autocomplete Javascript with Method Signature",
    "AutoFileName",
    "Backbone.js",
    "BeautifyRuby",
    "Bracketeer",
    "BracketHighlighter",
    "BufferScroll",
    "C++",
    "ChangeQuotes",
    "CoffeeCompile",
    "CoffeeScript",
    "CoffeeScript Function Finder",
    "Color Highlighter",
    "Color Scheme - Default",
    "ColorPick",
    "ColorSchemeSelector",
    "Console API Snippets (JavaScript)",
    "copy-file-name",
    "CSS",
    "CSS Less(ish)",
    "CSS Media Query Snippets",
    "CSS Snippets",
    "CSScomb",
    "CSSFormat",
    "Csslisible",
    "CSSTidy",
    "CTags",
    "Current Scope",
    "Dayle Rees Color Schemes",
    "Default",
    "DetectSyntax",
    "Diff",
    "ERB Insert and Toggle Commands",
    "ERB Snippets",
    "Git",
    "Git Status Files",
    "GitGutter",
    "Hacker News",
    "Haml",
    "HighlightDuplicates",
    "HTML",
    "HTML2Haml",
    "HTML5",
    "HTMLAttributes",
    "HtmlTidy",
    "InsertDate",
    "JavaScript",
    "JavaScript Snippets",
    "jQuery",
    "jQuery Snippets pack",
    "JS Snippets",
    "JS2Coffee",
    "JsFormat",
    "JSHint",
    "JsMinifier",
    "Language - English",
    "LESS",
    "Less2Css",
    "Line Completion",
    "LineEndings",
    "Logs Colorize",
    "LoremIpsum",
    "Markdown",
    "Markdown Preview",
    "Meld diff",
    "Missing Palette Commands",
    "MoveText",
    "Nodejs",
    "Open Folder",
    "Open Recent Files",
    "Package Control",
    "PHP",
    "Placehold.it Image Tag Generator",
    "PlainTasks",
    "Prefixr",
    "Pretty JSON",
    "Python",
    "Rails",
    "Rails Partial",
    "Regular Expressions",
    "Ruby",
    "Ruby on Rails snippets",
    "RubyFormat",
    "RubyToggleString",
    "Sass",
    "SCSS",
    "SCSS Snippets",
    "Search Anywhere",
    "ShellScript",
    "SideBarEnhancements",
    "Simple Rails Navigator",
    "SortTabs",
    "SQL",
    "Sublime-HTMLPrettify",
    "SublimeWebColors",
    "SyncedSideBar",
    "Textile",
    "Theme - Default",
    "Theme - Night",
    "Themr",
    "Todo",
    "Toggle Symbol to String",
    "Twig",
    "Unicode Character Highlighter",
    "URLEncode",
    "User",
    "Vintage",
    "WordCount",
    "XML",
    "YAML"
    ]
    }
    ```

    * Now when you open your ST2 again, it looks for this file, and if the packages specified in this file are missing, then it automatically downloads and installs for you!

    * <code>ctrl+`</code> to see what's it installing, (displays tailed log of al the happenings in your ST2 environment)!

    * You just seat back for some time and watch it or bring some popcorn and hot tea! It takes no time either!

    ;)

    _ _ _

    #### References
    + [http://wbond.net/sublime_packages/package_control/installation] [1]
    + [https://github.com/mrmartineau/SublimeTextSetup/issues/3] [2]

    [1]: http://wbond.net/sublime_packages/package_control/installation "Sublime Package Control Installation"
    [2]: https://github.com/mrmartineau/SublimeTextSetup/issues/3 "Paul Irish and Wbond Thread on GitHub"