Skip to content

vi tips

This section summarizes information related to vi.

Reference(Japanese)

viエディタ入門

https://vim.jp.net/

viコマンド(vimコマンド)リファレンス

https://qiita.com/pe-ta/items/0510bee10bcfd88afeee

Usage

Manipulate windows

Split horizontally

1
:sp

file editing

1
:E

window switching

1
[Ctrl] + [w]

In Windows, use ↑, ↓ to switch

file handling

Start typing from the left of the cursor

1
i

Stop the previous operation (u: meaning Undo)

1
u

Exit without writing (meaning quit)

1
:q

Forced termination without writing

1
q!

End after writing

1
:wq

Forced termination after writing

1
:wq!

character cursor movement

Move to first line

1
[g] + [g]

or

1
[1] + [G](shift + g)

Moved to the end

1
[G](shift + g)

Go to next word

1
w

Move forward one word

1
b

To end of word

1
e

Comments