Vim Editor ---------------------------------- .. admonition:: Overview :class: Overview * **Time:** 25 min #. Learn how to use Vim editor. #. Understand basic Vim commands for text editing. Vim is a powerful text editor available in most Linux distributions. Here are some basic commands to get started: .. list-table:: Basic Vim Commands :widths: 15 85 :header-rows: 1 * - Command - Description * - ``i`` - Enter insert mode to start editing. * - ``Esc`` - Exit insert mode. * - ``:w`` - Save the file. * - ``:q`` - Quit Vim. * - ``:wq`` - Save and quit Vim. * - ``:q!`` - Quit without saving changes. * - ``dd`` - Delete the current line. * - ``yy`` - Copy the current line. * - ``p`` - Paste the copied or deleted content (in normal mode), or paste copied/cut text (in visual mode). * - ``u`` - Undo the last action. * - ``:set number`` - Enable line numbers. * - ``:set nonumber`` - Disable line numbers. * - ``v`` - Enter visual mode to select text. * - ``y`` - Copy the selected text in visual mode. * - ``d`` - Cut the selected text in visual mode. .. admonition:: Key Points :class: hint #. Vim is a powerful text editor available in most Linux distributions. #. It has a steep learning curve but is very efficient once mastered.