Δωρεάν μετατροπέας

Εντολές Vim Φύλλο εξαπάτησης

Ολοκληρωμένο φύλλο εξαπάτησης εντολών Vim. Αναζητήστε 80+ βασικές εντολές Vim με παραδείγματα, περιγραφές και αντίγραφο με ένα κλικ.

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

Σχετικά με αυτό το εργαλείο

Ένας περιεκτικός οδηγός γρήγορης αναφοράς για εντολές vim. Περιηγηθείτε σε εντολές, σύνταξη και παραδείγματα που χρησιμοποιούνται συνήθως κατά κατηγορία. Με δυνατότητα αναζήτησης και φιλικό προς κινητά — προσθέστε σελιδοδείκτη σε αυτήν τη σελίδα για άμεση πρόσβαση όταν χρειάζεστε μια γρήγορη υπενθύμιση.

Πώς να το χρησιμοποιήσετε

  1. Περιηγηθείτε στις κατηγοριοποιημένες ενότητες αναφοράς.
  2. Χρησιμοποιήστε τη γραμμή αναζήτησης για να βρείτε συγκεκριμένες εντολές ή σύνταξη.
  3. Κάντε κλικ σε οποιαδήποτε καταχώρηση για να δείτε παραδείγματα χρήσης και επεξηγήσεις.
  4. Αντιγράψτε εντολές απευθείας για χρήση στο τερματικό ή τον επεξεργαστή σας.

Συχνές ερωτήσεις

Είναι αυτή η αναφορά ενημερωμένη;
Η αναφορά καλύπτει ευρέως χρησιμοποιούμενες εντολές και σύνταξη που είναι σταθερές σε όλες τις εκδόσεις. Για τις πιο πρόσφατες προσθήκες ή λειτουργίες για συγκεκριμένες εκδόσεις, ελέγξτε την επίσημη τεκμηρίωση.
Μπορώ να το χρησιμοποιήσω εκτός σύνδεσης;
Μόλις φορτωθεί, η σελίδα λειτουργεί χωρίς σύνδεση στο διαδίκτυο. Σημειώστε το για γρήγορη πρόσβαση — όλο το περιεχόμενο αποδίδεται στο πρόγραμμα περιήγησης χωρίς περαιτέρω αιτήματα δικτύου.
Είναι αυτό περιεκτικό ή μόνο τα βασικά;
Καλύπτει τις πιο συχνά χρησιμοποιούμενες εντολές και μοτίβα που χειρίζονται το 90% των καθημερινών εργασιών. Για εξειδικευμένες ή προηγμένες λειτουργίες, συμβουλευτείτε την επίσημη τεκμηρίωση.
Μπορώ να προτείνω προσθήκες;
Ενημερώνουμε τακτικά τις αναφορές μας. Εάν παρατηρήσετε ότι λείπουν εντολές ή έχετε προτάσεις, ενημερώστε μας μέσω της σελίδας επικοινωνίας μας.