Sometimes, all you need is a little terminal tool to be happy.
🌀 **regname** — Mass rename files.
💯 That's it... it does what it says.
🦀 Written in Rust & built with @ratatui_rs
⭐ GitHub: https://github.com/linkdd/regname
#rustlang #ratatui #tui #files #terminal #commandline #rename #productivity
ANWB meldt drukste spits van het jaar
https://www.transport-online.nl/81861/anwb-meldt-drukste-spits-van-het-jaar/ #ANWB #avondspits #files
Bash scripting 18 – Using data files 4
https://personaljournal.ca/paulsutton/bash-scripting-18-using-data-files-4
nvim: The Missing Manual for NeoVim v0.9 2025-03-31
Neovim has become such a rich product that even though it is a very fast command-line tool (unlike VS Code), I still use it extensively because you don't need a mouse. You can do all this in VS Code, but if you want to be that Ferrari 1960s vintage driver with no assist at all, read on. (Before we are off using warp, cline, cursor or windsurf), I thought I would see what is going on.
LazyVim as an easy entry point
Until last year, I was completely a vim fan and had a huge vimscript catalog and some nice tools that worked, but given the complexity of the environment and that the speed (or lack thereof) of vim with all the plugins moving to Neovim was smart. And Lazyvim is a bundler on top that gives you all kinds of opinionated plugins.
The main things to understand are the commands:
:LazyExtras - Gives you all the extra tools:Lazy - Where you do updates and installations:LazyHealth - To make sure it's all installed correctly
Obscure Bugs Importing Lazyvi.plugin.extras
The most significant different between vim and neovim is the use of lua scripting, where you get a massive set of scripts that you can run. The system is a little strange, but basically,y in your ~/.config/nvim You get config and plugins and a calling system.
OK, this is an obscure one. I started getting this very strange error:
The order of your `lazy.nvim` imports is incorrect:- `lazyvim.plugins` should be first- followed by any `lazyvim.plugins.extras`- and finally your own `plugins`
Looking at the code, it was added February 8 but it is because now if you add plugin extras imports into your own plugins files this can cause bugs.
Instead, you should manage the extras with :LazyExtras
and it will put them in the JSON configuration called config.json
instead of the configuration in lua.
So this led me to wonder what I should do with the 80+ plugins that are there. I think that things are changing, so here's a quick list of the plugins and how to use them.
Finding Keymaps
There are literally so many keystroke commands that they are impossible to find. The Keymaps section is really the best resource because many of the keys on LazyVim are changed compared with the underlying plugin defaults. Note that the default for <leader>
in LazyVim is the <space>
bar, but I change this to \
because I like to use space to just move to the next character. Old habits
The default or core plugins
It's a good idea to first figure out the many default plugins that LazyVim uses and evaluate them to see what needs a change. Many of these are part of large libraries
They categorized them into different categories:
Coding plugins
These help when you are writing software:
(
will mean )
will flashan
mean around next, in
is insidde-next and al
and il
is around and inside last and g[(
and g])
which means finr the next ( and ) means more to the next objectColorscheme
This loads gruvbox and tokyo night color schemes with :colorscheme gruvbox
and :colorscheme tokyonight
and :colorscheme catppuccin
Editor plugins
These are for editing
\sr
f
and t
motions and integrates with Treesitter. with `f{char} just hit f again to go to next for F to previous same with t multiple times or T to reverse. Integrates with Tressite as well (see the Treesitter section)leader
then it will show all the available commands next.Gitsigns
with change and delete like Gitsigns previe
w_hunk or \ghs
to stage or \ghr
to unstage to see a set of code about to be committed. Or, Gitsigns blame
or `\hbto see on the left tile who committed each line and ]
and [h
to move forward to each changed line. Note that LazyVim changes the default keymaps which you can see in the Full Spec section in LazyVim. Formatting and Linting with LSPs
These are mainly about "conform" for formatting, nvim-lint to check for static errors. Then the tools mason to load and unload the right plugins and lsp-config to change the keymaps of those LSPs. The specific configuration is handled by Mason thank goodness:
\cF
to format and uses LSP plugins to do the real work. You can set the formatters in the lua plugin config.:Mason
or \cm
and can install a Language Server Protocol or a DAP (for running code).vim.diagnostic
. You need to set linters for each language in the ./lua/plugins entry.]d
and [d
to navigate from error to error. Syntax highlighting based on AST
This is the way that you can navigate "logically". Not just by lines but by things like paragraphs, or code blocks and also highlight correctly
TSInstall <language>
and this is handle by LazyVim automatically and adds ]f
and [f
to move from one function to another. While [F
and ]F
get you to the bottom of a function.ip
or ap
to get inside a paragraph and around oneUser Interface
Vanilla vi
was incredible terse, this is how you get it filled with icons 🙂
]b
and [b
to move back and forth. And adds a bunch more like [B
and ]B
to a host of \b
commands to close buffers the current, the left or right of the current tab/buffer, all other buffers with \bd
, \bl
, \br
and \bo
.\snl
to find the last message, snh
for previous, \sna
for all messages, \snd
to dismiss a messages and snt
to pick a message.\un
to hide notifications from snacks. or see them with \n
. This also provides the title screen if no file is openedUtilities
These are more helpers:
C-h
, C-j
, C-k
and C-l
to go to next windows so better than the cumbersone C-W
commands. Also \.
to go to the scratch or temporary buffer to copy things into and \S
to find all your scratch buffers. These are sort of like registers but visible\qs
loads a sesisson, \qS
select one, ql
loads the last sessions and qd
deletes sessions. It automagically remembers all the previous times you've opened nvim!LazyVim Extras Recommended
These are the many extras that it is blinding, but to go over the ones that are recommended first so you can think as the minimum recommends set including the pre-installed ones above.
:MarkdownPreview
or \cp
and render-markdown.nvim which renders headings and code blocks with coloring that looks very nice. And add to conform.nvim a markdown-toc format when it finds <!%-%- toc %-%->
in the document and it runs markdownlint-cli2 as well with nvim-lint.[y
and ]y
to go through it. And a bunch of \p
commands to look at history. [p
and ]p
does the same thing for puttingC-a
to increament and C-x
to decrement and g<C-a>
or g<C-x>
\cr
for code rename (which doesn't seem to work).\e
or in the current working directory with \E
\snt
but provides conveniences like \<space>
or \ff
which is like \e
for Find files at the root, \,
for buffers, \/
for grep[ing the root directory. The difference is the \ff
has fuzzy search while \e
is just a direcotry tree, then there is \g
for searching git status, \s
for search registers, search, autocmds, etc. And then \uC
for color schemes.\t
is for testing, \tr
to run a test and \tl
runs the last test. And \td
uses nvim-dap to debug it after running the tests.LazyExtras Useful
There are so many plugins its almost impossible to figure out what is compatible or incompatible with what, but some useful ones are:
AI Plugins
There are five different (yikes!) plugins that you can use, so here's a quick review of how the dependencies work. I had been using Code Companion for a long time, but it is time to look again:
coding.blink
is the new default and coding.nvim-cmp
is now no longer selected. I've used this for a long time since it is free, but they've moved on to Windsurf and are not adding big features to it.tiktoken_core
, git
, ripgrep
, lynx
. And will integrate with the many pickers: fzf-lua
, telescope
, snacks.picker
, mini.pick
. The key mappings include <Tab>
for completions, <C-c>
to close the window, <C-l>
reset the chat window, <C-s>
submit prompt, grr
sticky prompt, <C-y>
accept nearest diff, gj
jump to nearest diff, gqa
Add from chat to quixfix list, gqd
add all diffs to list, gy
yank nearest diff to register, gd
show diff, gi
current chat info, gc
Show current chat. Here are the predefined prompt templates, Explain
selected code, Review
selected code, Fix
rewrite code, Optimize
code, Docs
document in comments, Tests
generate, Commit
messages written. Use :CopilotChatModels
to change the model, :CopilotChatAgents
of which there are a huge number. There seems to be quite a few hard coded modelThe confusing that is Copilot Chat
Of these, Copilot Chat seems the richest, but it's confusing how to change models. With Code Companion, you had to set up something in your lua script to get different models, but here you get a prebaked lis,t and it is not clear how they are called. One confusing thing is that you have to run :CopilotChat once to get it to load as it is lazy loaded.
They have a collection of model providers (and you can add your own with your lua setup). If you use the ollama model, then you get all models that are currently running, but note that you don't get the things behind the colon, so only models with the latest tag, I think.
One thing that is not clear is that out of the box, it only supports
Additional providers. You have to create a $XDGCONFIG/nvim/lua/plugins/copilotcompanion.lua
to add these
The command lines are in two places, the LazyVim configuration and assuming your Leader key is the default backslash. There are also default key mappings in the plugin itself. One of the nice things about default LazyVim is that if you type a partial key like just Leader, it will show you all the available commands, so you don't have to memorize all this (at least not immediately):
# From LazyVim<leader>aa - This opens and closes the Copilot Chat window that is to the right of your code<leader>ax - This resets Copilot Chat<leader>aq - Quick Chat<leader>ap - Select the preprogrammed prompt you want# Defaults from plugin when chat is open, so for insert and normal<Tab> - Trigger or accept completion<C-c> or q - Close chat<C-l> - Clear all the chats<C-s> or <CR> - Submit prompt to modelgrr - Sticky prompt for the line under the cursovegrx - clear all sticky prompts<C-y> - Accept nearest diffgj - Jump to nearest diffgqa - add all answers from chat to quickfix listgqd - Add all diffs from chat to quickfixgy - Yank diff to registergd - Show current diff from sourcegi - info on current chatgc - context of current chatgh - Help# There are predefined prompts you can use in the chat window/Explain - explain the code/Review - review the selected code in buffer/Fix - Fix the bugs/Optimize - optimize for readability/Docs - Add comments/Tests - Test Generation/Commit - Write commit message with commitizen format# Sticky prompts work across chat sessions and are set like this> #files> List all files# Insert parts of what you are editing into the context#buffer:2 - Insert buffer number 2#buffers - Insert all buffers#files:\*.lua - insert all files ending with .lua#file:foo.py - insert foo.py#filenames - all files you are editing#git - the git diff#url:https://tne.ai - insert a web page#register:a - insert register a contents#quickfix - all the files being fixed#system:ls - run a system command and return output# To set up the model for the chat, just hit $ to get a list$gemma3:70b# to run an agent just go to https://github.com/marketplace?type=apps&copilot_app=true# then choose Add and it will appear when hit the @ sign@perplexity
To add the other providers, you need to edit that magic file. See the section on Code Companion coming up, but here are some samples from Jellydn, but basically if you just want to take the defaults and add providers, it's pretty simple because LazyVim just adds what you put in your plugin into the defaults, so you can add Ollama. Note that the current documentation has an extra set of braces, so remove those and then you set the model in the function for the default
return { "CopilotC-Nvim/CopilotChat.nvim", opts = function() return { model = "deepseek-r1:70b", providers = { -- insert provider code here ollama = {}, mistral = {...}, openrouter = {...} }, } end,}
You do need to replace the picker with something fancier.
#buffer #buffers #file #filenames #files #git #quickfix #Register #system #Url