{"id":29237,"date":"2019-01-20T13:06:43","date_gmt":"2019-01-20T11:06:43","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/?p=29237"},"modified":"2019-01-20T13:06:51","modified_gmt":"2019-01-20T11:06:51","slug":"vim-persistent-undo","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2019\/01\/20\/vim-persistent-undo\/","title":{"rendered":"Vim: persistent undo"},"content":{"rendered":"<!-- google_ad_section_start -->\n\n<p class=\"wp-block-paragraph\">Learning Vim is an endless process.  Even after using it for two decades I still keep discovering new settings, features, and plugins that significantly improve my productivity.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The other day I came across &#8220;<a href=\"https:\/\/news.ycombinator.com\/item?id=18898523\">Ask HN: Best things in your bash_profile\/aliases?<\/a>&#8221; thread, with plenty of tips and tricks.  One <a href=\"https:\/\/news.ycombinator.com\/item?id=18901621\">particular comment<\/a> highlighted a feature that I kind of heard about but never got to setting up &#8211; persistent undo.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It turns out that starting with <a href=\"https:\/\/lwn.net\/Articles\/401002\/\">Vim 7.3<\/a> you can preserve the undo history between editing sessions.  Which means that you make changes to a file, save it, close it, and when you reopen it later, you can press &#8216;u&#8217; to undo the changes you&#8217;ve done during the last edit.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In order to set this up, you first need to create a folder, where Vim will store the undo history files.  For example:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\n$ mkdir ~\/.vim\/undodir\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Then, you need tell Vim that you want to use persistent undo and where to store the files.  Edit the <em>.vimrc<\/em> file and add the following:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\nset undofile\nset undodir=~\/.vim\/undodir\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">As long as you are using Vim 7.3 or newer and the directory exists, your persistent undo history will work like a charm.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Read the rest of the thread for more tips on how to clean it up periodically, and how to further improve your experience with Vim&#8217;s undo, using plugins that help navigate the undo tree.<\/p>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>Learning Vim is an endless process. Even after using it for two decades I still keep discovering new settings, features, and plugins that significantly improve my productivity. The other day I came across &#8220;Ask HN: Best things in your bash_profile\/aliases?&#8221; thread, with plenty of tips and tricks. One particular comment highlighted a feature that I &hellip; <a href=\"https:\/\/mamchenkov.net\/wordpress\/2019\/01\/20\/vim-persistent-undo\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Vim: persistent undo<\/span><\/a><\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Vim: persistent undo #Vim #TextEditors #coding #productivity #CLI #WebDev #SysAdmin","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false,"_links_to":"","_links_to_target":""},"categories":[1,6,18,133,62,1334],"tags":[1960,1079,2297,3094,1330],"keyring_services":[],"class_list":["post-29237","post","type-post","status-publish","format-standard","hentry","category-general","category-linux","category-programming","category-sysadmin","category-technology","category-web-work","tag-command-line","tag-productivity","tag-text-editors","tag-vim","tag-web-development"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"description\" content=\"Learning Vim is an endless process. Even after using it for two decades I still keep discovering new settings, features, and plugins that significantly improve my productivity. The other day I came across &quot;Ask HN: Best things in your bash_profile\/aliases?&quot; thread, with plenty of tips and tricks. One particular comment highlighted a feature that I\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Leonid Mamchenkov\"\/>\n\t<meta name=\"google-site-verification\" content=\"VHvdD0_usx1_4DzKy_QCVcICVgX2EgA2ybELT-wl7kQ\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/mamchenkov.net\/wordpress\/2019\/01\/20\/vim-persistent-undo\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Leonid Mamchenkov - Life, universe, and everything else\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Vim: persistent undo - Leonid Mamchenkov\" \/>\n\t\t<meta property=\"og:description\" content=\"Learning Vim is an endless process. Even after using it for two decades I still keep discovering new settings, features, and plugins that significantly improve my productivity. The other day I came across &quot;Ask HN: Best things in your bash_profile\/aliases?&quot; thread, with plenty of tips and tricks. One particular comment highlighted a feature that I\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/mamchenkov.net\/wordpress\/2019\/01\/20\/vim-persistent-undo\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2026\/03\/leonid-sailing-beer.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2026\/03\/leonid-sailing-beer.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t\t<meta property=\"og:image:height\" content=\"1024\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-01-20T11:06:43+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-01-20T11:06:51+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/MamchenkovBlog\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@mamchenkov\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Vim: persistent undo - Leonid Mamchenkov\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Learning Vim is an endless process. Even after using it for two decades I still keep discovering new settings, features, and plugins that significantly improve my productivity. The other day I came across &quot;Ask HN: Best things in your bash_profile\/aliases?&quot; thread, with plenty of tips and tricks. One particular comment highlighted a feature that I\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@mamchenkov\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2026\/03\/leonid-sailing-beer.jpg\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2019\\\/01\\\/20\\\/vim-persistent-undo\\\/#blogposting\",\"name\":\"Vim: persistent undo - Leonid Mamchenkov\",\"headline\":\"Vim: persistent undo\",\"author\":{\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/author\\\/leonid\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2019\\\/01\\\/20\\\/vim-persistent-undo\\\/#articleImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3cf6df002a284d78fb6e9d8222ca4d102e0832035ed6bc8447008bd234e131a4?s=96&d=identicon&r=g\",\"width\":96,\"height\":96,\"caption\":\"Leonid Mamchenkov\"},\"datePublished\":\"2019-01-20T13:06:43+02:00\",\"dateModified\":\"2019-01-20T13:06:51+02:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2019\\\/01\\\/20\\\/vim-persistent-undo\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2019\\\/01\\\/20\\\/vim-persistent-undo\\\/#webpage\"},\"articleSection\":\"All, Linux, Programming, Sysadmin, Technology, Web work, command line, productivity, text editors, Vim, web development\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2019\\\/01\\\/20\\\/vim-persistent-undo\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/category\\\/technology\\\/#listItem\",\"position\":2,\"name\":\"Technology\",\"item\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/category\\\/technology\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/category\\\/technology\\\/linux\\\/#listItem\",\"name\":\"Linux\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/category\\\/technology\\\/linux\\\/#listItem\",\"position\":3,\"name\":\"Linux\",\"item\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/category\\\/technology\\\/linux\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2019\\\/01\\\/20\\\/vim-persistent-undo\\\/#listItem\",\"name\":\"Vim: persistent undo\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2019\\\/01\\\/20\\\/vim-persistent-undo\\\/#listItem\",\"position\":4,\"name\":\"Vim: persistent undo\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/category\\\/technology\\\/linux\\\/#listItem\",\"name\":\"Linux\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/#person\",\"name\":\"Leonid Mamchenkov\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2019\\\/01\\\/20\\\/vim-persistent-undo\\\/#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3cf6df002a284d78fb6e9d8222ca4d102e0832035ed6bc8447008bd234e131a4?s=96&d=identicon&r=g\",\"width\":96,\"height\":96,\"caption\":\"Leonid Mamchenkov\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/author\\\/leonid\\\/#author\",\"url\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/author\\\/leonid\\\/\",\"name\":\"Leonid Mamchenkov\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2019\\\/01\\\/20\\\/vim-persistent-undo\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3cf6df002a284d78fb6e9d8222ca4d102e0832035ed6bc8447008bd234e131a4?s=96&d=identicon&r=g\",\"width\":96,\"height\":96,\"caption\":\"Leonid Mamchenkov\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2019\\\/01\\\/20\\\/vim-persistent-undo\\\/#webpage\",\"url\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2019\\\/01\\\/20\\\/vim-persistent-undo\\\/\",\"name\":\"Vim: persistent undo - Leonid Mamchenkov\",\"description\":\"Learning Vim is an endless process. Even after using it for two decades I still keep discovering new settings, features, and plugins that significantly improve my productivity. The other day I came across \\\"Ask HN: Best things in your bash_profile\\\/aliases?\\\" thread, with plenty of tips and tricks. One particular comment highlighted a feature that I\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2019\\\/01\\\/20\\\/vim-persistent-undo\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/author\\\/leonid\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/author\\\/leonid\\\/#author\"},\"datePublished\":\"2019-01-20T13:06:43+02:00\",\"dateModified\":\"2019-01-20T13:06:51+02:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/#website\",\"url\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/\",\"name\":\"Blog of Leonid Mamchenkov\",\"description\":\"Life, universe, and everything else\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Vim: persistent undo - Leonid Mamchenkov","description":"Learning Vim is an endless process. Even after using it for two decades I still keep discovering new settings, features, and plugins that significantly improve my productivity. The other day I came across \"Ask HN: Best things in your bash_profile\/aliases?\" thread, with plenty of tips and tricks. One particular comment highlighted a feature that I","canonical_url":"https:\/\/mamchenkov.net\/wordpress\/2019\/01\/20\/vim-persistent-undo\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"google-site-verification":"VHvdD0_usx1_4DzKy_QCVcICVgX2EgA2ybELT-wl7kQ","miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/mamchenkov.net\/wordpress\/2019\/01\/20\/vim-persistent-undo\/#blogposting","name":"Vim: persistent undo - Leonid Mamchenkov","headline":"Vim: persistent undo","author":{"@id":"https:\/\/mamchenkov.net\/wordpress\/author\/leonid\/#author"},"publisher":{"@id":"https:\/\/mamchenkov.net\/wordpress\/#person"},"image":{"@type":"ImageObject","@id":"https:\/\/mamchenkov.net\/wordpress\/2019\/01\/20\/vim-persistent-undo\/#articleImage","url":"https:\/\/secure.gravatar.com\/avatar\/3cf6df002a284d78fb6e9d8222ca4d102e0832035ed6bc8447008bd234e131a4?s=96&d=identicon&r=g","width":96,"height":96,"caption":"Leonid Mamchenkov"},"datePublished":"2019-01-20T13:06:43+02:00","dateModified":"2019-01-20T13:06:51+02:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/mamchenkov.net\/wordpress\/2019\/01\/20\/vim-persistent-undo\/#webpage"},"isPartOf":{"@id":"https:\/\/mamchenkov.net\/wordpress\/2019\/01\/20\/vim-persistent-undo\/#webpage"},"articleSection":"All, Linux, Programming, Sysadmin, Technology, Web work, command line, productivity, text editors, Vim, web development"},{"@type":"BreadcrumbList","@id":"https:\/\/mamchenkov.net\/wordpress\/2019\/01\/20\/vim-persistent-undo\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress#listItem","position":1,"name":"Home","item":"https:\/\/mamchenkov.net\/wordpress","nextItem":{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/#listItem","name":"Technology"}},{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/#listItem","position":2,"name":"Technology","item":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/","nextItem":{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/linux\/#listItem","name":"Linux"},"previousItem":{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/linux\/#listItem","position":3,"name":"Linux","item":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/linux\/","nextItem":{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress\/2019\/01\/20\/vim-persistent-undo\/#listItem","name":"Vim: persistent undo"},"previousItem":{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/#listItem","name":"Technology"}},{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress\/2019\/01\/20\/vim-persistent-undo\/#listItem","position":4,"name":"Vim: persistent undo","previousItem":{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/linux\/#listItem","name":"Linux"}}]},{"@type":"Person","@id":"https:\/\/mamchenkov.net\/wordpress\/#person","name":"Leonid Mamchenkov","image":{"@type":"ImageObject","@id":"https:\/\/mamchenkov.net\/wordpress\/2019\/01\/20\/vim-persistent-undo\/#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/3cf6df002a284d78fb6e9d8222ca4d102e0832035ed6bc8447008bd234e131a4?s=96&d=identicon&r=g","width":96,"height":96,"caption":"Leonid Mamchenkov"}},{"@type":"Person","@id":"https:\/\/mamchenkov.net\/wordpress\/author\/leonid\/#author","url":"https:\/\/mamchenkov.net\/wordpress\/author\/leonid\/","name":"Leonid Mamchenkov","image":{"@type":"ImageObject","@id":"https:\/\/mamchenkov.net\/wordpress\/2019\/01\/20\/vim-persistent-undo\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/3cf6df002a284d78fb6e9d8222ca4d102e0832035ed6bc8447008bd234e131a4?s=96&d=identicon&r=g","width":96,"height":96,"caption":"Leonid Mamchenkov"}},{"@type":"WebPage","@id":"https:\/\/mamchenkov.net\/wordpress\/2019\/01\/20\/vim-persistent-undo\/#webpage","url":"https:\/\/mamchenkov.net\/wordpress\/2019\/01\/20\/vim-persistent-undo\/","name":"Vim: persistent undo - Leonid Mamchenkov","description":"Learning Vim is an endless process. Even after using it for two decades I still keep discovering new settings, features, and plugins that significantly improve my productivity. The other day I came across \"Ask HN: Best things in your bash_profile\/aliases?\" thread, with plenty of tips and tricks. One particular comment highlighted a feature that I","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/mamchenkov.net\/wordpress\/#website"},"breadcrumb":{"@id":"https:\/\/mamchenkov.net\/wordpress\/2019\/01\/20\/vim-persistent-undo\/#breadcrumblist"},"author":{"@id":"https:\/\/mamchenkov.net\/wordpress\/author\/leonid\/#author"},"creator":{"@id":"https:\/\/mamchenkov.net\/wordpress\/author\/leonid\/#author"},"datePublished":"2019-01-20T13:06:43+02:00","dateModified":"2019-01-20T13:06:51+02:00"},{"@type":"WebSite","@id":"https:\/\/mamchenkov.net\/wordpress\/#website","url":"https:\/\/mamchenkov.net\/wordpress\/","name":"Blog of Leonid Mamchenkov","description":"Life, universe, and everything else","inLanguage":"en-US","publisher":{"@id":"https:\/\/mamchenkov.net\/wordpress\/#person"}}]},"og:locale":"en_US","og:site_name":"Leonid Mamchenkov - Life, universe, and everything else","og:type":"article","og:title":"Vim: persistent undo - Leonid Mamchenkov","og:description":"Learning Vim is an endless process. Even after using it for two decades I still keep discovering new settings, features, and plugins that significantly improve my productivity. The other day I came across &quot;Ask HN: Best things in your bash_profile\/aliases?&quot; thread, with plenty of tips and tricks. One particular comment highlighted a feature that I","og:url":"https:\/\/mamchenkov.net\/wordpress\/2019\/01\/20\/vim-persistent-undo\/","og:image":"https:\/\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2026\/03\/leonid-sailing-beer.jpg","og:image:secure_url":"https:\/\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2026\/03\/leonid-sailing-beer.jpg","og:image:width":1024,"og:image:height":1024,"article:published_time":"2019-01-20T11:06:43+00:00","article:modified_time":"2019-01-20T11:06:51+00:00","article:publisher":"https:\/\/www.facebook.com\/MamchenkovBlog","twitter:card":"summary_large_image","twitter:site":"@mamchenkov","twitter:title":"Vim: persistent undo - Leonid Mamchenkov","twitter:description":"Learning Vim is an endless process. Even after using it for two decades I still keep discovering new settings, features, and plugins that significantly improve my productivity. The other day I came across &quot;Ask HN: Best things in your bash_profile\/aliases?&quot; thread, with plenty of tips and tricks. One particular comment highlighted a feature that I","twitter:creator":"@mamchenkov","twitter:image":"https:\/\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2026\/03\/leonid-sailing-beer.jpg"},"aioseo_meta_data":{"post_id":"29237","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"BlogPosting","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2023-07-19 22:36:18","updated":"2026-01-15 14:02:45","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/mamchenkov.net\/wordpress\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/\" title=\"Technology\">Technology<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/linux\/\" title=\"Linux\">Linux<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tVim: persistent undo\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/mamchenkov.net\/wordpress"},{"label":"Technology","link":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/"},{"label":"Linux","link":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/linux\/"},{"label":"Vim: persistent undo","link":"https:\/\/mamchenkov.net\/wordpress\/2019\/01\/20\/vim-persistent-undo\/"}],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":28184,"url":"https:\/\/mamchenkov.net\/wordpress\/2017\/11\/06\/turning-vim-into-an-ide-through-vim-plugins\/","url_meta":{"origin":29237,"position":0},"title":"Turning vim into an IDE through vim plugins","author":"Leonid Mamchenkov","date":"November 6, 2017","format":false,"excerpt":"\"Turning vim into an IDE through vim plugins\" is yet another take on customizing the Vim text editor and making it into a full featured IDE.\u00a0 Most of these things were possible for years (I even had my own blog post on the subject), but with every version of Vim\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2017\/11\/vim-ide-500x318.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":42582,"url":"https:\/\/mamchenkov.net\/wordpress\/2019\/05\/03\/intermediate-vim\/","url_meta":{"origin":29237,"position":1},"title":"Intermediate Vim","author":"Leonid Mamchenkov","date":"May 3, 2019","format":false,"excerpt":"Intermediate Vim is a nice collection of Vim tips and tricks, which are aimed at somebody who is already familiar with Vim. (There is of course no single definition of what's advanced, intermediate or introductory, so we'll leave that argument out.) But the article is well worth the read, even\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/05\/screenshot.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/05\/screenshot.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/05\/screenshot.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/05\/screenshot.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/05\/screenshot.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/05\/screenshot.png?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":42606,"url":"https:\/\/mamchenkov.net\/wordpress\/2019\/05\/13\/debugging-in-vim\/","url_meta":{"origin":29237,"position":2},"title":"Debugging in Vim","author":"Leonid Mamchenkov","date":"May 13, 2019","format":false,"excerpt":"Personally, I'm not a frequent user of debuggers. Most of the projects and code that I am involved with is easily debugged with good old \"die('here')\". But if you are looking for some help on how to use Vim with a debugger, have a look at the \"Debugging in Vim\"\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/05\/breakpoints.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/05\/breakpoints.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/05\/breakpoints.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/05\/breakpoints.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":28146,"url":"https:\/\/mamchenkov.net\/wordpress\/2017\/10\/24\/vim-after-15-years\/","url_meta":{"origin":29237,"position":3},"title":"Vim after 15 years","author":"Leonid Mamchenkov","date":"October 24, 2017","format":false,"excerpt":"\"Vim after 15 years\" is yet another one of those \"my Vim configuration review\" posts by someone who has been using Vim for 15 years or so. As someone who is also a long time Vim user, I have to say it's quite common to review your configuration once in\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2017\/10\/vim3-500x273.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":29247,"url":"https:\/\/mamchenkov.net\/wordpress\/2019\/01\/23\/spacevim-extended-vim-configuration-bundle\/","url_meta":{"origin":29237,"position":4},"title":"SpaceVim &#8211; extended Vim configuration bundle","author":"Leonid Mamchenkov","date":"January 23, 2019","format":false,"excerpt":"There are many different configuration bundles for Vim, which easy the discovery, installation, configuration, and documentation of different plugins and features of this powerful text editor. SpaceVim is yet another one of these. If you are new to Vim, or have grown tired of trying to tweak it to your\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/01\/spacevim.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/01\/spacevim.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/01\/spacevim.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/01\/spacevim.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/01\/spacevim.png?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":16253,"url":"https:\/\/mamchenkov.net\/wordpress\/2012\/04\/26\/vim-adventures\/","url_meta":{"origin":29237,"position":5},"title":"Vim adventures","author":"Leonid Mamchenkov","date":"April 26, 2012","format":false,"excerpt":"Vim is quite famous for being the best text editor in the world. \u00a0However it has quite a learning curve, especially for people who don't touch type and who aren't much interested in their own productivity. \u00a0Over the years, there were a few efforts to help the newcomers learn the\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2012\/04\/Vim-Adventures-500x289.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/29237","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/comments?post=29237"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/29237\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=29237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=29237"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=29237"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=29237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}