# 1. Editor Basic

### Context actions

1. `opt + enter`
   * 커서가 위치한 곳에서 가능한 `Context Actions`를 보여준다.
   * `리팩토링` 할 때 유용하게 사용할 수 있다고 함.
   * 물론 리팩토링은 개인이 자기에 맞게 설정해야함.

### Search for actions

1. `Shift 연속 두번`(전체검색)
   * 전체검색
   * 맥의 `spotlight` 같은 기능
2. `com + shift + a`
   * `Action` 검색
   * 전체검색으로도 찾을 수 있지만 `action` 만을 찾기 위한 검색이다.

### Expand and shrink the code selection

1. `opt + shift + right`
   * 현재 커서가 위치한 곳 부터 단어의 끝까지 선택함.
2. `opt + up/down`
   * 현재 선택된 블록에서 선택 블록의 범위를 넓힌다.
   * 단어의 중간 -> 단어 전체
   * 한줄 -> 함수 블록
   * 함수 블록 -> 클래스 블
   * `down` 은 반대로 선택의 범위를 좁힘

### Comment line

1. `com + /`
   * 주석, 주석 풀

### Duplicate and delete lines

1. `com + d`
   * Duplicate
   * 커서가 위치한 라인을 복사, 바로 아래에 붙여넣기
   * 여러 라인에 대해서도 동작함.
2. `com + back`
   * 커서가 위치한 라인 하나를 지움

### Move code fragments

1. `opt + shift + down/up`
   * 커서가 위치한 라인의 위치를 바꿈
2. `com + shift + down/up`
   * 커서가 위치한 `함수`의 위치 위 아래로 바꾼다.

### Collapse

1. `com + -/+`
   * `-` 커서가 위치한 함수블록을 숨긴다.
   * `+` 숨겨진 함수 블록을 펼친다.
2. `cpm + shift + -/+`
   * 파일 전체를 숨기고 펼친다.

### Surround and unwrap

> surround with func

1. `com + opt + T`
   * 현재 커서가 위치한 라인 또는 선택된 코드 블록을 `surround with` 기능으로 감싼다.
   * 간단한 예로 `if` 로 묶는 기능, 반복문으로 묶는 기능등이 있음.
   * 사용자가 직접 세팅하면 효율적으로 감쌀 수 있을 것으로 보인다.
2. `com + shift + Del`
   * 반대로 `Surround` 를 풀 수 있다.
   * 은근히 사용성이 좋아 보인다.

### Multiple selection

> Multiple Cursors

1. `ctl + G`
   * 처음 ctl + g 를 누르고 타이핑을 하면 커서가 위치한 곳 또는 선택한 영역이 `replace` 된다.
   * 두번 이상 누르면 처음 커서가 위치했던 곳에서의 영역과 같은 코드를 찾고 커서를 새롭게 생성한다.
2. `ctl + shilft + G`
   * 마지막으로 생성된 커서를 지운다.
3. `com + ctl + G`
   * 파일 전체에 대해서 새로운 커서를 만든다.
4. `multiple - selection` 이 되어있는 상태에서 타이핑을 하면 `replace`가 된다.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://simian114.gitbook.io/blog/undefined-1/odds_and_ends/ide/rubymine/1.-editor-basic.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
