{"id":41171,"date":"2024-04-18T06:18:30","date_gmt":"2024-04-18T06:18:30","guid":{"rendered":"https:\/\/linuxsimply.com\/?p=41171"},"modified":"2024-05-14T09:46:07","modified_gmt":"2024-05-14T09:46:07","slug":"vim-in-linux","status":"publish","type":"post","link":"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/","title":{"rendered":"Vim in Linux"},"content":{"rendered":"<p style=\"text-align: justify;\">Vim is a text editor for the Unix-like operating system (Linux, BSD, macOS) with both the command line and graphical interface. It provides the most flexibility for text editing in Linux environments. Vim is designed to be fast, efficient, and extensible, making it a preferred choice for all developers and system administrators. In this article, I will provide a complete Vim guide so that new users can use Vim with ease.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#What_is_Vim_in_Linux\" >What is Vim in Linux?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#Why_Do_We_Use_Vim_in_Linux\" >Why Do We Use Vim in Linux?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#Vim_Modes\" >Vim Modes<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#How_to_Use_Vim_in_Linux\" >How to Use Vim in Linux?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#Step_1_Open_a_Terminal_Window\" >Step 1: Open a Terminal Window<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#Step_2_Create_a_File\" >Step 2: Create a File<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#Step_3_Insert_Text_and_Save_File_Modifications\" >Step 3: Insert Text and Save File Modifications<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#Step_4_Navigate_through_File\" >Step 4: Navigate through File<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#Step_5_Editing_Text_in_a_File\" >Step 5: Editing Text in a File<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#A_Delete_File_Line\" >A. Delete File Line<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#B_Undo_Operation\" >B. Undo Operation<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#C_Highlight_Text\" >C. Highlight Text<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#D_Copy_and_Paste_Text\" >D. Copy and Paste Text<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#Step_6_Searching_Text_in_a_File\" >Step 6: Searching Text in a File<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#Step_7_Exit_File\" >Step 7: Exit File<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#Vim_Commands\" >Vim Commands<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#Navigation_Shortcuts\" >Navigation Shortcuts<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#Splitscreen_Editing_Commands\" >Splitscreen Editing Commands<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#Conclusion\" >Conclusion<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#People_Also_Ask\" >People Also Ask<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#What_is_the_role_of_Vim\" >What is the role of Vim?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#Is_Vim_only_for_Linux\" >Is Vim only for Linux?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-23\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#What_is_the_difference_between_Vi_and_Vim\" >What is the difference between Vi and Vim?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-24\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#What_is_the_Vim_command\" >What is the Vim command?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-25\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#Why_Vim_is_used_in_Linux\" >Why Vim is used in Linux?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-26\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#What_are_the_advantages_and_disadvantages_of_Vim_in_Linux\" >What are the advantages and disadvantages of Vim in Linux?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"What_is_Vim_in_Linux\"><\/span>What is Vim in Linux?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">Vim is a popular text editor used in Unix-like operating systems (Linux, BSD), windows, and macOS for programming, writing, editing configuration files, and other tasks requiring text manipulation. Vim refers to vi improved, written by Bram Moolenaar, a Dutch computer programmer in the late 1980s. It is an enhanced version of vi (visual editor) which was written by Bill Joy back in 1976, providing additional features and supporting both text and graphical interfaces.<\/p>\n<p style=\"text-align: justify;\">Vim is well-known for its efficiency and its wide range of customization options. It is a free and open-source text editor that is completely maintainable by the keyboard. Without using any menus or mouse, users can operate it seamlessly. Like, to insert text into a file, users only need to press <strong>i<\/strong> and type. Vim adds a new dimension for editing complex text and files.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Why_Do_We_Use_Vim_in_Linux\"><\/span>Why Do We Use Vim in Linux?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">In Linux, vim is a powerful text editor with numerous advantages, making it a valuable tool for developers. Here are a few reasons to learn Vim:<\/p>\n<ul>\n<li style=\"text-align: justify;\"><strong>Installable Everywhere: <\/strong>Most Linux distros install Vim by default. However, it can also be installed virtually on all Unix-like systems. Regardless of which Linux distribution you are using, Vim is accessible everywhere.<\/li>\n<li style=\"text-align: justify;\"><strong>Fast and Efficient: <\/strong>Vim&#8217;s keyboard-based interface allows you to edit text quickly and efficiently. Once you get the hang of Vim&#8217;s commands and keyboard shortcuts, you&#8217;ll be able to complete tasks in half the time it takes by using a mouse.<\/li>\n<li style=\"text-align: justify;\"><strong>Flexible: <\/strong>You can customize Vim&#8217;s plugins, mapping, and other settings to create a custom editing environment, making it more flexible for users.<\/li>\n<li style=\"text-align: justify;\"><strong>Scalable: <\/strong>Whether you are working on a small or large text, Vim will always be responsive and scalable, ensuring smooth performance.<\/li>\n<li style=\"text-align: justify;\"><strong>Supports TUI and GUI: <\/strong>Vim supports both text-driven Terminal User Interface (TUI) and Graphical User Interface (GUI) that lets users work with their preferred interface.<\/li>\n<li style=\"text-align: justify;\"><strong>Simple Commands: <\/strong>The commands and shortcuts used in Vim are easier to remember. For instance, <strong>i<\/strong> for inserting, <strong>d<\/strong> for deleting, <strong>q<\/strong> for quitting, etc.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Vim_Modes\"><\/span>Vim Modes<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">Vim has multiple modes of operation, each of which has a distinct function, such as editing, copying, inserting, and so forth. Here are 5 Vim operating modes:<\/p>\n<ol>\n<li style=\"text-align: justify;\"><strong> Normal Mode: <\/strong>This is the default mode where you can navigate through documents and perform various operations such as copying, pasting, deleting, and more using single key commands.<\/li>\n<li style=\"text-align: justify;\"><strong> Insert Mode: <\/strong>It allows users to modify and insert text by typing and removing characters, just like modern text editors do. There are 3 ways to enter the insert mode from the default mode:<\/li>\n<\/ol>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>Press <code class=\"\" data-line=\"\">i<\/code> key to enter insert mode at the current cursor position.<\/li>\n<li>Press <code class=\"\" data-line=\"\">I<\/code> key to enter insert mode at the start of the current line.<\/li>\n<li>Press <code class=\"\" data-line=\"\">a<\/code> key to enter insert mode after the current cursor position.<\/li>\n<li>Press <code class=\"\" data-line=\"\">A<\/code> key to enter insert mode at the end of the current line.<\/li>\n<li>Press <code class=\"\" data-line=\"\">o<\/code> key to enter insert mode, inserting a new line below the current character position.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ol start=\"3\">\n<li style=\"text-align: justify;\"><strong> Visual Mode: <\/strong>This mode lets you visually edit the text block. To switch to visual mode, hit the v key to indicate the beginning of the selection. Move your arrow keys to the end of the selection. Then, run the available normal mode commands to edit the text.<\/li>\n<li style=\"text-align: justify;\"><strong> Command-line Mode: <\/strong>It provides a more sophisticated way to run commands. To switch from the normal mode to the command line mode, press : which moves the cursor to the command box. After that, type any command and hit <strong>ENTER<\/strong> to execute it.<\/li>\n<li style=\"text-align: justify;\"><strong> Replace Mode: <\/strong>In replace mode, you can simply type over the existing text. To switch to replace mode from default mode, press R and continue typing.<\/li>\n<\/ol>\n<h2><span class=\"ez-toc-section\" id=\"How_to_Use_Vim_in_Linux\"><\/span>How to Use Vim in Linux?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">To learn to use Vim in Linux, follow the simple steps below:<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step_1_Open_a_Terminal_Window\"><\/span>Step 1: Open a Terminal Window<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">Open a terminal from your Linux operating system. Here, I am going to open my Ubuntu terminal by Pressing <strong>CTRL+ALT+T<\/strong>. Mac users can also follow these instructions as Vim is available in macOS as well.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step_2_Create_a_File\"><\/span>Step 2: Create a File<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">After opening the terminal, write Vim followed by the filename to create a file \u201cfile1.txt\u201d:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">vim file1.txt<\/code><\/pre>\n<p>You can see that the &#8220;file1.txt&#8221; file is created in the Vim text editor:<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-41180\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/1.creating-a-file-in-vim.png\" alt=\"creating a file in vim.\" width=\"616\" height=\"567\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/1.creating-a-file-in-vim.png 616w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/1.creating-a-file-in-vim-300x276.png 300w\" sizes=\"(max-width: 616px) 100vw, 616px\" \/><\/p>\n<div class=\"su-note\"  style=\"border-color:#cedfe2;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#e8f9fc;border-color:#ffffff;color:#333333;\">\n<p style=\"text-align: justify;\"><strong>Note:<\/strong> If Vim is not installed on your system, install it using the following command:<\/p>\n<p>For <strong>Deian-based<\/strong> distro users:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">sudo apt install vim<\/code><\/pre>\n<p>For <strong>Red-hat<\/strong>-based distro users:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">sudo yum install vim<\/code><\/pre>\n<p>For <strong>Mac<\/strong> users:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">brew install vim<\/code><\/pre>\n<\/div><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Step_3_Insert_Text_and_Save_File_Modifications\"><\/span>Step 3: Insert Text and Save File Modifications<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">To insert text into the file, hit <code class=\"\" data-line=\"\">i<\/code> button. It will take you to the insert mode from the normal default mode. Now, type texts as per your need inside the file. Here, I am typing the following text in the \u201cfile1.txt\u201d file:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">Hello user, I am using Ubuntu.\nWelcome to Linuxsimply.com<\/code><\/pre>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-41181\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/2.inserting-text-to-a-file-in-vim.png\" alt=\"inserting text to a file in vim\" width=\"615\" height=\"562\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/2.inserting-text-to-a-file-in-vim.png 615w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/2.inserting-text-to-a-file-in-vim-300x274.png 300w\" sizes=\"(max-width: 615px) 100vw, 615px\" \/><\/p>\n<p style=\"text-align: justify;\">Once you have done inserting text, press the <strong>Esc<\/strong> key to go back to the normal mode. After that, type <code class=\"\" data-line=\"\">:<\/code> to enter command-line mode.<\/p>\n<p style=\"text-align: justify;\">To save the \u201cfile1.txt\u201d, write w after the colon <code class=\"\" data-line=\"\">:w<\/code> and press <strong>ENTER<\/strong>:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-41182\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/3.saving-file-text-in-vim.png\" alt=\"saving file text in vim\" width=\"615\" height=\"567\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/3.saving-file-text-in-vim.png 615w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/3.saving-file-text-in-vim-300x277.png 300w\" sizes=\"(max-width: 615px) 100vw, 615px\" \/><\/p>\n<p style=\"text-align: justify;\">As you can see, the contents of the &#8220;file1.txt&#8221; have been written (saved) on the disk.<\/p>\n<p style=\"text-align: justify;\">You can also change the filename by pressing <strong>ENTER<\/strong> after writing <code class=\"\" data-line=\"\">:w newfile.txt<\/code>. It will change the filename from \u201cfile1.txt\u201d to \u201cnewfile.txt\u201d.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step_4_Navigate_through_File\"><\/span>Step 4: Navigate through File<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">Vim offers many amazing navigation features. If you want to go straight to the 5th line of the file content, you can achieve that using Vim\u2019s commands without clicking traditional arrow keys several times. It is beneficial when the file size is huge. Let\u2019s see practically how to navigate through a file in Vim:<\/p>\n<p style=\"text-align: justify;\">To set the number before each line of the file contents, type <code class=\"\" data-line=\"\">:set number<\/code> and press <strong>ENTER<\/strong>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-41183\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/4.navigating-through-file-in-vim.png\" alt=\"navigating through file in vim\" width=\"614\" height=\"566\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/4.navigating-through-file-in-vim.png 614w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/4.navigating-through-file-in-vim-300x277.png 300w\" sizes=\"(max-width: 614px) 100vw, 614px\" \/><\/p>\n<p>Now to jump to line number 2, type <code class=\"\" data-line=\"\">:2<\/code> and press <strong>ENTER<\/strong>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-41184\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/5.navigating-through-file-in-vim2.png\" alt=\"navigating through file in vim2\" width=\"618\" height=\"567\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/5.navigating-through-file-in-vim2.png 618w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/5.navigating-through-file-in-vim2-300x275.png 300w\" sizes=\"(max-width: 618px) 100vw, 618px\" \/><\/p>\n<p>You can go to any line as per your requirements using <code class=\"\" data-line=\"\">:Line_number<\/code> command.<\/p>\n<p>If you want to go to the end of the line, write <code class=\"\" data-line=\"\">:$<\/code> and press <strong>ENTER<\/strong>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-41185 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/6.going-at-the-end-of-the-file-contents-in-vim.png\" alt=\"going at the end of the file contents\" width=\"615\" height=\"569\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/6.going-at-the-end-of-the-file-contents-in-vim.png 615w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/6.going-at-the-end-of-the-file-contents-in-vim-300x278.png 300w\" sizes=\"(max-width: 615px) 100vw, 615px\" \/><\/p>\n<div class=\"su-note\"  style=\"border-color:#cedfe2;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#e8f9fc;border-color:#ffffff;color:#333333;\"><strong>Note:<\/strong> Before executing any command, hit <strong>Esc <\/strong>to return to normal mode.<\/div><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Step_5_Editing_Text_in_a_File\"><\/span>Step 5: Editing Text in a File<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">To edit the text in a file, go to the line using navigation keys or shortcuts to perform the editing operations like delete, undo, highlight, copy, paste, and so on.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"A_Delete_File_Line\"><\/span>A. Delete File Line<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Now, to delete line number 2 from the file, type <code class=\"\" data-line=\"\">:d<\/code> and press <strong>ENTER<\/strong>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-41186\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/7.deleting-a-file-contents-in-vim.png\" alt=\"deleting file contents in vim\" width=\"548\" height=\"567\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/7.deleting-a-file-contents-in-vim.png 548w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/7.deleting-a-file-contents-in-vim-290x300.png 290w\" sizes=\"(max-width: 548px) 100vw, 548px\" \/>Line 2 \u201cWelcome to Linuxsimply.com\u201d has been deleted successfully.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"B_Undo_Operation\"><\/span>B. Undo Operation<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p style=\"text-align: justify;\">To undo the previous operation, just press the <code class=\"\" data-line=\"\">u<\/code> button. Multiple operations can also be undone by pressing the <code class=\"\" data-line=\"\">u<\/code> button multiple times. For example, to get back the deleted line, I will perform the following undo operation:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-41187\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/8.undo-operation-in-vim.png\" alt=\"undo operation in vim\" width=\"598\" height=\"243\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/8.undo-operation-in-vim.png 598w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/8.undo-operation-in-vim-300x122.png 300w\" sizes=\"(max-width: 598px) 100vw, 598px\" \/><\/p>\n<h4><span class=\"ez-toc-section\" id=\"C_Highlight_Text\"><\/span>C. Highlight Text<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p style=\"text-align: justify;\">Highlighting text allows you to focus on a specific text or character. It improves readability by highlighting different parts of a complex code. To highlight a line in Vim, hit <code class=\"\" data-line=\"\">v<\/code> button to enter a visual mood from the normal mode. After that, select the text to highlight using the left and right arrow keys:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-41188 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/9.selecting-text-in-vim-to-highlight.png\" alt=\"selecting text to highlight\" width=\"552\" height=\"571\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/9.selecting-text-in-vim-to-highlight.png 552w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/9.selecting-text-in-vim-to-highlight-290x300.png 290w\" sizes=\"(max-width: 552px) 100vw, 552px\" \/><\/p>\n<p style=\"text-align: justify;\">Once the text has been chosen, you can run various commands to change the background color as well as the text color.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"D_Copy_and_Paste_Text\"><\/span>D. Copy and Paste Text<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p style=\"text-align: justify;\">To copy a text in Vim, first select the text you want to copy. Then, press <code class=\"\" data-line=\"\">Y<\/code> to copy the text to the clipboard. Afterward, move the cursor to specify the location for pasting. Now, hit the <code class=\"\" data-line=\"\">p<\/code> button to paste the copied text:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-41189\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/10.copying-and-pasting-text-in-vim.png\" alt=\"copying and pasting text in vim\" width=\"679\" height=\"278\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/10.copying-and-pasting-text-in-vim.png 679w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/10.copying-and-pasting-text-in-vim-300x123.png 300w\" sizes=\"(max-width: 679px) 100vw, 679px\" \/><\/p>\n<p style=\"text-align: justify;\">You can see that, line 1 \u201cHello user, I am using Ubuntu.\u201d has been pasted after line 2.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step_6_Searching_Text_in_a_File\"><\/span>Step 6: Searching Text in a File<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">To search for a specific pattern in a file using Vim, run <code class=\"\" data-line=\"\">\/pattern<\/code> and press <strong>ENTER<\/strong>. Here, I am going to search for the word \u201cuser\u201d in &#8220;file1.txt&#8221; by typing <code class=\"\" data-line=\"\">\/user<\/code>. To move to the next match (in case there are multiple matches), press <code class=\"\" data-line=\"\">n<\/code>, and hit <code class=\"\" data-line=\"\">shift+n<\/code> to move to the previous match.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-41190\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/11.searching-text-in-vim.png\" alt=\"searching text in vim\" width=\"617\" height=\"569\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/11.searching-text-in-vim.png 617w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/11.searching-text-in-vim-300x277.png 300w\" sizes=\"(max-width: 617px) 100vw, 617px\" \/><\/p>\n<p>After running the <code class=\"\" data-line=\"\">\/user<\/code> command, the \u201cuser\u201d word has been highlighted.<\/p>\n<div class=\"su-note\"  style=\"border-color:#cedfe2;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#e8f9fc;border-color:#ffffff;color:#333333;\">\n<p style=\"text-align: justify;\"><strong>Note:<\/strong> To search backward (from the current cursor position) for a pattern, you can type <code class=\"\" data-line=\"\">?pattern<\/code> instead of <code class=\"\" data-line=\"\">\/pattern<\/code>. <\/div><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Step_7_Exit_File\"><\/span>Step 7: Exit File<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">To exit the opened file after saving the changes in the file in Vim, enter <code class=\"\" data-line=\"\">:x<\/code> or <code class=\"\" data-line=\"\">:wq<\/code>. To quit without saving the file changes, enter <code class=\"\" data-line=\"\">:q!<\/code>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-41191 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/12.exiting-file-in-vim.png\" alt=\"exiting file\" width=\"486\" height=\"562\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/12.exiting-file-in-vim.png 486w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/12.exiting-file-in-vim-259x300.png 259w\" sizes=\"(max-width: 486px) 100vw, 486px\" \/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Vim_Commands\"><\/span>Vim Commands<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">There are some useful Vim commands that every Linux user should know to experience smooth performance with Vim. These are:<\/p>\n<p><span style=\"font-weight: 400;\"><div class=\"su-table su-table-responsive su-table-alternate su-table-fixed\"> <\/span><\/p>\n<table style=\"width: 54.9529%\" width=\"0\">\n<tbody>\n<tr>\n<th style=\"width: 32.2219%\" width=\"312\"><strong>Commands<\/strong><\/th>\n<th style=\"width: 66.6826%\" width=\"312\"><strong>Tasks<\/strong><\/th>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 32.2219%\" width=\"312\">i<\/td>\n<td style=\"text-align: center;width: 66.6826%\" width=\"312\">Go to insert mode starting before the current cursor position.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 32.2219%\" width=\"312\">a<\/td>\n<td style=\"text-align: center;width: 66.6826%\" width=\"312\">Go to insert mode starting after the current cursor position.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 32.2219%\" width=\"312\">o<\/td>\n<td style=\"text-align: center;width: 66.6826%\" width=\"312\">Go to insert mode after adding a blank line starting after the current cursor position.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 32.2219%\" width=\"312\">v<\/td>\n<td style=\"text-align: center;width: 66.6826%\" width=\"312\">Go to visual mode.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 32.2219%\" width=\"312\">r<\/td>\n<td style=\"text-align: center;width: 66.6826%\" width=\"312\">Go to replace mode.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 32.2219%\" width=\"312\">Esc key<\/td>\n<td style=\"text-align: center;width: 66.6826%\" width=\"312\">Go to command mode.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 32.2219%\" width=\"312\">:w<\/td>\n<td style=\"text-align: center;width: 66.6826%\" width=\"312\">Write file.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 32.2219%\" width=\"312\">:q<\/td>\n<td style=\"text-align: center;width: 66.6826%\" width=\"312\">Quit file.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 32.2219%\" width=\"312\">:q!<\/td>\n<td style=\"text-align: center;width: 66.6826%\" width=\"312\">Quit without saving.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 32.2219%\" width=\"312\">:wq<\/td>\n<td style=\"text-align: center;width: 66.6826%\" width=\"312\">Save and quit file.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 32.2219%\" width=\"312\">:set number or :set nu<\/td>\n<td style=\"text-align: center;width: 66.6826%\" width=\"312\">Set line number.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 32.2219%\" width=\"312\">:set number! or :set nu!<\/td>\n<td style=\"text-align: center;width: 66.6826%\" width=\"312\">Remove line number.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 32.2219%\" width=\"312\">:u<\/td>\n<td style=\"text-align: center;width: 66.6826%\" width=\"312\">Undo last edit.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 32.2219%\" width=\"312\">CTRL+r<\/td>\n<td style=\"text-align: center;width: 66.6826%\" width=\"312\">Redo last edit.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 32.2219%\" width=\"312\">\/<\/td>\n<td style=\"text-align: center;width: 66.6826%\" width=\"312\">Search forward in file.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 32.2219%\" width=\"312\">?<\/td>\n<td style=\"text-align: center;width: 66.6826%\" width=\"312\">Search backward in file.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 32.2219%\" width=\"312\">dd<\/td>\n<td style=\"text-align: center;width: 66.6826%\" width=\"312\">Delete line. 2dd for deleting two lines.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 32.2219%\" width=\"312\">x<\/td>\n<td style=\"text-align: center;width: 66.6826%\" width=\"312\">Delete letter.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 32.2219%\" width=\"312\">dw<\/td>\n<td style=\"text-align: center;width: 66.6826%\" width=\"312\">Delete word.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 32.2219%\" width=\"312\">dG<\/td>\n<td style=\"text-align: center;width: 66.6826%\" width=\"312\">Delete everything until the end of file.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 32.2219%\" width=\"312\">yy or Y<\/td>\n<td style=\"text-align: center;width: 66.6826%\" width=\"312\">Copy line. 2yy or 2Y for copying two lines.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 32.2219%\" width=\"312\">p<\/td>\n<td style=\"text-align: center;width: 66.6826%\" width=\"312\">Paste text after the current cursor position.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 32.2219%\" width=\"312\">P<\/td>\n<td style=\"text-align: center;width: 66.6826%\" width=\"312\">Paste text before the current cursor position.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 32.2219%\" width=\"312\">:%s\/word1\/word2\/g<\/td>\n<td style=\"text-align: center;width: 66.6826%\" width=\"312\">Search all the word1 and replace it with word2.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 32.2219%\" width=\"312\">gUh<\/td>\n<td style=\"text-align: center;width: 66.6826%\" width=\"312\">Converts to uppercase next word h.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 32.2219%\" width=\"312\">guh<\/td>\n<td style=\"text-align: center;width: 66.6826%\" width=\"312\">Converts to lowercase next word h.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400\"><\/div> <\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Navigation_Shortcuts\"><\/span>Navigation Shortcuts<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">In addition to the arrows, there are also a few shortcut commands that you can use to navigate through the file. Let&#8217;s take a look at some of the navigation commands in Vim:<\/p>\n<p><span style=\"font-weight: 400;\"><div class=\"su-table su-table-responsive su-table-alternate su-table-fixed\"> <\/span><\/p>\n<table style=\"width: 54.9529%\" width=\"0\">\n<tbody>\n<tr>\n<th style=\"text-align: center;width: 28.4808%\" width=\"312\"><strong>Commands<\/strong><\/th>\n<th style=\"text-align: center;width: 70.4238%\" width=\"312\"><strong>Tasks<\/strong><\/th>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 28.4808%\" width=\"312\">h<\/td>\n<td style=\"text-align: center;width: 70.4238%\" width=\"312\">Move the cursor to the left.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 28.4808%\" width=\"312\">l<\/td>\n<td style=\"text-align: center;width: 70.4238%\" width=\"312\">Move the cursor to the right.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 28.4808%\" width=\"312\">k<\/td>\n<td style=\"text-align: center;width: 70.4238%\" width=\"312\">Move the cursor up one line.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 28.4808%\" width=\"312\">j<\/td>\n<td style=\"text-align: center;width: 70.4238%\" width=\"312\">Move the cursor to the down of one line.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 28.4808%\" width=\"312\">e<\/td>\n<td style=\"text-align: center;width: 70.4238%\" width=\"312\">Move the cursor to the end of a word.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 28.4808%\" width=\"312\">H<\/td>\n<td style=\"text-align: center;width: 70.4238%\" width=\"312\">Move the cursor to the start of the screen.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 28.4808%\" width=\"312\">M<\/td>\n<td style=\"text-align: center;width: 70.4238%\" width=\"312\">Move the cursor to the middle of the screen.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 28.4808%\" width=\"312\">L<\/td>\n<td style=\"text-align: center;width: 70.4238%\" width=\"312\">Move the cursor to the bottom of the screen.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 28.4808%\" width=\"312\">:2<\/td>\n<td style=\"text-align: center;width: 70.4238%\" width=\"312\">Go to line2.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 28.4808%\" width=\"312\">:+3<\/td>\n<td style=\"text-align: center;width: 70.4238%\" width=\"312\">Go 3 lines forward.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 28.4808%\" width=\"312\">:-3<\/td>\n<td style=\"text-align: center;width: 70.4238%\" width=\"312\">Go 3 lines backward.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 28.4808%\" width=\"312\">G<\/td>\n<td style=\"text-align: center;width: 70.4238%\" width=\"312\">Go to the last line of file.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 28.4808%\" width=\"312\">gg<\/td>\n<td style=\"text-align: center;width: 70.4238%\" width=\"312\">Go to the beginning of file.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 28.4808%\" width=\"312\">w<\/td>\n<td style=\"text-align: center;width: 70.4238%\" width=\"312\">Move ahead one word. 2w to move ahead two words.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 28.4808%\" width=\"312\">W<\/td>\n<td style=\"text-align: center;width: 70.4238%\" width=\"312\">Move ahead one whitespace-delimited word.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 28.4808%\" width=\"312\">b<\/td>\n<td style=\"text-align: center;width: 70.4238%\" width=\"312\">Move back one word. 2b to move back two words.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 28.4808%\" width=\"312\">B<\/td>\n<td style=\"text-align: center;width: 70.4238%\" width=\"312\">Move back one whitespace-delimited word.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 28.4808%\" width=\"312\">}<\/td>\n<td style=\"text-align: center;width: 70.4238%\" width=\"312\">Move ahead one paragraph. 3} to move ahead three paragraphs.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 28.4808%\" width=\"312\">{<\/td>\n<td style=\"text-align: center;width: 70.4238%\" width=\"312\">Move back one paragraph. 3{ to move back three paragraphs.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 28.4808%\" width=\"312\">]s<\/td>\n<td style=\"text-align: center;width: 70.4238%\" width=\"312\">Go to the next misspelled word.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 28.4808%\" width=\"312\">[s<\/td>\n<td style=\"text-align: center;width: 70.4238%\" width=\"312\">Go to the previous misspelled word.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 28.4808%\" width=\"312\">Y}<\/td>\n<td style=\"text-align: center;width: 70.4238%\" width=\"312\">Copy the following paragraph.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 28.4808%\" width=\"312\">y3w<\/td>\n<td style=\"text-align: center;width: 70.4238%\" width=\"312\">Copy the next three words.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400\"><\/div> <\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Splitscreen_Editing_Commands\"><\/span>Splitscreen Editing Commands<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">Vim split-screen editing commands let you edit multiple files at the same time. You can divide the Vim window vertically or horizontally to work on different sections of the same file or on different files. Here are some split-screen editing commands:<\/p>\n<p><span style=\"font-weight: 400;\"><div class=\"su-table su-table-responsive su-table-alternate su-table-fixed\"> <\/span><\/p>\n<table style=\"width: 54.9529%\" width=\"0\">\n<tbody>\n<tr>\n<th style=\"text-align: center;width: 33.3286%\" width=\"312\"><strong>Commands<\/strong><\/th>\n<th style=\"text-align: center;width: 65.5759%\" width=\"312\"><strong>Tasks<\/strong><\/th>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 33.3286%\" width=\"312\">:split<\/td>\n<td style=\"text-align: center;width: 65.5759%\" width=\"312\">Split Vim window horizontally.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 33.3286%\" width=\"312\">:vsplit<\/td>\n<td style=\"text-align: center;width: 65.5759%\" width=\"312\">Split Vim window vertically.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 33.3286%\" width=\"312\">CTRL+wk<\/td>\n<td style=\"text-align: center;width: 65.5759%\" width=\"312\">Move to the split above the current one.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 33.3286%\" width=\"312\">CTRL+wj<\/td>\n<td style=\"text-align: center;width: 65.5759%\" width=\"312\">Move to the split below the current one.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 33.3286%\" width=\"312\">CTRL+wh<\/td>\n<td style=\"text-align: center;width: 65.5759%\" width=\"312\">Move to the split to the left of the current one.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 33.3286%\" width=\"312\">CTRL+wl<\/td>\n<td style=\"text-align: center;width: 65.5759%\" width=\"312\">Move to the split to the right of the current one.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 33.3286%\" width=\"312\">CTRL+w+<\/td>\n<td style=\"text-align: center;width: 65.5759%\" width=\"312\">Increase the height of the current split.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 33.3286%\" width=\"312\">CTRL+w-<\/td>\n<td style=\"text-align: center;width: 65.5759%\" width=\"312\">Decrease the height of the current split.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 33.3286%\" width=\"312\">CTRL+w&gt;<\/td>\n<td style=\"text-align: center;width: 65.5759%\" width=\"312\">Increase the width of the current split.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 33.3286%\" width=\"312\">CTRL+w&lt;<\/td>\n<td style=\"text-align: center;width: 65.5759%\" width=\"312\">Decrease the width of the current split.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;width: 33.3286%\" width=\"312\">:q<\/td>\n<td style=\"text-align: center;width: 65.5759%\" width=\"312\">Close split.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400\"><\/div> <\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">To sum up, in this article, I have explained the different modes of Vim, how to use it, and some helpful commands of Vim. Read through this article to learn Vim effectively. I hope that this will help you understand the Vim editor better.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"People_Also_Ask\"><\/span>People Also Ask<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"What_is_the_role_of_Vim\"><\/span>What is the role of Vim?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">The main role of Vim is to provide an efficient environment for manipulating text. It is available on Linux, Mac OS, Windows, and all platforms and provides a wide range of keyboard shortcuts and macros, as well as text-processing commands. Vim can be used for coding, writing, and editing configuration files.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Is_Vim_only_for_Linux\"><\/span>Is Vim only for Linux?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">No. Vim is not only for Linux. It can be used on multiple platforms such as Linux, macOS, windows, and all Unix-like operating systems.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"What_is_the_difference_between_Vi_and_Vim\"><\/span>What is the difference between Vi and Vim?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">The main difference between Vim and vi is that Vim (vi improved) is the updated version of vi. Vim supports syntax highlighting, split windows, undo\/redo multiple times, and a lot of customization through the configuration file, which vi does not.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"What_is_the_Vim_command\"><\/span>What is the Vim command?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">Vim commands are used to carry out various text-processing operations such as editing, copying, pasting, replacing, navigating, etc. For instance, <code class=\"\" data-line=\"\">i<\/code> command for inserting text, <code class=\"\" data-line=\"\">Y<\/code> for copying text, and <code class=\"\" data-line=\"\">p<\/code> for pasting text.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Why_Vim_is_used_in_Linux\"><\/span>Why Vim is used in Linux?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">Vim is used in Linux as it has many additional features and is readily available in all Linux systems. The versatility of Vim allows users to perform editing tasks more efficiently and quickly compared to other traditional text editors.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"What_are_the_advantages_and_disadvantages_of_Vim_in_Linux\"><\/span>What are the advantages and disadvantages of Vim in Linux?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">The primary advantages of Vim are its flexibility, speed, and editing capabilities, as well as being cross-platform. However, learning Vim commands takes some time and effort. Also, it\u2019s a keyboard-based editing tool, so it\u2019s not an ideal option for mouse users.<\/p>\n<p><script type=\"application\/ld+json\">\n{\n  \"@context\": \"https:\/\/schema.org\",\n  \"@type\": \"FAQPage\",\n  \"mainEntity\": [{\n    \"@type\": \"Question\",\n    \"name\": \"What is the role of Vim?\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"The main role of Vim is to provide an efficient environment for manipulating text. It is available on Linux, Mac OS, Windows, and all platforms and provides a wide range of keyboard shortcuts and macros, as well as text-processing commands. Vim can be used for coding, writing, and editing configuration files.\"\n    }\n  },{\n    \"@type\": \"Question\",\n    \"name\": \"Is Vim only for Linux?\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"No. Vim is not only for Linux. It can be used on multiple platforms such as Linux, macOS, windows, and all Unix-like operating systems.\"\n    }\n  },{\n    \"@type\": \"Question\",\n    \"name\": \"What is the difference between Vi and Vim?\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"The main difference between Vim and vi is that Vim (vi improved) is the updated version of vi. Vim supports syntax highlighting, split windows, undo\/redo multiple times, and a lot of customization through the configuration file, which vi does not.\"\n    }\n  },{\n    \"@type\": \"Question\",\n    \"name\": \"What is the Vim command?\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"Vim commands are used to carry out various text-processing operations such as editing, copying, pasting, replacing, navigating, etc. For instance, i command for inserting text, Y for copying text, and p for pasting text.\"\n    }\n  },{\n    \"@type\": \"Question\",\n    \"name\": \"Why Vim is used in Linux?\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"Vim is used in Linux as it has many additional features and is readily available in all Linux systems. The versatility of Vim allows users to perform editing tasks more efficiently and quickly compared to other traditional text editors.\"\n    }\n  },{\n    \"@type\": \"Question\",\n    \"name\": \"What are the advantages and disadvantages of Vim in Linux?\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"The primary advantages of Vim are its flexibility, speed, and editing capabilities, as well as being cross-platform. However, learning Vim commands takes some time and effort. Also, it\u2019s a keyboard-based editing tool, so it\u2019s not an ideal option for mouse users.\"\n    }\n  }]\n}\n<\/script><\/p>\n<p><span style=\"font-size: 18pt; color: #003366;\"><strong>Related Articles<\/strong><\/span><\/p>\n<ul>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/install-vim-in-ubuntu\/\" target=\"_blank\" rel=\"noopener\">How to Install Vim in Ubuntu? [5 Methods]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/edit-in-vim\/\" target=\"_blank\" rel=\"noopener\">How to Edit With Vim in Linux? [Explained]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/install-vim-plug\/\" target=\"_blank\" rel=\"noopener\">How to Install and Use Vim-Plug in Linux [Explained]<\/a><\/strong><\/li>\n<li><strong><span data-sheets-root=\"1\" data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;How to Set Vim Color Scheme in Linux? [4 Steps]&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:1074113,&quot;3&quot;:{&quot;1&quot;:0},&quot;9&quot;:1,&quot;10&quot;:1,&quot;11&quot;:4,&quot;12&quot;:0,&quot;16&quot;:12,&quot;17&quot;:1,&quot;23&quot;:1}\" data-sheets-hyperlink=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/set-color-scheme\/\"><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/set-color-scheme\/\" target=\"_blank\" rel=\"noopener\">How to Set Vim Color Scheme in Linux? [4 Steps]<\/a><\/span><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/show-line-numbers\/\" target=\"_blank\" rel=\"noopener\">How to Show Line Numbers in Vim? [All Scenarios]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/go-to-line\/\" target=\"_blank\" rel=\"noopener\">How to Go to a Specific Line in Vim? [All Cases]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/select-all-in-vim\/\" target=\"_blank\" rel=\"noopener\">How to Select All Text in Vim? [5 Cases]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/delete-all-lines\/\" target=\"_blank\" rel=\"noopener\">How to Delete All Lines in Vim? [6 Cases]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/copy-cut-and-paste\/\" target=\"_blank\" rel=\"noopener\">How to Copy, Cut, and Paste Text in Vim? [All Cases]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/search-in-vim-editor\/\" target=\"_blank\" rel=\"noopener\">How to Search Text in Vim Editor? [8 Cases]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/find-and-replace\/\" target=\"_blank\" rel=\"noopener\">How to Find and Replace Text in Vim? [5 Cases]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/undo-and-redo\/\" target=\"_blank\" rel=\"noopener\">How to Undo and Redo Changes in Vim? [All Ways]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/how-to-close-vim\/\" target=\"_blank\" rel=\"noopener\">How to Close Vim Text Editor? [All Scenarios]<\/a><\/strong><\/li>\n<\/ul>\n<hr \/>\n<p><strong>&lt;&lt; Go Back to <a href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/\" target=\"_blank\" rel=\"noopener\">Linux Text Editors<\/a> | <a href=\"https:\/\/linuxsimply.com\/linux-basics\/\" target=\"_blank\" rel=\"noopener\">Learn Linux Basics<\/a><\/strong><\/p>\n\n\n<div class=\"kk-star-ratings kksr-auto kksr-align-center kksr-valign-bottom\"\n    data-payload='{&quot;align&quot;:&quot;center&quot;,&quot;id&quot;:&quot;41171&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;0&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;0&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;Rate this post&quot;,&quot;legend&quot;:&quot;0\\\/5 - (0 votes)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;title&quot;:&quot;Vim in Linux&quot;,&quot;width&quot;:&quot;0&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n            \n<div class=\"kksr-stars\">\n    \n<div class=\"kksr-stars-inactive\">\n            <div class=\"kksr-star\" data-star=\"1\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"2\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"3\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"4\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"5\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n    \n<div class=\"kksr-stars-active\" style=\"width: 0px;\">\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n<\/div>\n                \n\n<div class=\"kksr-legend\" style=\"font-size: 19.2px;\">\n            <span class=\"kksr-muted\">Rate this post<\/span>\n    <\/div>\n    <\/div>\n","protected":false},"excerpt":{"rendered":"<p>Vim is a text editor for the Unix-like operating system (Linux, BSD, macOS) with both the command line and graphical &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Vim in Linux\" class=\"read-more button\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#more-41171\" aria-label=\"Read more about Vim in Linux\">Read more<\/a><\/p>\n","protected":false},"author":314908,"featured_media":41192,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[149],"tags":[206],"class_list":["post-41171","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux-basics","tag-text-editors-linux","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Vim in Linux - LinuxSimply<\/title>\n<meta name=\"description\" content=\"Vim is a popular text manipulating tool in Linux. In this article, I have explained how to use vim in Linux and the importance of using it.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Vim in Linux - LinuxSimply\" \/>\n<meta property=\"og:description\" content=\"Vim is a popular text manipulating tool in Linux. In this article, I have explained how to use vim in Linux and the importance of using it.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/\" \/>\n<meta property=\"og:site_name\" content=\"LinuxSimply\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/mitalimostakim.mou\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-04-18T06:18:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-14T09:46:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/vim-in-linux.png\" \/>\n\t<meta property=\"og:image:width\" content=\"400\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Mitu Akter Mou\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mitu Akter Mou\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"14 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/linux-basics\\\/text-editors\\\/vim\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/linux-basics\\\/text-editors\\\/vim\\\/\"},\"author\":{\"name\":\"Mitu Akter Mou\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/person\\\/54b35370776bb6a79376ea0135412689\"},\"headline\":\"Vim in Linux\",\"datePublished\":\"2024-04-18T06:18:30+00:00\",\"dateModified\":\"2024-05-14T09:46:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/linux-basics\\\/text-editors\\\/vim\\\/\"},\"wordCount\":2468,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/linux-basics\\\/text-editors\\\/vim\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/vim-in-linux.png\",\"keywords\":[\"text editors linux\"],\"articleSection\":[\"Linux Basics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/linuxsimply.com\\\/linux-basics\\\/text-editors\\\/vim\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/linux-basics\\\/text-editors\\\/vim\\\/\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/linux-basics\\\/text-editors\\\/vim\\\/\",\"name\":\"Vim in Linux - LinuxSimply\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/linux-basics\\\/text-editors\\\/vim\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/linux-basics\\\/text-editors\\\/vim\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/vim-in-linux.png\",\"datePublished\":\"2024-04-18T06:18:30+00:00\",\"dateModified\":\"2024-05-14T09:46:07+00:00\",\"description\":\"Vim is a popular text manipulating tool in Linux. In this article, I have explained how to use vim in Linux and the importance of using it.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/linux-basics\\\/text-editors\\\/vim\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/linuxsimply.com\\\/linux-basics\\\/text-editors\\\/vim\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/linux-basics\\\/text-editors\\\/vim\\\/#primaryimage\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/vim-in-linux.png\",\"contentUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/vim-in-linux.png\",\"width\":400,\"height\":400,\"caption\":\"vim in linux\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/linux-basics\\\/text-editors\\\/vim\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/linuxsimply.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Learn Linux Basics\",\"item\":\"https:\\\/\\\/linuxsimply.com\\\/linux-basics\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Linux Text Editors\",\"item\":\"https:\\\/\\\/linuxsimply.com\\\/linux-basics\\\/text-editors\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Vim in Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#website\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/\",\"name\":\"LinuxSimply\",\"description\":\"All About Linux\",\"publisher\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/linuxsimply.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#organization\",\"name\":\"LinuxSimply\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/LinuxSimply-New-Logo-Without-Icon.png\",\"contentUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/LinuxSimply-New-Logo-Without-Icon.png\",\"width\":355,\"height\":48,\"caption\":\"LinuxSimply\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/person\\\/54b35370776bb6a79376ea0135412689\",\"name\":\"Mitu Akter Mou\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/Mitu-Akter-Mou-II-96x96.png\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/Mitu-Akter-Mou-II-96x96.png\",\"contentUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/Mitu-Akter-Mou-II-96x96.png\",\"caption\":\"Mitu Akter Mou\"},\"description\":\"Hello, This is Mitu Akter Mou, currently working as a Linux Content Developer Executive at SOFTEKO for the Linuxsimply project. I hold a bachelor's degree in Biomedical Engineering from Khulna University of Engineering &amp; Technology (KUET). Experiencing new stuff and gathering insights from them seems very happening to me. My goal here is to simplify the life of Linux users by making creative articles, blogs, and video content for all of them. Read Full Bio\",\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/mitalimostakim.mou\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/mitu-akter-mou-915537198\\\/\"],\"url\":\"https:\\\/\\\/linuxsimply.com\\\/author\\\/mou\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Vim in Linux - LinuxSimply","description":"Vim is a popular text manipulating tool in Linux. In this article, I have explained how to use vim in Linux and the importance of using it.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/","og_locale":"en_US","og_type":"article","og_title":"Vim in Linux - LinuxSimply","og_description":"Vim is a popular text manipulating tool in Linux. In this article, I have explained how to use vim in Linux and the importance of using it.","og_url":"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/","og_site_name":"LinuxSimply","article_author":"https:\/\/www.facebook.com\/mitalimostakim.mou\/","article_published_time":"2024-04-18T06:18:30+00:00","article_modified_time":"2024-05-14T09:46:07+00:00","og_image":[{"width":400,"height":400,"url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/vim-in-linux.png","type":"image\/png"}],"author":"Mitu Akter Mou","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Mitu Akter Mou","Est. reading time":"14 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#article","isPartOf":{"@id":"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/"},"author":{"name":"Mitu Akter Mou","@id":"https:\/\/linuxsimply.com\/#\/schema\/person\/54b35370776bb6a79376ea0135412689"},"headline":"Vim in Linux","datePublished":"2024-04-18T06:18:30+00:00","dateModified":"2024-05-14T09:46:07+00:00","mainEntityOfPage":{"@id":"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/"},"wordCount":2468,"commentCount":0,"publisher":{"@id":"https:\/\/linuxsimply.com\/#organization"},"image":{"@id":"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/vim-in-linux.png","keywords":["text editors linux"],"articleSection":["Linux Basics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/","url":"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/","name":"Vim in Linux - LinuxSimply","isPartOf":{"@id":"https:\/\/linuxsimply.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#primaryimage"},"image":{"@id":"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/vim-in-linux.png","datePublished":"2024-04-18T06:18:30+00:00","dateModified":"2024-05-14T09:46:07+00:00","description":"Vim is a popular text manipulating tool in Linux. In this article, I have explained how to use vim in Linux and the importance of using it.","breadcrumb":{"@id":"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#primaryimage","url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/vim-in-linux.png","contentUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2024\/04\/vim-in-linux.png","width":400,"height":400,"caption":"vim in linux"},{"@type":"BreadcrumbList","@id":"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/vim\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/linuxsimply.com\/"},{"@type":"ListItem","position":2,"name":"Learn Linux Basics","item":"https:\/\/linuxsimply.com\/linux-basics\/"},{"@type":"ListItem","position":3,"name":"Linux Text Editors","item":"https:\/\/linuxsimply.com\/linux-basics\/text-editors\/"},{"@type":"ListItem","position":4,"name":"Vim in Linux"}]},{"@type":"WebSite","@id":"https:\/\/linuxsimply.com\/#website","url":"https:\/\/linuxsimply.com\/","name":"LinuxSimply","description":"All About Linux","publisher":{"@id":"https:\/\/linuxsimply.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/linuxsimply.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/linuxsimply.com\/#organization","name":"LinuxSimply","url":"https:\/\/linuxsimply.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxsimply.com\/#\/schema\/logo\/image\/","url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/LinuxSimply-New-Logo-Without-Icon.png","contentUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/LinuxSimply-New-Logo-Without-Icon.png","width":355,"height":48,"caption":"LinuxSimply"},"image":{"@id":"https:\/\/linuxsimply.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/linuxsimply.com\/#\/schema\/person\/54b35370776bb6a79376ea0135412689","name":"Mitu Akter Mou","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/Mitu-Akter-Mou-II-96x96.png","url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/Mitu-Akter-Mou-II-96x96.png","contentUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/Mitu-Akter-Mou-II-96x96.png","caption":"Mitu Akter Mou"},"description":"Hello, This is Mitu Akter Mou, currently working as a Linux Content Developer Executive at SOFTEKO for the Linuxsimply project. I hold a bachelor's degree in Biomedical Engineering from Khulna University of Engineering &amp; Technology (KUET). Experiencing new stuff and gathering insights from them seems very happening to me. My goal here is to simplify the life of Linux users by making creative articles, blogs, and video content for all of them. Read Full Bio","sameAs":["https:\/\/www.facebook.com\/mitalimostakim.mou\/","https:\/\/www.linkedin.com\/in\/mitu-akter-mou-915537198\/"],"url":"https:\/\/linuxsimply.com\/author\/mou\/"}]}},"_links":{"self":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/posts\/41171","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/users\/314908"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/comments?post=41171"}],"version-history":[{"count":0,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/posts\/41171\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/media\/41192"}],"wp:attachment":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/media?parent=41171"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/categories?post=41171"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/tags?post=41171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}