Convertidor Gratuito
Comandos Vim Hoja de Trucos
Hoja de trucos completa de comandos Vim. Busca más de 80 comandos esenciales de Vim con ejemplos, descripciones y copia con un clic.
i
Enter Insert mode before the cursor
Ejemplo:
iI
Enter Insert mode at the beginning of the line
Ejemplo:
Ia
Enter Insert mode after the cursor
Ejemplo:
aA
Enter Insert mode at the end of the line
Ejemplo:
Ao
Open a new line below and enter Insert mode
Ejemplo:
oO
Open a new line above and enter Insert mode
Ejemplo:
Ov
Enter Visual mode (character selection)
Ejemplo:
vV
Enter Visual Line mode (line selection)
Ejemplo:
VCtrl+v
Enter Visual Block mode (column selection)
Ejemplo:
Ctrl+v:
Enter Command-line mode
Ejemplo:
:wEsc
Return to Normal mode from any mode
Ejemplo:
EscR
Enter Replace mode (overwrite characters)
Ejemplo:
Rh
Move cursor left
Ejemplo:
5hj
Move cursor down
Ejemplo:
10jk
Move cursor up
Ejemplo:
10kl
Move cursor right
Ejemplo:
5lw
Move to the start of the next word
Ejemplo:
3wb
Move to the start of the previous word
Ejemplo:
3be
Move to the end of the current word
Ejemplo:
2e0
Move to the beginning of the line
Ejemplo:
0^
Move to the first non-blank character of the line
Ejemplo:
^$
Move to the end of the line
Ejemplo:
$gg
Move to the first line of the file
Ejemplo:
ggG
Move to the last line of the file
Ejemplo:
G:N
Jump to line number N
Ejemplo:
:42Ctrl+f
Scroll forward (down) one screen
Ejemplo:
Ctrl+fCtrl+b
Scroll backward (up) one screen
Ejemplo:
Ctrl+bCtrl+d
Scroll down half a screen
Ejemplo:
Ctrl+dCtrl+u
Scroll up half a screen
Ejemplo:
Ctrl+uH
Move cursor to the top of the screen
Ejemplo:
HM
Move cursor to the middle of the screen
Ejemplo:
ML
Move cursor to the bottom of the screen
Ejemplo:
L%
Jump to matching bracket, parenthesis, or brace
Ejemplo:
%x
Delete the character under the cursor
Ejemplo:
xdd
Delete (cut) the current line
Ejemplo:
dddw
Delete from cursor to the end of the word
Ejemplo:
dwd$
Delete from cursor to the end of the line
Ejemplo:
d$D
Delete from cursor to end of line (same as d$)
Ejemplo:
Dyy
Yank (copy) the current line
Ejemplo:
yyyw
Yank (copy) from cursor to end of word
Ejemplo:
ywp
Paste after the cursor
Ejemplo:
pP
Paste before the cursor
Ejemplo:
Pu
Undo the last change
Ejemplo:
uCtrl+r
Redo the last undone change
Ejemplo:
Ctrl+rcc
Change (delete and enter insert mode) the current line
Ejemplo:
cccw
Change from cursor to end of word
Ejemplo:
cwc$
Change from cursor to end of line
Ejemplo:
c$.
Repeat the last change
Ejemplo:
.>>
Indent the current line one level to the right
Ejemplo:
>><<
Unindent the current line one level to the left
Ejemplo:
<<==
Auto-indent the current line
Ejemplo:
==J
Join the current line with the line below
Ejemplo:
J~
Toggle case of character under cursor
Ejemplo:
~r{char}
Replace the character under the cursor with {char}
Ejemplo:
ra/{pattern}
Search forward for pattern
Ejemplo:
/foo?{pattern}
Search backward for pattern
Ejemplo:
?foon
Repeat the last search in the same direction
Ejemplo:
nN
Repeat the last search in the opposite direction
Ejemplo:
N*
Search forward for the word under the cursor
Ejemplo:
*#
Search backward for the word under the cursor
Ejemplo:
#:s/old/new/g
Replace all occurrences of old with new on the current line
Ejemplo:
:s/foo/bar/g:%s/old/new/g
Replace all occurrences of old with new in the whole file
Ejemplo:
:%s/foo/bar/g:%s/old/new/gc
Replace all with confirmation prompts
Ejemplo:
:%s/foo/bar/gc:noh
Clear the search highlight
Ejemplo:
:noh:w
Save the current file
Ejemplo:
:w:w filename
Save the current buffer as a new filename
Ejemplo:
:w newfile.txt:q
Quit (close the window)
Ejemplo:
:q:wq
Save and quit
Ejemplo:
:wq:q!
Quit without saving (force quit)
Ejemplo:
:q!:x
Save and quit (only writes if changes were made)
Ejemplo:
:x:e filename
Open a file for editing
Ejemplo:
:e README.md:sp
Split the window horizontally
Ejemplo:
:sp file.txt:vsp
Split the window vertically
Ejemplo:
:vsp file.txtCtrl+w+w
Switch focus to the next split window
Ejemplo:
Ctrl+w wCtrl+w+h/j/k/l
Move focus to the window in the given direction
Ejemplo:
Ctrl+w l:close
Close the current window split
Ejemplo:
:close:only
Close all windows except the current one
Ejemplo:
:only:bn
Switch to the next buffer
Ejemplo:
:bn:bp
Switch to the previous buffer
Ejemplo:
:bp:bd
Delete (close) the current buffer
Ejemplo:
:bd:ls
List all open buffers
Ejemplo:
:ls:b N
Switch to buffer number N
Ejemplo:
:b 2:tabnew
Open a new tab
Ejemplo:
:tabnew file.txt:tabn
Switch to the next tab
Ejemplo:
:tabn:tabp
Switch to the previous tab
Ejemplo:
:tabp:tabclose
Close the current tab
Ejemplo:
:tabclosegt
Go to the next tab
Ejemplo:
gtgT
Go to the previous tab
Ejemplo:
gTq{a-z}
Start recording a macro into register {a-z}
Ejemplo:
qqq (stop)
Stop recording the current macro
Ejemplo:
q@{a-z}
Execute the macro stored in register {a-z}
Ejemplo:
@q@@
Repeat the last executed macro
Ejemplo:
@@N@{a-z}
Execute macro N times
Ejemplo:
5@q:reg
Show the contents of all registers
Ejemplo:
:regv then d
Select text in Visual mode then delete it
Ejemplo:
vwdv then y
Select text in Visual mode then yank (copy) it
Ejemplo:
vwyv then c
Select text in Visual mode then change it
Ejemplo:
vwcv then >
Indent selected text to the right
Ejemplo:
vip>vip
Select the current paragraph in Visual mode
Ejemplo:
vipviw
Select the current word in Visual mode
Ejemplo:
viwvis
Select the current sentence in Visual mode
Ejemplo:
visV then J
Select lines in Visual Line mode then join them
Ejemplo:
VjJ:set number
Show line numbers
Ejemplo:
:set number:set nonumber
Hide line numbers
Ejemplo:
:set nonumber:syntax on
Enable syntax highlighting
Ejemplo:
:syntax on:colorscheme
Change the color scheme
Ejemplo:
:colorscheme desert:help {topic}
Open Vim help for a topic
Ejemplo:
:help :wm{a-z}
Set a mark at the current cursor position
Ejemplo:
ma'{a-z}
Jump to the line of a mark
Ejemplo:
'a`{a-z}
Jump to the exact position of a mark
Ejemplo:
`a:set paste
Enable paste mode to avoid auto-indent issues
Ejemplo:
:set paste:set ignorecase
Make searches case-insensitive
Ejemplo:
:set ignorecase:set hlsearch
Highlight all search matches
Ejemplo:
:set hlsearchga
Show the ASCII value of the character under the cursor
Ejemplo:
gazz
Center the current line on the screen
Ejemplo:
zzCtrl+g
Show the current file name and cursor position
Ejemplo:
Ctrl+gHerramientas Relacionadas
Ver todas las herramientasComandos Git Hoja de Referencia
Hoja de referencia completa de comandos Git. Busca más de 80 comandos Git esenciales con ejemplos, descripciones y copia con un clic.
Comandos Docker Hoja de Referencia
Hoja de referencia completa de comandos Docker. Busca 70+ comandos esenciales con ejemplos, descripciones y copia con un clic.
Linux / Bash Hoja de Referencia de Comandos
Hoja de referencia completa de comandos Linux y Bash. Busca más de 80 comandos esenciales con ejemplos, descripciones y copia con un clic.
Consulta SQL Formateador y Resaltador
Formatea, embellece y resalta sintácticamente consultas SQL al instante en tu navegador. Gratis, seguro y sin necesidad de subir archivos.