My (Neo)Vim workflow
An experienced Vim user shares tips on optimizing the (Neo)Vim experience through Personalized Development Environment (PDE), covering search techniques, keybindings, plugins, movement enhancements, text manipulation, quickfix list, spell check, and status line customization.
Read original articleThis article discusses an experienced Vim user's workflow, focusing on optimizing the (Neo)Vim experience. The author emphasizes the importance of a Personalized Development Environment (PDE) tailored to individual needs. The workflow covers various aspects such as search and replace techniques, keybindings, plugins like Grepper and Undotree, movement enhancements, and plugins for text manipulation like vim-surround and vim-matchup. Additionally, it touches on improving the quickfix list with the nvim-bqf plugin and enhancing spell check functionality. The author also mentions using a status line plugin and shares their dotfiles for Neovim 0.10. The article provides detailed configurations, key mappings, and plugin setups to enhance productivity and efficiency within the Vim environment.
Related
Avoiding Emacs Bankruptcy
Avoid "Emacs bankruptcy" by choosing efficient packages, deleting unnecessary configurations, and focusing on Emacs's core benefits. Prioritize power-to-weight ratio to prevent slowdowns and maintenance issues. Regularly reassess for a streamlined setup.
FreeBSD Bhyve Companion Tools
The author details transitioning from VirtualBox to FreeBSD Bhyve, praising Bhyve's benefits in a FreeBSD setting. Tools like VNC connection and pause/resume scripts optimize Bhyve operations, simplifying VM management.
Vim Registers: The Good, the Bad, and the Ugly Parts (2013)
Registers in Vim offer versatility for macros and data storage. Drawbacks include incomplete clipboard history and confusing terminology. Author suggests improvements for a more efficient workflow, acknowledging Vim's usefulness.
My .gitconfig File Dissected
The article delves into .gitconfig file breakdown, covering user details, GPG key signing, Git aliases, and workflow optimization tips. Encourages readers to customize their .gitconfig for enhanced Git usage.
A dev's thoughts on developer productivity (2022)
The article delves into developer productivity, emphasizing understanding code creation, "developer hertz" for iteration frequency, flow state impact, team dynamics, and scaling challenges. It advocates for nuanced productivity approaches valuing creativity.
vim.keymap.set('n', '\\.', ':tabedit %:p:h<CR>')
My leader is \, so when I press \. it will open netrw in a new tab in the directory containing the file whose buffer I was just editing. I use this all the time when I need to navigate source trees as I don't care much for fuzzy file finders. Credit to -romainl- who taught me about %:p:h.Genuine question for the author - have you configured Vim this way in order to be more productive or because you enjoy customizing it? I don't mean for that to be antagonistic, people build and customize muscle cars to show off even though they're slower than Teslas.
It's wild to see the community around recreating VSCode in the terminal (Astro Nvim, NvChad, etc.) I guess if I had to customize Vim so much for it to be a usable solution I'd just go back to using VSCode. After all, keyboard-action-speed is pretty much never the bottleneck when coding, thinking is.
I'd try to avoid using your mouse altogether; because it's faster and for me, avoids neck/shoulder strain.
Also, I'd recommend oil.nvim which is great for doing file exploration and manipulating. You can edit/move filenames naturally in a vim buffer, and then save to apply changes.
https://www.youtube.com/watch?v=zHTeCSVAFNY&list=PLsz00TDipI...
There is a separate playlist that shows how to smoothly integrate Tmux with Nvim so you can do things like Ctrl H/J/K/L between Neovim splits and Tmux splits seamlessly.
Very interesting! I want to write the test cases myself. When copilot writes some code that passes my tests, I think I can trust it.
If you don't even trust copilot to write your logic, how can you trust it to write the specification for how the logic should behave?
I'm thinking of leaving ignorecase off and mapping / to /\c so that it's clearly only applied to interactive searches, and can be disabled with just 2 backspace presses.
What's your take?
-- Ctrl + arrows resizing splits
vim.keymap.set('n', '<C-Up>', '<Cmd>resize +1<CR>') -- increase window size vertically
vim.keymap.set('n', '<C-Down>', '<Cmd>resize -1<CR>') -- decrease window size vertically
vim.keymap.set('n', '<C-Right>', '<Cmd>vertical resize +1<CR>') -- increase window size horizontally
vim.keymap.set('n', '<C-Left>', '<Cmd>vertical resize -1<CR>') -- decrease window size horizontally
Mason makes it very easy to install additional language support.
This, however, only works with software with good backward compatibility. Here is to nvim to be that kind of software.
Is this your own? Or just one you liked?
Some snippets simply have comments like "I use lazy.nvim to load plugins" and that's it.
A toolchain should also be discoverable and well documented.
A toolchain should also be complete:
- editing
- syntax highlighting
- syntax validation
- linting
- building
- testing
- profiling
- debugging
- searching
- documentation
- version control
Optionally also
- deploy
- inspect logs
You can do a lot of work and testing to these working correctly, install a "distribution", or you can simply use an IDE.
You can argue that you can do all these things with plugins, but plugins do not follow unified guidelines and the result can be an inconsistent experience like the Dwarf Fortress menus.
A TUI editor with many plugins installed isn't necessarily faster than an IDE. Languages like vimscript are interpreted, not compiled. And many implementations not always take advantage of multi-threading capabilities.
Among the distribution of TUI editor users, only a small subset of users can get their toolchain to be ergonomic, complete and work correctly. The rest just have a minimal experience that just gives them more work to do and that places a quality handicap on them.
How do you read profiler output in your TUI editor? or show test coverage? or run a specific test case in a test file and get a test report? 99.9% of the time the answer will be "Well, I haven't set that up yet...but look at this multiple cursor trick!". And the median skill level TUI editor user often hasn't even set up a linter or something like LSP integration.
What TUIs are excellent for, in my opinion, is to encourage an immersive experience that's distraction free. But now many IDEs have distraction free modes.
They can be good for customization (which can even result in customizations that make your work more difficult), although IDEs have SDKs that are not hard to use and many plugins are open source.
TUI editors are also more compatible with working on remote hosts.
Now, through customizations you could in theory create a universally superior development experience compared to what IDEs offer, but that is yet to be seen. Only in some aspects TUI plugins have achieved this level of excellence in specific areas, like Magit for emacs.
Related
Avoiding Emacs Bankruptcy
Avoid "Emacs bankruptcy" by choosing efficient packages, deleting unnecessary configurations, and focusing on Emacs's core benefits. Prioritize power-to-weight ratio to prevent slowdowns and maintenance issues. Regularly reassess for a streamlined setup.
FreeBSD Bhyve Companion Tools
The author details transitioning from VirtualBox to FreeBSD Bhyve, praising Bhyve's benefits in a FreeBSD setting. Tools like VNC connection and pause/resume scripts optimize Bhyve operations, simplifying VM management.
Vim Registers: The Good, the Bad, and the Ugly Parts (2013)
Registers in Vim offer versatility for macros and data storage. Drawbacks include incomplete clipboard history and confusing terminology. Author suggests improvements for a more efficient workflow, acknowledging Vim's usefulness.
My .gitconfig File Dissected
The article delves into .gitconfig file breakdown, covering user details, GPG key signing, Git aliases, and workflow optimization tips. Encourages readers to customize their .gitconfig for enhanced Git usage.
A dev's thoughts on developer productivity (2022)
The article delves into developer productivity, emphasizing understanding code creation, "developer hertz" for iteration frequency, flow state impact, team dynamics, and scaling challenges. It advocates for nuanced productivity approaches valuing creativity.