Skip to content

Commit 3c9ca08

Browse files
committed
Merge branch 'master' of github.com:minsOne/minsOne.github.io
2 parents 73ccff9 + 70acfe4 commit 3c9ca08

2 files changed

Lines changed: 75 additions & 7 deletions

File tree

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
layout: post
3-
title: "[Shell]터미널에서 Sublime 실행하기"
3+
title: "[Shell]터미널에서 Sublime Text, Sublime Merge 실행하기"
44
description: ""
55
category: "Shell"
66
tags: [shell, terminal, softlink, profile]
@@ -9,17 +9,29 @@ tags: [shell, terminal, softlink, profile]
99

1010
처음에 sublime text를 설치한 후에 터미널에서 폴더 또는 파일을 열려고 할 때 여러가지 방법 중 profile과 symbolic link를 이용하여 실행하는 방법을 공유하고자 합니다.
1111

12+
## Sublime Text
13+
1214
### Symbolic Link
1315

14-
sublime text는 기본적으로 `/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl`으로 터미널에서 실행할 수 있습니다. 그러면 symbolic link를 이용하여 subl명령어를 만들 수 있습니다.
16+
Sublime Text는 기본적으로 `/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl`으로 터미널에서 실행할 수 있습니다. 그러면 symbolic link를 이용하여 subl명령어를 만들 수 있습니다.
1517

16-
ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
18+
```shell
19+
ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
20+
```
1721

18-
/usr/local/bin 폴더에서 subl 파일이 sublime text 프로그램을 가르키고 있음을 확인할 수 있습니다.
22+
/usr/local/bin 폴더에서 subl 파일이 Sublime Text 프로그램을 가르키고 있음을 확인할 수 있습니다.
1923

20-
lrwxr-xr-x 1 minsOne admin 64 7 19 02:23 subl -> /Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl
24+
```shell
25+
lrwxr-xr-x 1 minsOne admin 64 7 19 02:23 subl -> /Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl
26+
```
2127

22-
subl 명령어로 sublime text를 실행할 수 있습니다.
28+
subl 명령어로 Sublime Text를 실행할 수 있습니다.
29+
30+
```shell
31+
$ subl .
32+
# or
33+
$ subl [FilePath]
34+
```
2335

2436
### Profile
2537

@@ -31,4 +43,28 @@ export PATH에 sublime text 경로를 추가합니다.
3143

3244
export PATH=/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin:$PATH
3345

34-
subl 명령어로 sublime text를 실행할 수 있습니다.
46+
subl 명령어로 sublime text를 실행할 수 있습니다.
47+
48+
---
49+
50+
## Sublime Merge
51+
52+
Sublime Merge는 `/Applications/Sublime Merge.app/Contents/SharedSupport/bin/smerge` 으로 실행할 수 있습니다.
53+
54+
Sublime Text와 같이 symbolic link를 이용하여 명령어를 만들 수 있습니다.
55+
56+
```shell
57+
$ ln -sv "/Applications/Sublime Merge.app/Contents/SharedSupport/bin/smerge" /usr/local/bin/sm
58+
```
59+
60+
/usr/local/bin 폴더에서 sm 파일이 Sublime Merge 프로그램을 가르키고 있음을 확인할 수 있습니다.
61+
62+
```shell
63+
lrwxr-xr-x 1 minsOne admin 64 7 19 02:23 sm -> /Applications/Sublime Merge.app/Contents/SharedSupport/bin/smerge
64+
```
65+
66+
```shell
67+
$ sm .
68+
# or
69+
$ sm [GitProjectDirectory]
70+
```

_posts/2022/12/2022-12-25-ios-dynamic-input-data-on-view-using-flex-injectioniii.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,38 @@ class ViewControllerListenerMock: ViewControllerListener {
211211

212212
<br/><video src="{{ site.production_url }}/image/2022/12/20221225_02.mp4" width="800" controls autoplay></video><br/>
213213

214+
FLEX의 registerSimulatorShortcut 함수를 래핑한 코드입니다.
215+
216+
```swift
217+
import Foundation
218+
import FLEX
219+
220+
public struct SimulatorShortcut {
221+
222+
/// 시뮬레이터에서 키보드 입력을 받아 block을 수행하는 기능
223+
///
224+
/// FLEX의 registerSimulatorShortcut 함수를 조금 더 쉽게 사용하기 위해 래핑함
225+
///
226+
/// - Parameters:
227+
/// - key: 키보드에서 입력받을 키
228+
/// - modifiers: shift, command, alt/option 등의 Modifier 키
229+
/// - action: 키와 Modifier 키 조합을 눌렀을 때, 메인스레드에서 실행하는 block
230+
/// - description: '?' 키를 눌렀을 때 help 메뉴에서 표시하는 설명
231+
public static func register(with key: String,
232+
modifiers: UIKeyModifierFlags? = nil,
233+
action: @escaping () -> Void,
234+
description: String = "") {
235+
let modifiers: UIKeyModifierFlags = modifiers ?? .init(rawValue: 0)
236+
237+
FLEXManager.shared
238+
.registerSimulatorShortcut(withKey: key,
239+
modifiers: modifiers,
240+
action: action,
241+
description: description)
242+
}
243+
}
244+
```
245+
214246
## 참고자료
215247

216248
* Github

0 commit comments

Comments
 (0)