Besplatni pretvarač

Vim naredbe Varalica

Sveobuhvatna šifra Vim naredbi. Pretražujte 80+ bitnih Vim naredbi s primjerima, opisima i kopijom jednim klikom.

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

O ovom alatu

Sveobuhvatan kratki vodič za vim naredbe. Pregledajte najčešće korištene naredbe, sintaksu i primjere organizirane po kategorijama. Pretraživa i prilagođena mobilnim uređajima — označite ovu stranicu za trenutni pristup kada trebate brzi podsjetnik.

Kako koristiti

  1. Pregledajte kategorizirane referentne odjeljke.
  2. Koristite traku za pretraživanje da pronađete određene naredbe ili sintaksu.
  3. Kliknite na bilo koji unos kako biste vidjeli primjere korištenja i objašnjenja.
  4. Kopirajte naredbe izravno za korištenje u vašem terminalu ili editoru.

Često postavljana pitanja

Je li ova referenca ažurirana?
Referenca pokriva široko korištene naredbe i sintaksu koje su stabilne među verzijama. Za najnovije dodatke ili značajke specifične za verziju provjerite službenu dokumentaciju.
Mogu li ovo koristiti izvan mreže?
Nakon učitavanja stranica radi bez internetske veze. Označite ga za brzi pristup — sav sadržaj se prikazuje u pregledniku bez daljnjih mrežnih zahtjeva.
Je li ovo sveobuhvatno ili samo osnove?
Pokriva najčešće korištene naredbe i obrasce koji obrađuju 90% svakodnevnih zadataka. Za posebne ili napredne značajke pogledajte službenu dokumentaciju.
Mogu li predložiti dodatke?
Redovito ažuriramo naše reference. Ako primijetite da nedostaju naredbe ili imate prijedloge, javite nam putem naše kontakt stranice.