Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Seamless Sublime Text 3 Integration

Dax T Games edited this pageAug 15, 2020 ·7 revisions

For all you Windows developers using cmder, here's a method to integrateSublime Text 3 to work seamlessly in Cmder.

This is aneat feature of ConEmu that allows you to integrate any window into Cmder.

 

Pre-requirements


Setup

Assuming that we refer to the Cmder installation folder as[cmder_root]:

  1. Download the latestportable version ofSublime Text 3 (stable) orSublime Text 3 (dev) .zip file.

  2. Createa new folder called "Sublime Text 3" at this path:

    [cmder_root]\bin\Sublime_Text_3

  3. Extract the contents of theSublime Text 3 .zip file into the newly created folder

  4. Add the following line to your aliases in[cmder_root]\config\user_aliases.cmd:

    subl="%CMDER_ROOT%\bin\Sublime_Text_3\sublime_text.exe" $*

    Refer toSplit-pane integration section for splitting options.

    NOTE: Naturally you can replacesubl alias with whatever alias you have in mind, as long as it doesn't conflict with an existing command.

  5. Restart cmder, and you're done.

 

How to use

Open Cmder and type 'subl' following a file name. For example:

C:\Users\Fooλ subl bar.txt

Assuming that you are in theC:\Users\Foo directory within the cmder UI, this should openbar.txt in Sublime Text 3 and split the view.

Useful Tip!

  • If you want to edit along-boring-file-name.txt within the current working directory, typingsubl long and hittingTAB will autocomplete your partial input tosubl long-boring-file-name.txt.

Demo:

Tip: If thebar.txt does not exist, sublime will create a new file with the same name in the working directory. Watch thestatus-bar in the bottom.

You may close sublime usingFile → Exit from menu (orAlt +F +X) to go back to command-line in Cmder.

 

Split-pane integration

It is also possible to merge theSublime Text 3 UI into a Cmder tab, bysplitting the view into eitherhorizontal orvertical panes.

You can change the split behavior using the-new_console:s switch.

For example,-new_console:s75V will split the consolehorizontally where sublime will take up 75% of the view.

 

Edit theuser-aliases.cmd file to use any of the following switches:

sublv="%CMDER_ROOT%\bin\Sublime_Text_3\sublime_text.exe" $* -new_console:ssublv5="%CMDER_ROOT%\bin\Sublime_Text_3\sublime_text.exe" $* -new_console:s50Hsubls5="%CMDER_ROOT%\bin\Sublime_Text_3\sublime_text.exe" $* -new_console:s50Vsubls75="%CMDER_ROOT%\bin\Sublime_Text_3\sublime_text.exe" $* -new_console:s75V

✅ By default,-new_console:s is equivalent to-new_console:s50H.

Don't forget to reload aliases withalias /reload after each change!

 

  • Split will be created horizontally, both splits will take 50%

    -new_console:s or -new_console:s50H

 

  • Split will be created vertically, both splits will take 50%

    --new_console:s50V

 

Compact Integration

To make your sublime look better in Cmder, you can also remove further elements from Sublime Text 3.

You can remove themenu bar to make sublime look like an extension of Cmder.
To access the menu bar in sublime, you can always pressAlt.

For the minimalists, you can even remove the tabs completely.
Just be sure to remember all your shortcuts!

Horizontal SplitVertical Split

 

Quick Notes

  • You can change the tab group settings of Cmder inFeatures → Settings and check "one tab per group".
  • To quickly exit sublime, just pressAlt +F +X (File → Exit from the main menu).
  • To close the current tab in sublime, useCtrl +W.
  • To make sublime not remember your previously opened files, change these toPreferences → Settings from the main menu.
    • "hot_exit": false
    • "remember_open_files": false

 


Guide based on ideas from@expositor.

Clone this wiki locally

[8]ページ先頭

©2009-2025 Movatter.jp