티스토리 뷰
vi "filename" : start a vi edit session of file
cursor, line, page move
h, j, k, l. ctrl + b, f.
("command mode") + ":" + "( )" + "Return"
"wq" (write and quit)
"q" (quit)
"q!" (force quit)
"w" (write)
vi Modes
command mode : keystrokes intepreted as commands
input mode : vi input with keystrokes entered into the file ( from command mode -> "i, a, o, I, A, O" )
last line mode : ex and search inputs ( from command mode -> " : ", " / ", " ? " )
cursor control
b : back word
w : front word
"number" + b or w : "number" back or front word
$ : end of line
^ : start of line
G : end line of text
"num" + G : Go to the "num" line
ctrl + g : display cursor location
"last line mode" + ": num" + "Return" : go to the "num" line
input control
i : insert new text
a : append new text
o : input new next line
O : input new prev line
text control
(#)x : work as "delete"
(#)X : work as "backspace"
(#)dw : delete word
(#)dd : delete the current line, delete "#" line from the current line
dG : delete through the last line of the file
u : undo the last modofication
U : Undo all modifications to current line
p : paste words or texts, lines (append)
P : past words or texts, lines (insert)
(#)yw : copy words
(#)yy : copy lines
(#)r : replace a character, # characters
R : replace mode (overwrite mode)
~ : toggle 대문자/소문자
cw : replace a word
. : repeat last change operation
search text
/text : search word, texts, regular expression
n : find the next occurrence of
N : find the next occurrence of the previously
Regular Expression
[oO]ne : search for one and One [ [Oo][Nn][Ee] ]
^text : search for text at the beginning of a line
text$ : search for text at the end of a line
. : Match any single character [ /o.e matches o[a-z,A-Z ...]e ]
character* : Match zero or more occurrences of character [ /on*e matches oe, one, onne, onnne, ... ]
.* : [ /o.*e matches oe, oae, obe, oaae, oabe, obbe, obae, occce, oczfe ... ]
global search and replace
:$,$s/original/replaced/ [all lines, but only one substitute each lines]
:$,$s/original/replaced/g [all lines, substitutes every occurrence of the text pattern]
{
eg) 1,$s/com/@@@/g [replaces every "com" to "@@@" through end of the file from the beginning of the file]
}
ex Commands
:w : write the current buffer to disk
:$,$w file : writhe lines $ through $ of the current buffer to file
:w file : write the current buffer to file
:e file : bring file into the edit buffer discarding the old buffer
:e! : discard all changes to the buffer reload the file from the disk
:r file : read in the contents of file after the current cursor location
:! command : execute the shell command, without exit vi editor
:set all : display all edit session options
:set number : turn on line numbering option [ create or edit a file called .exrc in your HOME directory, set automatically every time you enter vi ]
{
$ vi .exrc
".exrc" 20 lines, 322 characters
set ts=4 wm=8 showmode number autoindent autowrite showmatch report=1
map ^[h 1G
map ^[F G
map ^[V ^B
...
}
'IoT 과정' 카테고리의 다른 글
HPUX - File Name Generation (0) | 2017.06.21 |
---|---|
HPUX - Shell Advanced Features (0) | 2017.06.21 |
HPUX - Shell Basic (0) | 2017.06.21 |
HPUX - File Permissions and Access (0) | 2017.06.20 |
HPUX - Navigating the File System, Managing Files (0) | 2017.06.19 |
- Total
- Today
- Yesterday
- 엄청난 인내심과 시뮬레이션을 위한 아레나 툴
- Propositional and Predicate Logic
- 로젠
- arena simulation
- 최단경로 알고리즘
- 명제논리
- Discrete Mathematics
- 데이터 중심 애플리케이션 설계
- 이산수학
- 백준
- paul wilton
- rosen
- grafana cloud
- 그라파나
- Grafana
- Simulation
- 이산 수학
- 시뮬레이션
- 자바스크립트 예제
- 아레나 시뮬레이션
- flutter
- 가상 면접 사례로 배우는 대규모 시스템 설계 기초
- beginning javascript
- 대규모 시스템 설계 기초
- javascript
- 항해99
- 자바스크립트
- Arena
- 아레나시뮬레이션
- 아레나
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |