Normal Mode

@normalmode
222 Followers
58 Following
622 Posts
Don't Stop BelieVim
Websitehttps://normalmo.de
Conway’s Game of Life Vim Macrohttps://normalmo.de/vimlife/
Fibonacci Vim Macrohttps://normalmo.de/posts/recursive-macro/
Pluginshttps://normalmo.de/plugins/

One of the things I love about #Vim is how easy it is to add little bits of ad hoc personal customisation like this.

https://urusai.social/@negativeprimes/114802562768646512

NegativePrimes (@negativeprimes@urusai.social)

I wanted to edit some work files in Vim, but in doing so realized that Vim uses straight quotes and apostrophes instead of curly ones (which I needed given the constraints of this project). I added the following to vimrc to make this feasible (note that I have vimwiki installed, so Vim id'd the markdown file I was editing as a vw file): augroup vimrc_vimwiki au! au FileType vimwiki inoremap ' ’ au FileType vimwiki inoremap <leader>' ‘ au FileType vimwiki inoremap <leader>" “ au FileType vimwiki inoremap " ” augroup END Voila'! Typing a quote converts it to a closing curly quote; adding the Leader key makes it an opening curly quote! #vim #editing

URUSAI! Social

"why I got rid of all my neovim plugins"

https://yobibyte.github.io/vim.html

#vim #editor #programming

Vim Setup

Today I finally fixed a fragile piece of how I work which is how I refer back to emails relating to long-running tasks or just ones I might want to refer back to at some point.

Thanks to the Message-Id header in every email, #Thunderbird supporting a way to find and open messages by their ID (as well as a handy add-on for retrieving them), and some #Neovim magic, I can now link to emails in my work log files and get back to them incredibly quickly and easily.

https://blog.sgawolf.com/post/2025-07-05-email-links

Email Links

Like most people I struggle to manage emails. One of my bigger issues is that if I need to follow-up on an email or refer back to it I tend to leave it marked as unread or I occasionally flag it. However that gives me no context at all about the tasks involved or why I might need to refer to it and no ability to say when it needs to be dealt with. I know that there are services and some email clients which allow you to kind of manage this but I use Thunderbird on Linux when I’m at my desk and I’m not prepared to give a third-party service access to all of my emails. But I think I’ve finally fixed the problem and devised a way to handle things in a much better way and, whilst this is all very specific to my own setup and workflows, I thought it was still worth sharing. Message-Id All emails contain a header called Message-Id. This is a unique identifier which is assigned by the client application that sends the email or the first mail server to receive it. I use Thunderbird as my main email client and there is an add-on called Copy Message ID which allows you to click a button and copy the Message-Id onto the clipboard. I have configured it to add a prefix of mid: too. Within Thunderbird I can search for messages and I can customise how it works so it’s easy to add the “Message-Id” as an email header to search against. This makes it simple to find messages by their ID but it is also a bit manual and clunky. Open In Thunderbird… Thunderbird can be launched from the command-line and you can pass it a string with the prefix mid: and a Message-Id and Thunderbird will open the message for you. thunderbird "mid:010201ff6..." (this is why I have Copy Message ID add the mid: prefix) This can be made even more convenient by having my computer treat mid: as a custom URI so that I can create a link which will call the same command. This is achieved by creating a custom URI handler via xdg. For me this is a NixOS Home-Manager configuration change: xdg.mimeApps.defaultApplications = { "x-scheme-handler/mid" = "thunderbird.desktop"; }; This means that if I have a link on a web page which pointed to thunderbird "mid:010201ff6..." I could click on it and that email would be opened in Thunderbird. Putting It All Together I use text files to maintain a work log. These are simply a Markdown file for each month and I list things I need to do or remember in them. A very basic example would be: # July 2025 ## 2025-07-05 - [ ] Write up notes about email management. - [x] Send overdue invoice reminder to Acme Inc. - [x] Order more paperclips. ## 2025-07-06 - [x] Fix my buggy code. - [ ] Reply to John's email about the contract changes. ... The last item on the list would usually be accompanied by an unread email sitting in my inbox which I would need to find and then reply to at some point in the future. Now however I can add links to my emails in those notes: ## 2025-07-06 - [x] Fix my buggy code. - [ ] Reply to [John's email](mid:dfc8c...) about the contract changes. ... John’s email can be marked as read and filed in an appropriate folder and I don’t need to worry about it again. When I have done whatever work I need to do in order to complete this task I can just use the link to jump straight to the email and reply to it. Neovim I use Neovim for editing my notes and I have it configured so that markdown files have their conceallevel set to 2 so that the link URLs are hidden unless the line has the cursor on it. That takes care of keeping my notes easily readable. Neovim can open links when you press g and then x and because mid: is recognised as a URI on my computer Neovim can open my Message-Id links. You need to have the cursor somewhere within the link text for this to work and I am lazy so I have defined a keymap which saves me from worrying about where the cursor is: vim.keymap.set("n", "<leader>gx", function() vim.api.nvim_feedkeys("0f(gx", "t", false) end, { silent = tue, desc = "Open first link in line" }) Now, when I press the leader key and then g and then x the cursor moves to the start of the line, finds the first opening bracket and then ‘presses’ g and x for me. Essentially I can be anywhere on the line and the first link will be opened. And now, at last, I have a simple way to refer back to emails and more easily integrate them into my daily workflows. And if I move on from Thunderbird or stop using Neovim it is all customisable enough that I am not locked into anything in any way.

Simon Wolf's Blog

You can run doom on almost anything, including Neovim, with the right terminal: https://github.com/seandewar/actually-doom.nvim

#neovim

Share your cool vim tricks! I'm interested in learning more about cool core functionality that I'm probably missing out on (as opposed to elaborate scripting or plugin customization stuff).
I’ll rewrite my #Neovim status line because that’s who I am, and I wonder what do you think *should* be there. I think I’ll remove the line and column numbers and left only the buffer name, warnings, errors and window number

@rl_dane

Thank you for this wonderful tip

So it's

:match Conceal /^.*$/ :set conceallevel=3 :highlight Conceal NONE

When you're finished, just do

:match

#vim #VimMasterRace #BramMolenaar #Amiga #bash #sh #zsh #ksh #csh #tsh  #100DaysOfCode #POSIX #Programming

Normal people: Lol, she types gibberish.. that's funny.
Vim users: You know, with a macro you could have saved 0.3 seconds on editing that line.
#linux #developers #vim

A recent update to my qftools.vim plugin adds the ability to save and load quickfix windows to a file: https://github.com/andrewradev/qftools.vim#saving-and-loading

You can populate the quickfix window, prune it to whatever you need, and then save the curated results to a file to load later. There's also an "autosave" functionality that persists the latest quickfix automatically.

#vim #neovim

@aerique Good catch, that can be unintuitive. You could avoid this by changing `nrformats`, something like:

set nrformats+=unsigned

or,

set nrformats+=blank

The first one forces numbers to be recognized as unsigned ones for the purposes of Ctrl-A/Ctrl-X, The second one only does that if the - sign is not preceded by a blank space. https://vimhelp.org/options.txt.html#%27nrformats%27

Vim: options.txt

Vim help pages, always up-to-date