r_vim
64 subscribers
1.26K photos
65 videos
1 file
19.7K links
Download Telegram
10+ year user, learned today how to easy swap two selected sections

This is so simple I feel dumb for not seeing it earlier.

1) visual mode select one part of text then d for delete

2) visual mode select the text you want it to replace then p for paste

3) go back to the original location and hit p for paste


that's it. Deleting the text places it in the register so you have it available in step 2. Replacing the text places it into the register, so you have it available in step 3.

For a decade plus I was adding extra steps like hitting Y or trying to avoid deleting the text so I have it available after I added the other, etc.

How many hours have I lost to not knowing this simple trick

https://redd.it/1um0mu6
@r_vim
Vim for Verilog, System Verilog and UVM

Please suggest nice Plugins/Workflow for Verilog, System Verilog and UVM, which offer rich functionality(Like C, C++ plugins do).

https://redd.it/1un5oil
@r_vim
Monthly Thread: Tools with Vim-like Keybindings

We regularly remove standalone posts about tools that use vim-inspired keybindings. There are too many of them, and individually they dilute the subreddit.
But the content is valuable, and many of you want to know about these tools.

So here's the place for it.

Share any tool that uses vim-like keybindings, whether it's a browser extension, terminal emulator, IDE plugin, note-taking app, PDF reader, or anything else. If it has hjkl navigation, modal editing, or vim-inspired controls, it belongs here.

For each tool you share, try to include:
- What it is and what problem it solves
- Which vim features it supports (navigation, modal editing, text objects, etc.)
- A link to the project

This thread is posted monthly. If you find something mid-month, save it for here rather than posting a standalone thread (which will be removed).

https://redd.it/1uqcnh1
@r_vim
Inline error diagnostic tool for vim 9.0+

https://github.com/Joekrry/vimline-errors

Hi all, I have built a very well known tool for native vim 9.0+ based on the style of this neovim tool https://github.com/rachartier/tiny-inline-diagnostic.nvim .

Obviously in line error checks have existed for years but I haven't been able to find a tool that has this style for native vim. Please let me know if it does exist. If not, please consider starring or contributing as I am only a student and should really be focussing on my dissertation lol



https://redd.it/1usn25d
@r_vim
The vim way to mail

Yet another vim mail client:

https://github.com/cirnovsky/vim-mail

The most distinctive feature of this mail client is text buffer-based mailboxes. Meaning, you can do things like :g/Title/d to delete mails with Title in the title).

I know, it looks like himalaya reinvented, but I believe some people would love the fact(s) that

0. Inbox is nothing beyond a text buffer. dd to delete, s to mark read, :w to commit, u to undo.

1. We're shipped with mail threading!
2. The keybinding is close to native vim! Built for muscle-memory vimmers.
3. It's so lightweight, driven only by a few python scripts.
4. Foward-as-attachment is made easy.
5. The way we handle inline images and attachments (check it out ➡️ in the repo)
6. We're responsive! :)

So, give it a shot! I'm trying to make todos ticked asap. I'm personally enjoying this plugin, it covers most of my use cases already. I'd love to see people's reaction as it helps me improve this plugin!


I'd really really appreciate any forms of feedback!!!!!


If you'd like to email me, my address is pup at guanyu dot com. I will read every email and try to reply, in, of course, vim-mail :)

https://redd.it/1usrvwh
@r_vim
vim-ai VS denseanalysis Neural: which one?

I am getting modern, and I decided to use AI tools from Vim.
However, I only found these two plugins. Any experience?

https://redd.it/1uvhbdv
@r_vim
when vim session is restored, u (redo) and c-r (redo) don't work

hello. After restoring my session (ie: vim -S session file), in the buffer :undo works, but not u. Likewise for :redo versus c-r. I asked chat gpt, claude and grok why this might happen and they have mostly wasted my time. One of them speculated that tim pope's vim-repeat plugin is the cause. I've created the session anew and confirmed that the problem reappears, eventually. I've removed the following lines from the session file but they will simply reappear:

nmap U <Plug>(RepeatUndoLine)

nmap u <Plug>(RepeatUndo)

nmap <C-R> <Plug>(RepeatRedo)

i assume these are causing the problem and maybe they are coming from vim-repeat
thanks for any thoughts

https://redd.it/1uvklq7
@r_vim
What is missing in Vim compared to Neovim?

In my opinion:

1. Tools for helping scripts/plugin development. Lua has LSP, linters, etc. Vim9 has... nothing. It seems to be back to the beginning of the 90:s when it comes to develop in Vim9 language, in-spite it is very nice.

2. A Native Vim9 DAP. There is vim-spector but that is mostly Python,

3. Plugins: for example, I got copilot from work and the Vim9 and Neovim copilot-chat plugin are not even comparable,


What else?

https://redd.it/1uvha3g
@r_vim
Does a plugin like this exist?

Hi, sry first time poster, hope its ok to just ask my question like this.

Question:

Is there a plugin for vim that can replace/ shows the code behinde for a function so I can follow the code flow better.

Why:

I have the task to maintain some legacy codebase, some written in python some written in c#, but its a lot of spagetti code. I know i can jump to the definition, but this gets confusing really fast. So I want to read it top to bottom, a option to hide states for if statements would be nice. Loops should stay the way they are.

Any hint for direction would be nice, thanks for reading.

https://redd.it/1uwbzik
@r_vim
What's one Vim command you use every day that beginners almost never know about?

I'm trying to move beyond the basics and really learn the parts of Vim that make experienced users so fast.

What's one command, motion, text object, register, macro, or workflow that's become second nature for you but rarely gets mentioned in beginner tutorials?

Bonus points if it's something you now use multiple times a day.

https://redd.it/1uxcrpx
@r_vim
Musings on Vim from an Emacs luser

I've used mostly vanilla Emacs for about a decade. I'm thinking about switching to Vim because the values that made me appreciate Emacs have changed.

What I loved about Emacs is that it's essentially a Lisp machine packaged as an application, which makes Emacs a legitimate target platform. The primitives provided by Emacs are probably better-suited to extensions than those provided by Vim. But over time, I've come to two conclusions:

First, the editor-with-extension-language paradigm is outdated. Plan 9's Acme editor showed that an editor need not impose a particular language on its users. It can instead expose a language-agnostic API via a filesystem (or socket), thereby permitting any program in any language whatsoever to extend the editor. This is, in my opinion, the way forward.

Second, I want to use my operating system. I don't want to use Emacs replacements for what my operating system or supporting software already provide. It is silly for there to be a 'man' mode for man pages when the 'man' program works better. I want all of the tools I use to make the fullest use of the hardware and OS. That is simply not possible with Emacs.

Obviously, none of these complaints point to Vim as a solution. I would, in fact, use Acme as my daily editor, but for my mode of working, accessing remote systems on a slow network connection, neither a graphical editor nor mounting a remote filesystem are options, so using some editor in tmux is my best option, and for that reason, for now, Vim may be the more performant option.

https://redd.it/1uzcl5i
@r_vim
TIL @: repeats the last command and @@ repeats the last macro.

Holy cramole!

Where has this been all my life? I found out about these macros while doing a bit of coding that involved a lot of running things like :w | foo ./%. After typing : followed by up a zillion times, I realized that there had to be a better way. A quick Google and I was enlightened.

If this is a TIL for you, lemme know. If you have another lovely tip or trick, please share too.

https://redd.it/1uzuidc
@r_vim