VIM Modes



Vim operates in different modes: 

Normal mode                  - This mode allows you to navigate the file and execute commands.

Insert mode                     - The insert mode is used for inserting and editing text.

Visual mode                    - This mode allows to visually select and manipulate text within the editor.

Command-line mode      - This mode allows you to enter commands that perform various operations.



   Esc or Ctrl + [             - This command switches from any other mode to normal mode.

   i                                   - To enter insert mode at the current cursor position.

   v                                  - To enter visual mode to select text character by character.

   V                                 - To enter visual line mode to select entire lines.

   Ctrl + v                       - To enter visual block mode to select rectangular blocks of text.

    :                                  - Pressing colon (:) in normal mode enters command-line mode.

    /                                  - Pressing forward slash (/) in normal mode enters command-line mode for                                                 search.

   ?                                  - Pressing question mark (?) in normal mode enters command-line mode for                                               backward search.

   !                                   - Pressing exclamation mark (!) in normal mode enters command-line mode                                               for executing external shell commands.

Ctrl + v, I                       - Enter visual block insert mode, allowing you to insert text at the beginning of                                           each selected line in the visual block.

 

Post a Comment

Previous Post Next Post

Contact Form