Close Menu
Technotification
    Facebook X (Twitter) Instagram
    Facebook X (Twitter) Instagram
    Technotification
    • Home
    • News
    • How To
    • Explained
    • Facts
    • Lists
    • Programming
    • Security
    • Gaming
    Technotification
    Home › Linux › What is the Vim Editor in linux?

    What is the Vim Editor in linux?

    By Ratnesh ShindeJuly 29, 2021
    Facebook Twitter Reddit LinkedIn
    sai kiran anagani Tjbk TARiE unsplash

    If you are working in the command line mode, you may need to become familiar with a text editor that will be operating in a Linux console. The vim editor is the original editor that Unix uses.

    It makes use of the console graphics mode for the emulation of a text-editing window, which allows you to see different lines of the file, move around across the files, and edit, insert or replace a piece of text. The vim editor works well with the data that is in a memory buffer. You have to type vim and the name of the file that you have to edit to open the editor with the desired file.

    How does VIM Editor work in Linux?

    If the editor is started without a filename being supplied, it opens but with no file. The vim editor detects the session’s terminal type and uses full-screen mode so the console window can use the editor area. The initial window will show the file contents and a message line at the bottom of the window.

    If the contents don’t take up the entire screen, a tilde is placed on the lines excluded from the file. The vim editor has two operational modes — normal and INSERT mode. When you open a file for editing, vim goes into normal mode, and certain keystrokes are interpreted as commands.

    In the insert mode, each key typed at the cursor is inserted into a buffer. To get into insert mode, press the i key, and to get out of it and back to normal mode, press the ESC key.

    VIM Editor commands

    You can use the arrow keys in normal mode to move around the text so long as vim has detected the correct terminal type. The vim command includes those for cursor navigation, as you can see below:

    • The command h in vim Linux editor is used to move to the left by one character.
    • The command 1 in the vim Linux editor is used to move to the right by one character.
    • The command j in vim Linux editor is used to move down the cursor by one line.
    • The command k in vim Linux editor is used to move up the cursor by one line.
    • The command PageDown or Ctrl-f in vim Linux editor is used to move forward one screen of your data.
    • The command PageUp or Ctrl-b in vim Linux editor is used to move forward one screen of your data.
    • The command gg in the vim Linux editor is used to shift to the first line in the buffer.
    • The command G in vim Linux editor is used to move to the last line in the buffer.
    • The command num G in vim Linux editor is used to move to the line number in the buffer.

    The vim editor carries a special feature in the normal mode that is known as the command line mode. The command line mode offers an interactive command line where you may enter additional commands to control different types of actions in the vim editor. To get to the command line mode in the vim editor, you have to press the colon key while you are in the normal mode. The cursor will move to the message line. Here you will see a colon popping up on the screen which indicates that you should now enter a command.

    When you are in the command line mode, you may enter several commands to save the buffer to file and move out of the editor.

    • The command q in vim Linux editor is used to exit the system if you have made no changes to buffer data.
    • The command wq in vim Linux editor is used to save buffer data to file and then exit the editor.
    • The command q! in vim Linux editor is used to quit the editor and then discard the changes that are made to the data of buffer.
    • The command w filename in vim Linux editor is used to save your file with a different filename.
    Share. Facebook Twitter LinkedIn Tumblr Reddit Telegram WhatsApp
    Ratnesh Shinde

    Related Posts

    The Best Python Libraries for Data Visualization in 2025

    April 1, 2025

    Is C++ Still Relevant in 2025 and Beyond?

    February 20, 2025

    5 Best Programming Languages for Machine Learning in 2025

    February 18, 2025

    10 Must-Have Chrome Extensions for Web Developers in 2025

    February 17, 2025

    Difference Between C, C++, C#, and Objective-C Programming

    February 16, 2025

    How to Learn Programming Faster and Smarter in 2025

    February 14, 2025
    Lists You May Like

    10 Best RARBG Alternative Sites in April 2025 [Working Links]

    April 1, 2025

    The Pirate Bay Proxy List in 2025 [Updated List]

    January 2, 2025

    10 Sites to Watch Free Korean Drama [2025 Edition]

    January 2, 2025

    10 Best Torrent Search Engine Sites (2025 Edition)

    February 12, 2025

    10 Best GTA V Roleplay Servers in 2025 (Updated List)

    January 6, 2025

    5 Best Torrent Sites for Software in 2025

    January 2, 2025

    1337x Alternatives, Proxies, and Mirror Sites in 2025

    January 2, 2025

    10 Best Torrent Sites for eBooks in 2025 [Working]

    January 2, 2025

    10 Best Anime Torrent Sites in 2025 [Working Sites]

    January 6, 2025

    Top Free Photo Editing Software For PC in 2025

    January 2, 2025
    Pages
    • About
    • Contact
    • Privacy
    • Careers
    Privacy

    Information such as the type of browser being used, its operating system, and your IP address is gathered in order to enhance your online experience.

    © 2013 - 2025 Technotification | All rights reserved.

    Type above and press Enter to search. Press Esc to cancel.