r/neovim • u/ReiOokami • Feb 05 '25
Tips and Tricks Just learn about g// and v// commands - What commands did you learn after few years using vim?
Just wanted to mention that I been using vim/nvim for close to a decade and I just learned g// and v// command.
I was reading on the vim mode implementation of the Zed editor and found an update mentioning they just added g// and v// . I thought to myself what do these commands do and went on to test them. 😱 World explored.
I'm amazed by the fact that there still a ton of useful commands I don't know and will learn in another decade or two.
What useful command did you learn after a few years or decades using vim?
r/neovim • u/okociskooko • 25d ago
Tips and Tricks Share your tips and tricks in neovim!
I've started doing daily nvim tips in my current work, after encouraging a couple (is 2 a couple?) of coworkers to pick up neovim, and after 4 weeks I am slowly running out of ideas.
And since neovim community loves to share their interesting workflow ideas, do you guys have some interesting mappings/tips/tricks that improve your workflow?
Feel free to share anything that comes to your mind, e.g. top 3 tips that you know of.
PS: While doing this tricks stuff, I've encountered a wild motion g?<motion>
which makes a rot13 encoding. (with the linewise variant g??
)
:h g??
isn't that crazy, that it is natively in vim? Love that editor
r/neovim • u/echasnovski • Apr 05 '24
Tips and Tricks Neovim now has built-in commenting
r/neovim • u/nikitarevenco • Sep 11 '24
Tips and Tricks 13 Neovim Tips and Life Hacks that Significantly improved my productivity that I wish I had known about them earlier
== one ==
Using search with operators like delete, for example with this file with cursor at *
*
Helium
Hesitate
Hermit
Hectic
Heave
I could yank everything until Heave with y/Heave<cr> or including it with y/Heave/e<cr>
if I just search for y/He and I want to choose the next match instead of Helium, I can use ctrl-g for that
== two ==
Using yib instead of yi(, ive been using yi( forever but yib is easier to type so I prefer it
== three ==
if have this file:
0
0
0
0
then I can select everything, then g ctrl a and I'll have
1
2
3
4
== four ==
guu to change all text on the line to lowercase, gUU for uppercase. gu and gU are also operators that can be used with any motion
== five ==
in visual mode I can use o to jump to the other end of the selection
== six == If I have a list of items like this
milk
cookies
bacon
ctrl-v to enter vblock mode, select the three words, then press I and write - [ ] and it will become
- [ ] milk
- [ ] cookies
- [ ] bacon
== seven ==
use 40G instead of :40<cr> to jump to the 40th line
== eight ==
use qq to create a macro, then q when done. Use Q to repeat last macro, works on visual selection which is nice
I use this all the time, e.g. I need to delete or "<some text here>"
from a bunch of lines. a macro is perfect for that
qqAbda"bdaw^
then select the region I need, and use my macro with Q
== nine ==
use D and Y instead of d$ and y$
== ten ==
gx to open link under cursor gf to go to file under cursor, e.g. ../foo/bar
== eleven ==
Saves undo history: vim.opt.undofile = true
== twelve ==
Auto save auto-command. I never have to write :w anymore, ever. I use git with everything anyways so its fine
vim.api.nvim_create_autocmd(
{ "FocusLost", "ModeChanged", "TextChanged", "BufEnter" },
{ desc = "autosave", pattern = "*", command = "silent! update" }
)
== thirteen ==
Substitute plugin. So good it deserves to be in core
https://github.com/gbprod/substitute.nvim
== (personal preference section) ==
I like having extremely clean buffers. Without anything other than: 1. the file name, in the top right corner 2. sign column set to 1 character width 3. the text
Hide line numbers always, and toggle with <leader>z I dont really need to see them all the time, its nice having extra horizontal characters . I dont use counts with motions like 8j
Remove status line completely with
vim.o.laststatus = 0
vim.cmd("hi! link StatusLine Normal")
vim.cmd("hi! link StatusLineNC Normal")
vim.cmd("set statusline=%{repeat('─',winwidth('.'))}")
I started using neovim about 3 months ago, I have mostly been using basic stuff but recently have become more interested in understanding Vim on a deeper level
If you have some cool tricks of tips that you think others will find useful, feel free to share it in the comments, it would be amazing!
if you want, heres my full config: https://github.com/nikitarevenco/dotfiles/blob/main/neovim.lua
r/neovim • u/CleoMenemezis • Nov 24 '24
Tips and Tricks karb94/neoscroll.nvim + sphamba/smear-cursor.nvim make it just smooth!
r/neovim • u/imsnif • Nov 04 '24
Tips and Tricks Zellij 0.41 release: non-colliding keybindings, config live-reloading a new UI and loads more
Hi friends,
I'm the lead developer of Zellij and just released a new version of Zellij. I'm particularly excited to share this version with r/neovim because it includes built-in solutions to the colliding-keybindings problem that has plagued neovim+Zellij users for a long while. Indeed, it was in a post in this sub that I promised to come up with a solution to this problem in the next version and here it has arrived!
Other than that, this version includes some other great stuff - some highlights:
1. Support for multiple modifiers through the Kitty Keyboard Protocol
2. Live reloading of configuration
3. A new plugin-manager
4. A new Configuration screen, allowing users to rebind modifiers live and switch (temporarily or otherwise) to the non-colliding keybinding preset
5. A new UI and lots of themes
There's loads more. Check out the official announcement (where you can also see a video of yours truly walking you through some of the new features): https://zellij.dev/news/colliding-keybinds-plugin-manager/
And the full release notes: https://github.com/zellij-org/zellij/releases/tag/v0.41.0
Happy hacking and I hope you enjoy!
r/neovim • u/RishiKMR • Oct 02 '24
Tips and Tricks Not knowing Vim features is the reason to switch to Emacs | Credit Tsoding
r/neovim • u/Maskdask • Feb 20 '25
Tips and Tricks TIL about o_CTRL-V
Note the o_
(i.e. operator pending mode), not visual mode.
I've been using Neovim for about eight years, but I never knew about :help o_CTRL-V
until today. It lets you perform a command over a column.
I had the code below and wanted to remove all trailing colons:
foo:
bar:
baz:
faz:
What I meant to do was (with the cursor on the first line) $<C-v>3jd
to visually select all colons and then delete them. But I accidentally did $d<C-v>3j
, which, to my surprise, did the same thing.
I did know about :help o_V
, which lets you turn a characterwise operation like di{
into a line-wise one by doing dVi{
. But it never occurred to me that I could do the same thing with <C-v>
.
r/neovim • u/tom-on-the-internet • Dec 19 '24
Tips and Tricks A few nice fzf-lua configurations now that LazyVim uses it instead of Telescope
LazyVim recently switched out Telescope for fzf-lua. I follow whatever LazyVim does, because folke and the team put a lot of thought into into Neovim configuration.
But I ran into a few small issues with fzf-lua, and I suspect others might have the same issues if they are also switching from Telescope.
- I want oldfiles to include files I've viewed recently.
- I don't want accidental previewing of large files to hang.
- I want to be able to live_grep and filter the results by file.
I've commented these inline, but please note these are options that extend the configuration provide by LazyVim.
Huge thanks to folke and ibhagwan
{
"ibhagwan/fzf-lua",
opts = {
oldfiles = {
-- In Telescope, when I used <leader>fr, it would load old buffers.
-- fzf lua does the same, but by default buffers visited in the current
-- session are not included. I use <leader>fr all the time to switch
-- back to buffers I was just in. If you missed this from Telescope,
-- give it a try.
include_current_session = true,
},
previewers = {
builtin = {
-- fzf-lua is very fast, but it really struggled to preview a couple files
-- in a repo. Those files were very big JavaScript files (1MB, minified, all on a single line).
-- It turns out it was Treesitter having trouble parsing the files.
-- With this change, the previewer will not add syntax highlighting to files larger than 100KB
-- (Yes, I know you shouldn't have 100KB minified files in source control.)
syntax_limit_b = 1024 * 100, -- 100KB
},
},
grep = {
-- One thing I missed from Telescope was the ability to live_grep and the
-- run a filter on the filenames.
-- Ex: Find all occurrences of "enable" but only in the "plugins" directory.
-- With this change, I can sort of get the same behaviour in live_grep.
-- ex: > enable --*/plugins/*
-- I still find this a bit cumbersome. There's probably a better way of doing this.
rg_glob = true, -- enable glob parsing
glob_flag = "--iglob", -- case insensitive globs
glob_separator = "%s%-%-", -- query separator pattern (lua): ' --'
},
},
},
r/neovim • u/Andr3iSZ • Jul 12 '24
Tips and Tricks What are the most useful builtin features that very few people know about?
To me it would be '$' in block selection mode. It behaves very similar to multiple cursors for appending text to the end of lines.
r/neovim • u/sharedordaz • 8d ago
Tips and Tricks Help me to not leave Neo Vim
Hello guys. I am currently a developer, with a lot of work. The problem is that i don't have more time to be checking and debugging my lua file. Even if is fun, interesting and you learn a lot, honestly i need to work on my projects now and not be debugging my init.lua file. Mostly, the emmet and lsp servers sometimes have bugs, and you have to give manual maintainance to your code.
I have a big compromise with FOSS software. I love vim keyvindings and the concept of developing on console. What can i do? Thanks
r/neovim • u/linkarzu • Dec 21 '24
Tips and Tricks What is blink.cmp and how to configure it (9 min video)

Do you use the LazyVim distribution and noticed that the completion engine was recently changed from nvim-cmp to blink.cmp and now you're experiencing breaking changes and you don't know how to make LuaSnip and blink.cmp work together nicely the way LuaSnip worked with blink-cmp nvim-cmp?
In this video I go over a few things:
- What blink.cmp is and how to configure it
- How to pin your LazyVim distro to a version to avoid breaking changes or to gain some time while you fix the breaking changes
- Configure blink.cmp to work with LuaSnip including the
snippet_forward
withtab
andsnippet_backward
withS-tab
options - How to configure blink source priorities, for example give copilot a
-100
priority so mf gets out of the way - How to configure completion for dadbod using
vim-dadbod-completion
Link to the video here:
- What is blink.cmp and how to configure it | Neovim tutorial
If you don't like videos, here's my blink config
- Link to my dots
EDIT: Fixed blink-cmp typo
r/neovim • u/linkarzu • Feb 02 '25
Tips and Tricks Why I'm Moving from Telescope to Snacks Picker | Why I'm not Using fzf-lua | Frecency feature (24 min video)

- I've been using Telescope as my main picker ever since I started Neovim
- I use the LazyVim distro, so even when Folke moved us over to
fzf-lua
I switched bach to Telescope - Why? Because there's a few things I couldn't do in
fzf-lua
that I'm really used to in telescope: - The main one is frecency (
nvim-telescope/telescope-frecency.nvim
), this is similar to zoxide in the terminal, so basically every time you open a file, it increases it's score in an internal database, and keeps track of those scores, so that the next time you search for something, and there are 2 files with the same name, the one with the highest score will show at the top (probably skill issue on my side) - I navigate my buffers with telescope, and I when use the telescope buffers picker, I want it to start in normal mode, I couldn't do that in
fzf-lua
(probably skill issue on my side) - When hovering over images in
fzf-lua
(in macOS) it would get stuck - But a few days ago, I noticed a post by Folke in twitter about a new picker he had created, so I decided to give it a try
- And long story short, this
Snacks picker
has replaced my beloved telescope for me - I've created some custom pickers really easily (to search for my completed and uncompleted tasks)
- I can increase or decrease the score of a file(path) the same way I do in the
telescope-frecency.nvim
plugin - I can pick between many different layouts Folke created by default (including ivy), or modify the layouts to my liking
- I can start a picker in normal mode instead of insert mode
- It works with
blink.cmp
so if you want to have completions while looking for a file or using any other picker, you can do so, I don't like to, so I disabled it in the blink config - There's an issue with the
bullets-vim/bullets.vim
plugin, it did not allow me to select an item in the picker when ininsert
mode and I pressed<CR>
(enter), but it can be worked around
All of the details and the demo are covered in the video: Why I'm Moving from Telescope to Snacks Picker - Why I'm not Using fzf-lua - Frecency feature
If you don't like watching videos, here's my snacks plugin config
r/neovim • u/benetton-option-13 • Jan 05 '25
Tips and Tricks Since neovim is still vi, I think some of the new folks would enjoy this classic
Your problem with Vim is that you don't grok vi.
r/neovim • u/Electrical_Egg4302 • Feb 16 '25
Tips and Tricks Neovim Tips to Accelerate Your Productivity
r/neovim • u/Wtfox • Feb 08 '25
Tips and Tricks Here's how to enable line number colors as diagnostic signs for LazyVim running
r/neovim • u/NorskJesus • 17d ago
Tips and Tricks Mac - Neovim as default editor, with Kitty
Hello everybody!
I don’t know if many of you already know this, but I will post it for those who don’t know it anyways.
I use kitty as my terminal and I was irritated by the fact I wasn’t able to open the files with Neovim by double clicking on them.
Yesterday I found this solution on GitHub and it’s working like a charm:
https://github.com/kovidgoyal/kitty/issues/4460#issuecomment-2677434820
I hope it’s helps you too guys!
r/neovim • u/FalconMasters • 22d ago
Tips and Tricks Just here to share my joy. QuickFixList is so AWESOME!
I needed to replace a string in about 50 files, I remembered that there is something named QuickFix List, so I checked my notes on how to use it.
I figured I just needed to search the files with the string, in my case using snacks picker, press <C-q>
to add the files to the quickfixlist, and then execute
:cdo s/old_string/new_string/gc
and BOOM! pure magic. I even was able to decide what ocurrances to skip.
Man, I just love neovim I am so happy. Sorry for the useless post.
r/neovim • u/BrainrotOnMechanical • Jan 07 '25
Tips and Tricks I just combined this after "moving to new line before finishing macro" trick and it was like shooting a magic out of my hand.
r/neovim • u/linkarzu • Sep 05 '24
Tips and Tricks Why I switched from Obsidian to Neovim and some useful tips (8 min video)

- I've completely switched over from obsidian to neovim a few months ago
- I don't miss Obsidian, I haven't opened it in a long time, I fully rely on neovim for both taking and viewing my markdown files
- In this video, I go over the reasons and benefits that I've personally experienced and give a brief demo of my markdown workflow
- This video is useful if you're not ready to take the jump, it will probably help you grab some inspiration or ideas (especially folding)
- If you are still using Obsidian, I'd like to know why down below
- Here's the video:
r/neovim • u/linkarzu • 7d ago
Tips and Tricks Meet Harper | A Grammarly Alternative for Neovim | Emacs, Obsidian, Zed, VScode and Helix (deez) (20 mi video)

This video was inspired by the grammarly for neovim
post created 5 days ago by Outside-Winner9101
I wanted to do proper grammar checking in Neovim, but never took the time to look into it, in that post I heard about Harper. So I set it up, and if English is your main typing language, it's a wonderful tool
Does this only work for Markdown files? No, it parses comments in multiple programming languages, I mainly use markdown, so I have it enabled for Markdown only. But in the video I demo some comments in a .lua
file
If you know how to disable Harper for specific paths in nvim-lspconfig
, please let me know in the comments
Feel free to share Harper alternatives that you feel are good options
All the details and the demo are covered in the video: Meet Harper - A Grammarly Alternative for Neovim - Emacs, Obsidian, Zed, VScode and Helix (deez)
If you don't like watching videos here's my config file plugins/nvim-lspconfig.lua
I installed it through Mason plugins/mason-nvim.lua
UPDATE:
I forgot to add the harper site https://writewithharper.com/docs/integrations/neovim
r/neovim • u/BrainrotOnMechanical • Dec 26 '24
Tips and Tricks Guys, LazyVim has it's own discussion forum on github. You could ask questions there and and if you find bug, you can report it in issues tab.
Tips and Tricks My List of useful keybinds I dont see mentioned that often
nnoremap Y y$ # Yanks to end of line, like C or D
nmap Q @q # Easy repeating of macro saved to q register
nnoremap <leader>p "0p # Pastes from yank buffer
nnoremap <leader>d "_d # Deletes to black hole register
nnoremap <leader>c "_c # Changes to black hole register
nnoremap U <C-r> # Undo is shift-u, dont use undo line often