Misión 96Vim-Virtuoso
+250 XP
Vim Navigation, Deleting & Searching (dd, yy, p, /)
Iniciar terminal interactiva para esta misión→Sin instalación requerida • Se ejecuta en el navegador
Concepto y descripción general
Once you master Normal mode commands, Vim allows lightning-fast text manipulation without touching a mouse:
- dd: Delete (cut) the entire current line into the yank buffer.
- yy: Yank (copy) the current line.
- p: Paste the yank buffer on the line below the cursor.
- /pattern: Search forward through the file for text matching pattern.
- :%s/old/new/g: Global search and replace throughout the entire file without manual edits.
Instrucciones de la misión
Open
server.conf with vim server.conf. Search for the word port by typing /port. Substitute all occurrences of 99999 with 8080 using :%s/99999/8080/g. Delete any unneeded line using dd, and then save and quit with :wq.Referencia de sintaxis de comandos
| Command / Syntax | Description |
|---|---|
/port | Search for text pattern in Vim |
:%s/99999/8080/g | Search and replace throughout file in Vim |
dd | Delete (cut) current line in Vim |
:wq | Save and exit Vim |
Objetivos de verificación
- ○Search for pattern using "/port"
- ○Replace port using ":%s/99999/8080/g"
- ○Delete line with "dd"
- ○Save modified file with ":wq"