Libreng Converter

Mga Utos ng Vim Cheat Sheet

Comprehensive Vim command cheat sheet. Maghanap ng 80+ mahahalagang Vim command na may mga halimbawa, paglalarawan, at isang-click na kopya.

i
Enter Insert mode before the cursor
Halimbawa:i
I
Enter Insert mode at the beginning of the line
Halimbawa:I
a
Enter Insert mode after the cursor
Halimbawa:a
A
Enter Insert mode at the end of the line
Halimbawa:A
o
Open a new line below and enter Insert mode
Halimbawa:o
O
Open a new line above and enter Insert mode
Halimbawa:O
v
Enter Visual mode (character selection)
Halimbawa:v
V
Enter Visual Line mode (line selection)
Halimbawa:V
Ctrl+v
Enter Visual Block mode (column selection)
Halimbawa:Ctrl+v
:
Enter Command-line mode
Halimbawa::w
Esc
Return to Normal mode from any mode
Halimbawa:Esc
R
Enter Replace mode (overwrite characters)
Halimbawa:R
h
Move cursor left
Halimbawa:5h
j
Move cursor down
Halimbawa:10j
k
Move cursor up
Halimbawa:10k
l
Move cursor right
Halimbawa:5l
w
Move to the start of the next word
Halimbawa:3w
b
Move to the start of the previous word
Halimbawa:3b
e
Move to the end of the current word
Halimbawa:2e
0
Move to the beginning of the line
Halimbawa:0
^
Move to the first non-blank character of the line
Halimbawa:^
$
Move to the end of the line
Halimbawa:$
gg
Move to the first line of the file
Halimbawa:gg
G
Move to the last line of the file
Halimbawa:G
:N
Jump to line number N
Halimbawa::42
Ctrl+f
Scroll forward (down) one screen
Halimbawa:Ctrl+f
Ctrl+b
Scroll backward (up) one screen
Halimbawa:Ctrl+b
Ctrl+d
Scroll down half a screen
Halimbawa:Ctrl+d
Ctrl+u
Scroll up half a screen
Halimbawa:Ctrl+u
H
Move cursor to the top of the screen
Halimbawa:H
M
Move cursor to the middle of the screen
Halimbawa:M
L
Move cursor to the bottom of the screen
Halimbawa:L
%
Jump to matching bracket, parenthesis, or brace
Halimbawa:%
x
Delete the character under the cursor
Halimbawa:x
dd
Delete (cut) the current line
Halimbawa:dd
dw
Delete from cursor to the end of the word
Halimbawa:dw
d$
Delete from cursor to the end of the line
Halimbawa:d$
D
Delete from cursor to end of line (same as d$)
Halimbawa:D
yy
Yank (copy) the current line
Halimbawa:yy
yw
Yank (copy) from cursor to end of word
Halimbawa:yw
p
Paste after the cursor
Halimbawa:p
P
Paste before the cursor
Halimbawa:P
u
Undo the last change
Halimbawa:u
Ctrl+r
Redo the last undone change
Halimbawa:Ctrl+r
cc
Change (delete and enter insert mode) the current line
Halimbawa:cc
cw
Change from cursor to end of word
Halimbawa:cw
c$
Change from cursor to end of line
Halimbawa:c$
.
Repeat the last change
Halimbawa:.
>>
Indent the current line one level to the right
Halimbawa:>>
<<
Unindent the current line one level to the left
Halimbawa:<<
==
Auto-indent the current line
Halimbawa:==
J
Join the current line with the line below
Halimbawa:J
~
Toggle case of character under cursor
Halimbawa:~
r{char}
Replace the character under the cursor with {char}
Halimbawa:ra
/{pattern}
Search forward for pattern
Halimbawa:/foo
?{pattern}
Search backward for pattern
Halimbawa:?foo
n
Repeat the last search in the same direction
Halimbawa:n
N
Repeat the last search in the opposite direction
Halimbawa:N
*
Search forward for the word under the cursor
Halimbawa:*
#
Search backward for the word under the cursor
Halimbawa:#
:s/old/new/g
Replace all occurrences of old with new on the current line
Halimbawa::s/foo/bar/g
:%s/old/new/g
Replace all occurrences of old with new in the whole file
Halimbawa::%s/foo/bar/g
:%s/old/new/gc
Replace all with confirmation prompts
Halimbawa::%s/foo/bar/gc
:noh
Clear the search highlight
Halimbawa::noh
:w
Save the current file
Halimbawa::w
:w filename
Save the current buffer as a new filename
Halimbawa::w newfile.txt
:q
Quit (close the window)
Halimbawa::q
:wq
Save and quit
Halimbawa::wq
:q!
Quit without saving (force quit)
Halimbawa::q!
:x
Save and quit (only writes if changes were made)
Halimbawa::x
:e filename
Open a file for editing
Halimbawa::e README.md
:sp
Split the window horizontally
Halimbawa::sp file.txt
:vsp
Split the window vertically
Halimbawa::vsp file.txt
Ctrl+w+w
Switch focus to the next split window
Halimbawa:Ctrl+w w
Ctrl+w+h/j/k/l
Move focus to the window in the given direction
Halimbawa:Ctrl+w l
:close
Close the current window split
Halimbawa::close
:only
Close all windows except the current one
Halimbawa::only
:bn
Switch to the next buffer
Halimbawa::bn
:bp
Switch to the previous buffer
Halimbawa::bp
:bd
Delete (close) the current buffer
Halimbawa::bd
:ls
List all open buffers
Halimbawa::ls
:b N
Switch to buffer number N
Halimbawa::b 2
:tabnew
Open a new tab
Halimbawa::tabnew file.txt
:tabn
Switch to the next tab
Halimbawa::tabn
:tabp
Switch to the previous tab
Halimbawa::tabp
:tabclose
Close the current tab
Halimbawa::tabclose
gt
Go to the next tab
Halimbawa:gt
gT
Go to the previous tab
Halimbawa:gT
q{a-z}
Start recording a macro into register {a-z}
Halimbawa:qq
q (stop)
Stop recording the current macro
Halimbawa:q
@{a-z}
Execute the macro stored in register {a-z}
Halimbawa:@q
@@
Repeat the last executed macro
Halimbawa:@@
N@{a-z}
Execute macro N times
Halimbawa:5@q
:reg
Show the contents of all registers
Halimbawa::reg
v then d
Select text in Visual mode then delete it
Halimbawa:vwd
v then y
Select text in Visual mode then yank (copy) it
Halimbawa:vwy
v then c
Select text in Visual mode then change it
Halimbawa:vwc
v then >
Indent selected text to the right
Halimbawa:vip>
vip
Select the current paragraph in Visual mode
Halimbawa:vip
viw
Select the current word in Visual mode
Halimbawa:viw
vis
Select the current sentence in Visual mode
Halimbawa:vis
V then J
Select lines in Visual Line mode then join them
Halimbawa:VjJ
:set number
Show line numbers
Halimbawa::set number
:set nonumber
Hide line numbers
Halimbawa::set nonumber
:syntax on
Enable syntax highlighting
Halimbawa::syntax on
:colorscheme
Change the color scheme
Halimbawa::colorscheme desert
:help {topic}
Open Vim help for a topic
Halimbawa::help :w
m{a-z}
Set a mark at the current cursor position
Halimbawa:ma
'{a-z}
Jump to the line of a mark
Halimbawa:'a
`{a-z}
Jump to the exact position of a mark
Halimbawa:`a
:set paste
Enable paste mode to avoid auto-indent issues
Halimbawa::set paste
:set ignorecase
Make searches case-insensitive
Halimbawa::set ignorecase
:set hlsearch
Highlight all search matches
Halimbawa::set hlsearch
ga
Show the ASCII value of the character under the cursor
Halimbawa:ga
zz
Center the current line on the screen
Halimbawa:zz
Ctrl+g
Show the current file name and cursor position
Halimbawa:Ctrl+g

Tungkol sa tool na ito

Isang komprehensibong gabay sa mabilisang sanggunian para sa mga utos ng vim. Mag-browse ng mga karaniwang ginagamit na command, syntax, at mga halimbawa na nakaayos ayon sa kategorya. Mahahanap at madaling gamitin sa mobile — i-bookmark ang pahinang ito para sa agarang pag-access kapag kailangan mo ng mabilis na paalala.

Paano gamitin

  1. I-browse ang mga nakategoryang seksyon ng sanggunian.
  2. Gamitin ang search bar upang maghanap ng mga partikular na command o syntax.
  3. Mag-click sa anumang entry upang makita ang mga halimbawa ng paggamit at paliwanag.
  4. Direktang kopyahin ang mga command para magamit sa iyong terminal o editor.

Mga madalas itanong

Napapanahon ba ang sanggunian na ito?
Sinasaklaw ng reference ang mga command at syntax na malawakang ginagamit na stable sa mga bersyon. Para sa mga pinakabagong karagdagan o feature na partikular sa bersyon, tingnan ang opisyal na dokumentasyon.
Maaari ko bang gamitin ito offline?
Kapag na-load na, gagana ang page nang walang koneksyon sa internet. I-bookmark ito para sa mabilis na pag-access — lahat ng nilalaman ay nai-render sa browser nang walang karagdagang mga kahilingan sa network.
Komprehensibo ba ito o ang mga pangunahing kaalaman lamang?
Sinasaklaw nito ang pinakakaraniwang ginagamit na mga command at pattern na humahawak sa 90% ng mga pang-araw-araw na gawain. Para sa angkop na lugar o advanced na mga tampok, kumonsulta sa opisyal na dokumentasyon.
Maaari ba akong magmungkahi ng mga karagdagan?
Regular naming ina-update ang aming mga sanggunian. Kung may napansin kang mga nawawalang command o may mga mungkahi, ipaalam sa amin sa pamamagitan ng aming contact page.