added post
57fafa70
2 file(s) · +82 −5
| 2 | 2 | title: "48 Hours Disconnected" |
|
| 3 | 3 | publishDate: "02 May 2023" |
|
| 4 | 4 | description: "I spent two days with zero access to my cell phone or computer, and this is what I discovered" |
|
| 5 | - | tags: ["social media", "tech philosphy", "personal"] |
|
| 5 | + | tags: ["social media", "tech philosophy", "personal"] |
|
| 6 | 6 | ogImage: "https://res.cloudinary.com/df9dofjus/image/upload/v1683045399/misc/D59779D7-75D0-4EE8-8C39-6C3EDA5D5CFC_1_105_c_hbikqe.jpg" |
|
| 7 | 7 | --- |
|
| 8 | 8 | ||
| 9 | 9 | import { Image } from "@astrojs/image/components"; |
|
| 10 | - | import substack from "../../assets/substack.png" |
|
| 10 | + | import substack from "../../assets/substack.png"; |
|
| 11 | 11 | import OutLinkButton from "../../components/OutLinkButton.astro"; |
|
| 12 | 12 | ||
| 13 | - | <OutLinkButton link="https://open.substack.com/pub/stevedsimkins/p/48-hours-disconnected?r=1iyrw0&utm_campaign=post&utm_medium=web" site="Substack" image={substack} />{" "} |
|
| 13 | + | <OutLinkButton |
|
| 14 | + | link="https://open.substack.com/pub/stevedsimkins/p/48-hours-disconnected?r=1iyrw0&utm_campaign=post&utm_medium=web" |
|
| 15 | + | site="Substack" |
|
| 16 | + | image={substack} |
|
| 17 | + | />{" "} |
|
| 14 | 18 | ||
| 15 | - | <Image src="https://res.cloudinary.com/df9dofjus/image/upload/v1683045399/misc/D59779D7-75D0-4EE8-8C39-6C3EDA5D5CFC_1_105_c_hbikqe.jpg" alt="header image" width={800} aspectRatio={3/2} /> |
|
| 19 | + | <Image |
|
| 20 | + | src="https://res.cloudinary.com/df9dofjus/image/upload/v1683045399/misc/D59779D7-75D0-4EE8-8C39-6C3EDA5D5CFC_1_105_c_hbikqe.jpg" |
|
| 21 | + | alt="header image" |
|
| 22 | + | width={800} |
|
| 23 | + | aspectRatio={3 / 2} |
|
| 24 | + | /> |
|
| 16 | 25 | ||
| 17 | 26 | It was a Thursday afternoon at the chiropractor. I was still on my paternity leave, helping my wife take our kids so our youngest could get some adjustments. Like most dads I sat around, waited, and scrolled on my phone. Halfway through I could tell my wife was miffed, and I thought it was due to our appointment being fifteen minutes late. In reality, my son had been trying to get my attention for several minutes, I ignored him, and he gave up. When she told me later that day I could vividly see it happen, like I was there, but I wasn’t. |
|
| 18 | 27 | ||
| 36 | 45 | ||
| 37 | 46 | ## I am so much more aware without my phone |
|
| 38 | 47 | ||
| 39 | - | As I found myself in those moments where nothing in particular was happening, twiddling my thumbs in boredom or sitting with someone, I realized how aware of my surroundings I truly was. It makes sense, if you’re looking down at your phone then you’re not looking up ¯\_(ツ)_/¯ There would be moments where I would be trying to talk to my wife and she would be on her phone, and it would take her a second to even notice I was talking. I can say this because in our marriage I have absolutely been worse in this area, more than I want to admit. It gave me an understanding of what it’s like to be on the other side of that fence, and I needed to feel that. |
|
| 48 | + | As I found myself in those moments where nothing in particular was happening, twiddling my thumbs in boredom or sitting with someone, I realized how aware of my surroundings I truly was. It makes sense, if you’re looking down at your phone then you’re not looking up ¯\_(ツ)\_/¯ There would be moments where I would be trying to talk to my wife and she would be on her phone, and it would take her a second to even notice I was talking. I can say this because in our marriage I have absolutely been worse in this area, more than I want to admit. It gave me an understanding of what it’s like to be on the other side of that fence, and I needed to feel that. |
|
| 40 | 49 | ||
| 41 | 50 | Apart from human interaction, my awareness in the outdoors and nature was also heightened. We took a day to explore a river gulf we hadn’t been to yet, and there were multiple moments while walking that I caught myself feeling the urge to check my phone. If I had my phone, I would have missed the smile on my son’s face as he saw the river running next to us, or the butterfly that landed at our feet. Those are the moments I have missed before because my habits convinced me that I was bored and needed entertainment, and that’s deeply saddening. What other precious moments have I missed? |
|
| 42 | 51 | ||
| 1 | + | --- |
|
| 2 | + | title: "How to Migrate from Neovim to VSCode" |
|
| 3 | + | publishDate: "06 July 2023" |
|
| 4 | + | description: "Some tips on how to eaily move to VSCode as a Neovim user (sorry Primagen)" |
|
| 5 | + | tags: ["vscode", "neovim", "productivity"] |
|
| 6 | + | --- |
|
| 7 | + | ||
| 8 | + | Okay, okay. I know. Before you come at me with virtual torches and pitchforks, hear this first: I love Neovim. I've been using it non-stop for the past two years, and honestly, I struggled to use any other kind of editor. I loved the speed, the tinkering, the ricing, etc. It's an incredible piece of open-source software and has a special place in my heart. |
|
| 9 | + | ||
| 10 | + | > The truth: use whatever tool fits you best. |
|
| 11 | + | > The harder truth: be willing to try the other tools. |
|
| 12 | + | ||
| 13 | + | Several developers have switched from Neovim to VSCode, notably [Nexxel](https://www.nexxel.dev/blog/neovim-to-vscode) and [Melkey](https://youtu.be/PLxpyUYvC_o). Both of their pieces of content resonated with me on several levels, so I thought, "Why not try it for a week?" The worst case scenario was that I would hate it and move back to Neovim. However, it turned out to be harder than I expected. The first few days were rough; nothing was smooth, everything felt clunky, it was just awful. Of course, I already had the Vim keybindings extension installed, which helped, but something was still missing. After digging into it, I realized there were two things throwing me off: |
|
| 14 | + | ||
| 15 | + | 1. The clunky UI |
|
| 16 | + | 2. Vim mode specific keybindings |
|
| 17 | + | ||
| 18 | + | Let me go into more detail about how I resolved these problems, and hopefully it will help anyone who finds themselves in the same situation. |
|
| 19 | + | ||
| 20 | + | ## UI |
|
| 21 | + | ||
| 22 | + | In Neovim, everything is stripped down to the core editor. By default, there are no extra plugins, no file tree, not even syntax highlighting. Of course, this is by design, and, like Linux, you have to make a lot of decisions as to what you want your editor to look like and how you want it to behave. In my opinion this is a good thing, and it's better to start out with less and slowly build more on top. Having just the minimal editor experience is a key UI component for the regular Neovim user. |
|
| 23 | + | ||
| 24 | + | VSCode is the exact opposite. There's loads of extra stuff all around the editor that's pure distraction. I mean, be real, who is using the minimap thing? What about that extra bar on the right with a bunch of icons that you'll never use? It's so aggressive that I wanted to get out as soon as I opened it. However, there are solutions to this! You can simply go to the View menu, then Appearance, and from there toggle all those nasty bits off. Now you can get VSCode looking more like this: |
|
| 25 | + | ||
| 26 | + |  |
|
| 27 | + | ||
| 28 | + | ## Keybindings |
|
| 29 | + | ||
| 30 | + | Altering the UI a bit is easy and takes a few minutes, but the keybindings were a whole other mess. Throughout my years of using Neovim, I had collected so many custom keymaps for different things that were unique to Neovim. I realized pretty quickly that I had no idea how I could use them again because they were bound to Vim modes. How do I use `Shift + H` to switch to the previous buffer or `Shift + L` to go to the next? How can I map that in VSCode? Thankfully, VSCodeVim has that covered, although it's not the most intuitive. |
|
| 31 | + | ||
| 32 | + | If you visit the [VSCodeVim](https://code.visualstudio.com/docs/editor/vim) docs, you can see they have some example configurations to remap keybindings for specific modes. For instance, I was able to add my lovely buffer switching remapping in normal mode with ease. |
|
| 33 | + | ||
| 34 | + | ```json |
|
| 35 | + | "vim.normalModeKeyBindings": [ |
|
| 36 | + | // switch buffers with ctrl and left and right |
|
| 37 | + | { "before": ["<S-h>"], "commands": [":bprevious"]}, |
|
| 38 | + | { "before": ["<S-l>"], "commands": [":bnext"]}, |
|
| 39 | + | ] |
|
| 40 | + | ``` |
|
| 41 | + | ||
| 42 | + | "Before" is simply the keys you're pressing and either "after" or "commands" (if you want to do `:enter commands`) will be the output of that binding. What I had a lot of trouble doing was going beyond the simpler stuff. Another one I loved using was `Ctrl + H, J, K, L` to switch between panes in the editor. Because VSCode isn't really using the same window API that Neovim has, those go out the window. How are you supposed to do those? |
|
| 43 | + | ||
| 44 | + | Here's the sauce: discovering VSCode's API. Something I had never done before is going to the built-in keybindings menu for VSCode and looking at what was in there. There's so much there and it's a bit overwhelming, but once you figure out how to find the command you're looking for, it makes just about anything possible. For my pane switching keymap, I wanted to find which command was changing the focus. I searched "focus left" in the VSCode keybindings and sure enough, there it was: `workbench.action.focusLeftGroup`. |
|
| 45 | + | ||
| 46 | + |  |
|
| 47 | + | ||
| 48 | + | Now back in our VSCodeVim config, we can add that method to the binding like so. |
|
| 49 | + | ||
| 50 | + | ```json |
|
| 51 | + | "vim.normalModeKeyBindings": [ |
|
| 52 | + | //... other bindings |
|
| 53 | + | ||
| 54 | + | // better pane navigation |
|
| 55 | + | { "before": ["<C-h>"], "commands": ["workbench.action.focusLeftGroup"]}, |
|
| 56 | + | { "before": ["<C-j>"], "commands": ["workbench.action.focusBelowGroup"]}, |
|
| 57 | + | { "before": ["<C-k>"], "commands": ["workbench.action.focusAboveGroup"]}, |
|
| 58 | + | { "before": ["<C-l>"], "commands": ["workbench.action.focusRightGroup"]}, |
|
| 59 | + | ], |
|
| 60 | + | ``` |
|
| 61 | + | ||
| 62 | + | It works like a charm. If you're doing this yourself, something I found useful is right-clicking on the command in the VSCode keybindings menu to see the method. Another example where this came in handy was using the "Find Files" command. By default, it's `Cmd + P` on Mac, but I was used to something like `<leader> + F`. When I searched "Open File..." in the keybindings, it didn't show the method like the others did. However, after right-clicking, you can click "Copy Command ID" to grab it. |
|
| 63 | + | ||
| 64 | + |  |
|
| 65 | + | ||
| 66 | + | Configuring VSCode is not the most pleasant experience, but on the plus side you can save your config file and move it wherever you want, and you don’t have to mess with configuring as many plugins with Neovim. I’m still on the fence as to whether I’ll keep trying to use VSCode or go back to Neovim, but hopefully these tips help anyone out there trying to make it work for their own personal reasons. |
|
| 67 | + | ||
| 68 | + | [Check out my VSCode config here](https://gist.github.com/stevedylandev/b6bb1eccd83ea438031158c5961fd3f8) |