محول مجاني

أوامر 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% من المهام اليومية. للحصول على الميزات المتخصصة أو المتقدمة، راجع الوثائق الرسمية.
هل يمكنني اقتراح إضافات؟
نقوم بتحديث مراجعنا بانتظام. إذا لاحظت وجود أوامر مفقودة أو لديك اقتراحات، فأخبرنا بذلك من خلال صفحة الاتصال الخاصة بنا.