{"id":53,"date":"2019-08-22T16:19:28","date_gmt":"2019-08-22T16:19:28","guid":{"rendered":"https:\/\/www.techcrm.in\/blogs\/?p=53"},"modified":"2020-09-08T14:55:48","modified_gmt":"2020-09-08T09:25:48","slug":"overview-of-the-vim-text-editor","status":"publish","type":"post","link":"https:\/\/www.techcrm.in\/blogs\/overview-of-the-vim-text-editor\/","title":{"rendered":"Overview of the Vim Text Editor"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\"> Normal Mode <\/h3>\n\n\n\n<p> The biggest concept that beginning vim users need to know is the concept of&nbsp;<em>modes<\/em>. Different editor functions, such as moving the cursor around and inserting text, are accomplished in different modes. Open up a file in vim: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vim example.conf<\/code><\/pre>\n\n\n\n<p> You are immediately put into&nbsp;<strong>normal<\/strong>&nbsp;mode. Normal modes does not seem normal at first. If you press \u201cj\u201d in normal mode, the letter \u201cj\u201d does not appear. Instead, the letter \u201cj\u201d moves the cursor down one line. Positioning the cursor in this mode is completely done with letter keys. The most basic are: <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>j<\/strong>&nbsp;\u2013 one line down<\/li><li><strong>k<\/strong>&nbsp;\u2013 one line up<\/li><li><strong>h<\/strong>&nbsp;\u2013 one character left<\/li><li><strong>l<\/strong>&nbsp;\u2013 one character right<\/li><\/ul>\n\n\n\n<p> While this may seem odd at first, switching from mode to mode actually speeds typing up, as you do not have to move your right hand over to the arrow keys and back every time you wish to re-position the cursor. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Insert Mode<\/h3>\n\n\n\n<p> To leave normal mode and start typing text, press \u201ci\u201d to enter&nbsp;<strong>insert mode<\/strong>. Insert mode behaves much more like the default mode in other text editors. There should not be any surprises.<br>When you are done with insert mode, hit the&nbsp;<strong>ESC<\/strong>&nbsp;key to get back to normal mode. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Command-line Mode<\/h3>\n\n\n\n<p> Command-line mode is used to perform a wide range of commands. To enter vim\u2019s command line, hit \u201c:\u201d (the colon) in normal mode. This will drop the cursor to the bottom of the terminal. Here you can do things like: <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Save your changes (write):<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>:w<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li> Quit out of vim: <\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>:q<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li> Quit without saving changes: <\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>:q!<\/code><\/pre>\n\n\n\n<p> You can also combine commands to run them together. This is commonly done to save the file and quit vim at the same time: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>:wq<\/code><\/pre>\n\n\n\n<p>After you have run a command, vim will place you back in normal mode. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">vimtutor<\/h3>\n\n\n\n<p> An article like this can only scratch the surface of using vim. The best way to pick up a new skill like this is to dive in headfirst. Vim comes with a program to help you do just that.\u00a0<strong>vimtutor<\/strong>\u00a0is an instruction manual that runs inside vim. You navigate through it using vim commands, and practice new commands as you learn them. If you really want to learn vim, this is the place to go after reading this article. Simply run \u2018vimtutor\u2019 at the command prompt, and you will be off to the races.<\/p>\n\n\n\n<p>\n\nHope you find this blog post helpful.<\/p>\n\n\n\n<p>Feel free to add comments and queries, that helps us to improve the quality of posts.<\/p>\n\n\n\n<p>You can contact us at&nbsp;<a rel=\"noreferrer noopener\" href=\"mailto:contact@urdhva-tech.com\" target=\"_blank\">info@techcrm.in<\/a><\/p>\n\n\n\n<p>Thank you.\n\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Normal Mode The biggest concept that beginning vim users need to know is the concept of&nbsp;modes. Different editor functions, such as moving the cursor around and inserting text, are accomplished in different modes. Open up a file in vim: You are immediately put into&nbsp;normal&nbsp;mode. Normal modes does not seem normal at first. If you press [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[7,2],"class_list":["post-53","post","type-post","status-publish","format-standard","hentry","category-ubuntu","tag-putty","tag-ubuntu"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Overview of the Vim Text Editor - TechCRM<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.techcrm.in\/blogs\/overview-of-the-vim-text-editor\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Overview of the Vim Text Editor - TechCRM\" \/>\n<meta property=\"og:description\" content=\"Normal Mode The biggest concept that beginning vim users need to know is the concept of&nbsp;modes. Different editor functions, such as moving the cursor around and inserting text, are accomplished in different modes. Open up a file in vim: You are immediately put into&nbsp;normal&nbsp;mode. Normal modes does not seem normal at first. If you press [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.techcrm.in\/blogs\/overview-of-the-vim-text-editor\/\" \/>\n<meta property=\"og:site_name\" content=\"TechCRM\" \/>\n<meta property=\"article:published_time\" content=\"2019-08-22T16:19:28+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-09-08T09:25:48+00:00\" \/>\n<meta name=\"author\" content=\"Navin Rakhonde\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Navin Rakhonde\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.techcrm.in\/blogs\/overview-of-the-vim-text-editor\/\",\"url\":\"https:\/\/www.techcrm.in\/blogs\/overview-of-the-vim-text-editor\/\",\"name\":\"Overview of the Vim Text Editor - TechCRM\",\"isPartOf\":{\"@id\":\"https:\/\/www.techcrm.in\/blogs\/#website\"},\"datePublished\":\"2019-08-22T16:19:28+00:00\",\"dateModified\":\"2020-09-08T09:25:48+00:00\",\"author\":{\"@id\":\"https:\/\/www.techcrm.in\/blogs\/#\/schema\/person\/992dfe427bb53dcdfd72dd80e3ef9dbc\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.techcrm.in\/blogs\/overview-of-the-vim-text-editor\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.techcrm.in\/blogs\/overview-of-the-vim-text-editor\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.techcrm.in\/blogs\/overview-of-the-vim-text-editor\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.techcrm.in\/blogs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ubuntu\",\"item\":\"https:\/\/www.techcrm.in\/blogs\/category\/ubuntu\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Overview of the Vim Text Editor\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.techcrm.in\/blogs\/#website\",\"url\":\"https:\/\/www.techcrm.in\/blogs\/\",\"name\":\"TechCRM\",\"description\":\"Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.techcrm.in\/blogs\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.techcrm.in\/blogs\/#\/schema\/person\/992dfe427bb53dcdfd72dd80e3ef9dbc\",\"name\":\"Navin Rakhonde\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.techcrm.in\/blogs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9cc8fd1b948255055b85e5d41dabfc6e704f806d180a1e21cb8fb378e2f5c022?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9cc8fd1b948255055b85e5d41dabfc6e704f806d180a1e21cb8fb378e2f5c022?s=96&d=mm&r=g\",\"caption\":\"Navin Rakhonde\"},\"sameAs\":[\"https:\/\/www.techcrm.in\/\"],\"url\":\"https:\/\/www.techcrm.in\/blogs\/author\/navin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Overview of the Vim Text Editor - TechCRM","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:\/\/www.techcrm.in\/blogs\/overview-of-the-vim-text-editor\/","og_locale":"en_US","og_type":"article","og_title":"Overview of the Vim Text Editor - TechCRM","og_description":"Normal Mode The biggest concept that beginning vim users need to know is the concept of&nbsp;modes. Different editor functions, such as moving the cursor around and inserting text, are accomplished in different modes. Open up a file in vim: You are immediately put into&nbsp;normal&nbsp;mode. Normal modes does not seem normal at first. If you press [&hellip;]","og_url":"https:\/\/www.techcrm.in\/blogs\/overview-of-the-vim-text-editor\/","og_site_name":"TechCRM","article_published_time":"2019-08-22T16:19:28+00:00","article_modified_time":"2020-09-08T09:25:48+00:00","author":"Navin Rakhonde","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Navin Rakhonde","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.techcrm.in\/blogs\/overview-of-the-vim-text-editor\/","url":"https:\/\/www.techcrm.in\/blogs\/overview-of-the-vim-text-editor\/","name":"Overview of the Vim Text Editor - TechCRM","isPartOf":{"@id":"https:\/\/www.techcrm.in\/blogs\/#website"},"datePublished":"2019-08-22T16:19:28+00:00","dateModified":"2020-09-08T09:25:48+00:00","author":{"@id":"https:\/\/www.techcrm.in\/blogs\/#\/schema\/person\/992dfe427bb53dcdfd72dd80e3ef9dbc"},"breadcrumb":{"@id":"https:\/\/www.techcrm.in\/blogs\/overview-of-the-vim-text-editor\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.techcrm.in\/blogs\/overview-of-the-vim-text-editor\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.techcrm.in\/blogs\/overview-of-the-vim-text-editor\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.techcrm.in\/blogs\/"},{"@type":"ListItem","position":2,"name":"Ubuntu","item":"https:\/\/www.techcrm.in\/blogs\/category\/ubuntu\/"},{"@type":"ListItem","position":3,"name":"Overview of the Vim Text Editor"}]},{"@type":"WebSite","@id":"https:\/\/www.techcrm.in\/blogs\/#website","url":"https:\/\/www.techcrm.in\/blogs\/","name":"TechCRM","description":"Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.techcrm.in\/blogs\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.techcrm.in\/blogs\/#\/schema\/person\/992dfe427bb53dcdfd72dd80e3ef9dbc","name":"Navin Rakhonde","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.techcrm.in\/blogs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/9cc8fd1b948255055b85e5d41dabfc6e704f806d180a1e21cb8fb378e2f5c022?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9cc8fd1b948255055b85e5d41dabfc6e704f806d180a1e21cb8fb378e2f5c022?s=96&d=mm&r=g","caption":"Navin Rakhonde"},"sameAs":["https:\/\/www.techcrm.in\/"],"url":"https:\/\/www.techcrm.in\/blogs\/author\/navin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.techcrm.in\/blogs\/wp-json\/wp\/v2\/posts\/53","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.techcrm.in\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techcrm.in\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techcrm.in\/blogs\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techcrm.in\/blogs\/wp-json\/wp\/v2\/comments?post=53"}],"version-history":[{"count":3,"href":"https:\/\/www.techcrm.in\/blogs\/wp-json\/wp\/v2\/posts\/53\/revisions"}],"predecessor-version":[{"id":102,"href":"https:\/\/www.techcrm.in\/blogs\/wp-json\/wp\/v2\/posts\/53\/revisions\/102"}],"wp:attachment":[{"href":"https:\/\/www.techcrm.in\/blogs\/wp-json\/wp\/v2\/media?parent=53"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techcrm.in\/blogs\/wp-json\/wp\/v2\/categories?post=53"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techcrm.in\/blogs\/wp-json\/wp\/v2\/tags?post=53"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}