Фрее Цонвертер

Вим Цоммандс Цхеат Схеет

Свеобухватна шифра Вим команди. Претражите 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% свакодневних задатака. За нишне или напредне функције погледајте званичну документацију.
Могу ли да предложим додатке?
Редовно ажурирамо наше референце. Ако приметите да недостају команде или имате предлоге, обавестите нас преко наше контакт странице.