ਮੁਫ਼ਤ ਪਰਿਵਰਤਕ

ਵਿਮ ਕਮਾਂਡਾਂ ਚੀਟ ਸ਼ੀਟ

ਵਿਆਪਕ ਵਿਮ ਕਮਾਂਡ ਚੀਟ ਸ਼ੀਟ. ਉਦਾਹਰਣਾਂ, ਵਰਣਨ ਅਤੇ ਇੱਕ-ਕਲਿੱਕ ਕਾਪੀ ਦੇ ਨਾਲ 80+ ਜ਼ਰੂਰੀ ਵਿਮ ਕਮਾਂਡਾਂ ਦੀ ਖੋਜ ਕਰੋ।

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

ਇਸ ਟੂਲ ਬਾਰੇ

ਵਿਮ ਕਮਾਂਡਾਂ ਲਈ ਇੱਕ ਵਿਆਪਕ ਤੇਜ਼-ਸੰਦਰਭ ਗਾਈਡ. ਸ਼੍ਰੇਣੀ ਦੁਆਰਾ ਵਿਵਸਥਿਤ ਆਮ ਤੌਰ 'ਤੇ ਵਰਤੀਆਂ ਜਾਂਦੀਆਂ ਕਮਾਂਡਾਂ, ਸੰਟੈਕਸ ਅਤੇ ਉਦਾਹਰਣਾਂ ਨੂੰ ਬ੍ਰਾਊਜ਼ ਕਰੋ। ਖੋਜਣਯੋਗ ਅਤੇ ਮੋਬਾਈਲ-ਅਨੁਕੂਲ — ਜਦੋਂ ਤੁਹਾਨੂੰ ਤੁਰੰਤ ਰੀਮਾਈਂਡਰ ਦੀ ਲੋੜ ਹੋਵੇ ਤਾਂ ਤੁਰੰਤ ਪਹੁੰਚ ਲਈ ਇਸ ਪੰਨੇ ਨੂੰ ਬੁੱਕਮਾਰਕ ਕਰੋ।

ਵਰਤਣ ਦਾ ਤਰੀਕਾ

  1. ਸ਼੍ਰੇਣੀਬੱਧ ਹਵਾਲਾ ਭਾਗਾਂ ਨੂੰ ਬ੍ਰਾਊਜ਼ ਕਰੋ।
  2. ਖਾਸ ਕਮਾਂਡਾਂ ਜਾਂ ਸੰਟੈਕਸ ਲੱਭਣ ਲਈ ਖੋਜ ਪੱਟੀ ਦੀ ਵਰਤੋਂ ਕਰੋ।
  3. ਵਰਤੋਂ ਦੀਆਂ ਉਦਾਹਰਣਾਂ ਅਤੇ ਵਿਆਖਿਆਵਾਂ ਦੇਖਣ ਲਈ ਕਿਸੇ ਵੀ ਐਂਟਰੀ 'ਤੇ ਕਲਿੱਕ ਕਰੋ।
  4. ਆਪਣੇ ਟਰਮੀਨਲ ਜਾਂ ਸੰਪਾਦਕ ਵਿੱਚ ਵਰਤਣ ਲਈ ਕਮਾਂਡਾਂ ਨੂੰ ਸਿੱਧਾ ਕਾਪੀ ਕਰੋ।

ਅਕਸਰ ਪੁੱਛੇ ਜਾਣ ਵਾਲੇ ਸਵਾਲ

ਕੀ ਇਹ ਹਵਾਲਾ ਅੱਪ ਟੂ ਡੇਟ ਹੈ?
ਸੰਦਰਭ ਵਿਆਪਕ ਤੌਰ 'ਤੇ ਵਰਤੀਆਂ ਜਾਂਦੀਆਂ ਕਮਾਂਡਾਂ ਅਤੇ ਸੰਟੈਕਸ ਨੂੰ ਕਵਰ ਕਰਦਾ ਹੈ ਜੋ ਸੰਸਕਰਣਾਂ ਵਿੱਚ ਸਥਿਰ ਹਨ। ਨਵੀਨਤਮ ਜੋੜਾਂ ਜਾਂ ਸੰਸਕਰਣ-ਵਿਸ਼ੇਸ਼ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਲਈ, ਅਧਿਕਾਰਤ ਦਸਤਾਵੇਜ਼ਾਂ ਦੀ ਜਾਂਚ ਕਰੋ।
ਕੀ ਮੈਂ ਇਸਨੂੰ ਔਫਲਾਈਨ ਵਰਤ ਸਕਦਾ ਹਾਂ?
ਇੱਕ ਵਾਰ ਲੋਡ ਹੋਣ ਤੋਂ ਬਾਅਦ, ਪੰਨਾ ਬਿਨਾਂ ਇੰਟਰਨੈਟ ਕਨੈਕਸ਼ਨ ਦੇ ਕੰਮ ਕਰਦਾ ਹੈ। ਤੁਰੰਤ ਪਹੁੰਚ ਲਈ ਇਸ ਨੂੰ ਬੁੱਕਮਾਰਕ ਕਰੋ — ਸਾਰੀ ਸਮੱਗਰੀ ਬ੍ਰਾਊਜ਼ਰ ਵਿੱਚ ਬਿਨਾਂ ਹੋਰ ਨੈੱਟਵਰਕ ਬੇਨਤੀਆਂ ਦੇ ਰੈਂਡਰ ਕੀਤੀ ਜਾਂਦੀ ਹੈ।
ਕੀ ਇਹ ਵਿਆਪਕ ਹੈ ਜਾਂ ਸਿਰਫ਼ ਮੂਲ ਗੱਲਾਂ?
ਇਹ ਸਭ ਤੋਂ ਵੱਧ ਵਰਤੀਆਂ ਜਾਣ ਵਾਲੀਆਂ ਕਮਾਂਡਾਂ ਅਤੇ ਪੈਟਰਨਾਂ ਨੂੰ ਕਵਰ ਕਰਦਾ ਹੈ ਜੋ ਰੋਜ਼ਾਨਾ ਦੇ 90% ਕੰਮਾਂ ਨੂੰ ਸੰਭਾਲਦੇ ਹਨ। ਵਿਸ਼ੇਸ਼ ਜਾਂ ਉੱਨਤ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਲਈ, ਅਧਿਕਾਰਤ ਦਸਤਾਵੇਜ਼ਾਂ ਦੀ ਸਲਾਹ ਲਓ।
ਕੀ ਮੈਂ ਜੋੜਾਂ ਦਾ ਸੁਝਾਅ ਦੇ ਸਕਦਾ ਹਾਂ?
ਅਸੀਂ ਨਿਯਮਿਤ ਤੌਰ 'ਤੇ ਸਾਡੇ ਹਵਾਲਿਆਂ ਨੂੰ ਅਪਡੇਟ ਕਰਦੇ ਹਾਂ। ਜੇਕਰ ਤੁਹਾਨੂੰ ਗੁੰਮ ਕਮਾਂਡਾਂ ਨਜ਼ਰ ਆਉਂਦੀਆਂ ਹਨ ਜਾਂ ਕੋਈ ਸੁਝਾਅ ਹਨ, ਤਾਂ ਸਾਨੂੰ ਸਾਡੇ ਸੰਪਰਕ ਪੰਨੇ ਰਾਹੀਂ ਦੱਸੋ।