본문 바로가기

Dev/Tool

Sublime Text 초기 설정(Font, Encoding, Package Manager, etc..)

1. Settings-User 설정

Settings-User 항목에서 다음 내용대로 XML 설정


// Settings in here override those in "Default/Preferences.sublime-settings", and
// are overridden in turn by file type specific settings.
{
  "font_face": "나눔고딕코딩",
  "font_size": 10,
  "tab_size": 2,
  "translate_tabs_to_spaces": true,
  "word_wrap": true,
  "default_encoding": "UTF-8"
}


2. Package Control 설정

- 아래의 코드를 Sublime Text Menu에서 Show Console로 콘솔창을 연 뒤에 붙여넣기 함.


2.1. Sublime Text 2


// sublime text 2 기준

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')


2.2. Sublime Text 3


// sublime text 3 기준

import urllib.request,os,hashlib; h = '7183a2d3e96f11eeadd761d777e62404' + 'e330c659d4bb41d3bdf022e94cab3cd0'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)