{"id":42729,"date":"2024-04-02T16:07:46","date_gmt":"2024-04-02T20:07:46","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=42729"},"modified":"2024-04-03T09:24:39","modified_gmt":"2024-04-03T13:24:39","slug":"switching-from-xcode-to-neovim","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2024\/04\/02\/switching-from-xcode-to-neovim\/","title":{"rendered":"Switching From Xcode to Neovim"},"content":{"rendered":"<p><a href=\"https:\/\/wojciechkulik.pl\/ios\/why-switching-from-xcode-to-neovim-can-become-the-best-decision-you-ever-made\">Wojciech Kulik<\/a>:<\/p>\n<blockquote cite=\"https:\/\/wojciechkulik.pl\/ios\/why-switching-from-xcode-to-neovim-can-become-the-best-decision-you-ever-made\">\n<p>To give you an idea what it means, here is a simple example. Let&rsquo;s say you want to delete the current line in Xcode. You would probably use the mouse to select the line, then press <code>cmd + x<\/code> to cut it or <code>backspace<\/code> to delete it. In Neovim, you can do the same thing with just one command: <code>dd<\/code>.<\/p>\n<p>Another example is let&rsquo;s say deleting everything within the nearest brackets. In Xcode, you would have to manually select the text, while in Neovim you can do it with <code>dib<\/code> or <code>cib<\/code> if you want to start typing right away.<\/p>\n<\/blockquote>\n<p>These are both pretty easy to do in Xcode. You can use Control-A, Control-K to delete the current line. And I assign Command-Shift-B to Xcode&rsquo;s Balance command to select everything within the nearest brackets. It does not have editor macros, though.<\/p>\n<blockquote cite=\"https:\/\/wojciechkulik.pl\/ios\/why-switching-from-xcode-to-neovim-can-become-the-best-decision-you-ever-made\">\n<p>You could have thought: &ldquo;ok, but what&rsquo;s the difference between Neovim and VSCode? It also offers thousands of plugins.&rdquo;<\/p>\n<p>The difference is that Neovim allows you to extend the environment without creating the whole plugin and the knowledge on how to do that. You just need to know the basics of Lua language (which is very easy to learn) and you can right away customize whatever you want directly in your config.<\/p>\n<\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2023\/05\/12\/llm-coding-tools-in-xcode\/\">LLM Coding Tools in Xcode<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2022\/07\/08\/xcode-14-swift-package-plug-ins\/\">Xcode 14: Swift Package Plug-ins<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2020\/10\/07\/the-era-of-visual-studio-code\/\">The Era of Visual Studio Code<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2018\/04\/29\/multiple-cursors-in-xcode\/\">Multiple Cursors in Xcode<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2016\/06\/22\/xcode-8-tips-and-issues\/\">Xcode 8 Tips and Issues<\/a><\/li>\n<\/ul>\n\n<p id=\"switching-from-xcode-to-neovim-update-2024-04-03\">Update (2024-04-03): <a href=\"https:\/\/mastodon.twocanoes.com\/@tperfitt\/112203446906982837\">Timothy Perfitt<\/a>:<\/p>\n<blockquote cite=\"https:\/\/mastodon.twocanoes.com\/@tperfitt\/112203446906982837\">\n<p>i just discovered recently that xcode has a VIM mode as well. so you literally can do dd in xcode as well.<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Wojciech Kulik: To give you an idea what it means, here is a simple example. Let&rsquo;s say you want to delete the current line in Xcode. You would probably use the mouse to select the line, then press cmd + x to cut it or backspace to delete it. In Neovim, you can do the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2024-04-02T20:07:48Z","apple_news_api_id":"af891bbe-44a3-4dd0-be32-81100a6c291a","apple_news_api_modified_at":"2024-04-03T13:24:43Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAQ==","apple_news_api_share_url":"https:\/\/apple.news\/Ar4kbvkSjTdC-MoEQCmwpGg","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[125,387,30,2385,71,2444,226],"class_list":["post-42729","post","type-post","status-publish","format-standard","hentry","category-technology","tag-keyboardshortcuts","tag-lua","tag-mac","tag-macos-14-sonoma","tag-programming","tag-vim","tag-xcode"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/42729","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=42729"}],"version-history":[{"count":3,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/42729\/revisions"}],"predecessor-version":[{"id":42732,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/42729\/revisions\/42732"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=42729"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=42729"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=42729"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}