Table of Content

why integrate sublime text3 to cmder

Sometimes open sublime text in split window with cmder is more elegant and efficient.

The idea is from page.

The improvement on alias of cmder

  • the sample in above page is only cmder cmd alias, sublime text3 placed in vender folder, I give more flexible sample to portable sublime text3 in portabledevops toolset;
  • add new sample for cmder bash

launch sublime text3 in cmder cmd

assume we already have portable sublime text3 in portabledevops:
/portableapps/sublimetext3

add alias to %CMDER_ROOT%\config\user-aliases.cmd,
st="%CMDER_ROOT%\..\sublimetext3\sublime_text.exe" $* -new_console:s50H

then launch sublime text3, 
λ st test

launch sublime text3 in cmder bash

added lines to bash alias only when run from cmder,

portabledevops.sh

if [ -d $PORTABLEPATH/sublimetext3 ]; then
    alias st3=$PORTABLEPATH/sublimetext3/sublime_text.exe
    # only for cmder, start sublime text3 in split window
    if [ $(env|grep CMDER_ROOT) ];then
        alias st="$PORTABLEPATH/sublimetext3/sublime_text.exe $* -new_console:s50H"
    fi
fi