LoginSignup
0
0

More than 3 years have passed since last update.

シェルのメモ

Posted at

自分用のメモなのでかなりてきとうです。

vim

delete word

dw

delete 文末まで

d$

delete word 空白は消さない

de

単語の移動

3w

単語の移動(終端まで)

3e

オペレータによる削除 d オペレータ

d2w
d3e

文末に移動

$

3行を削除

3dd

コマンド取り消し

u

行全体の取り消し

U

削除した文を貼り付け

p

文字列の置き換え

r

単語の置き換え

cw

文末まで置き換え

c$

ファイルの状態表示

CTRL + G

最下行に移動

G

先頭に移動

gg

行に移動

行番号 G

検索

/

進む

n

戻る

N

逆方向に検索

?

対応する括弧に移動

%

行を置換

:s/old_text/new_text/g

範囲置換

:10,20s/old_text/new_text/g

ファイル全体で置換

:%s/ふるいなまえ/あたらしいなまえ/g

確認しながら置換

:%s/ふるいなまえ/あたらしいなまえ/gc

外部コマンドの実行

:! ls

ファイルの作成

:w sample.txt

次の行にインサート

o

前の行にインサート

O
R

カーソルの下にある単語を後方検索

*

カーソルの上にある単語を後方検索

#

tmux

新しいペイン

%
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0