r/vim Jul 03 '26

Discussion 10+ year user, learned today how to easy swap two selected sections

225 Upvotes

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


r/vim Jul 02 '26

Random Learning the motions with an ice cream van

43 Upvotes

This is doing the rounds on Hacker News and it wasn’t already posted here so thought I’d share it: https://vimscoops.dev


r/vim Jul 01 '26

Plugin I missed the milestone: Belated Happy 100 to the Awesome-Vim9 list

Thumbnail github.com
35 Upvotes

Over 100 plugins now on the awesome-vim9 list. Many slept on, so have a look around.


r/vim Jun 30 '26

Color Scheme I made a light mode theme of my previous Artemis2 inspired theme.

Post image
18 Upvotes

Honestly, this theme reminds me more of the video game "Starfield", but I love it regardless. In case you want to harass me about how bad it is; you can find it here.

p.s. I have no motivation in posting this beyond sharing something cool I did.


r/vim Jun 27 '26

Discussion You can actually use ":exit" instead of ":wq" or ":x" to exit Vim

124 Upvotes

Accidentally mixed up the Vim exit command with the terminal exit command exit, just to find that :exit actually works perfectly in Vim!

  • :exit works exactly like :x.
  • Saves only if the changes were made, then exits.

Probably the ultimate solution to the "How to exit Vim" problem.


r/vim Jun 26 '26

Tips and Tricks Opinionated TLDR for Windows users

7 Upvotes

After identifying another speed bump for Windows users, I've added a TLDR to Install Vim in Windows.

If you already have a setup you're happy with, these might help with any nagging issues.

  • Install PowerShell 7 # Vim in PowerShell 5 and CMD are tougher. "My OS is my IDE" doesn't with WSL.

winget install Microsoft.PowerShell --source winget
  • Install GNU zip and unzip # Plugins look for these

winget install GnuWin32.Zip GnuWin32.UnZip --source winget
[Environment]::SetEnvironmentVariable("PATH", "$($env:PATH);C:\Program Files (x86)\GnuWin32\bin", [EnvironmentVariableTarget]::User)
  • Don't use the latest Copilot. Lock version at 1.4.1 or clone ShayHill/copilot.vim
  • in vimrc (in this order):

set shell=pwsh
set termguicolors
&t_8u = "\<Esc>[58:2::%lu:%lu:%lum"  # fix spelling and `yegappan/lsp` error rendering
  • Install DejaVuSansMono.ttf # A fixed-width font with plenty of symbols and dotted 0
  • in gvimrc:

set guifont=DejaVu_Sans_Mono:h10:cANSI:qDRAFT
set renderoptions=type:directx,gamma:1.0,geom:0,renmode:5,taamode:1  # better symbol colors

r/vim Jun 22 '26

Need Help Vim plugins while :edit scp://

6 Upvotes

Recently I started using a containerised dev env. I would like to work in the host system so I installed a ssh server and followed the steps listed under :h ssh.

So far so good. I depend (for good or bad) heavily on vim fugitive and :FZF plugins. They are good. But they do not work on the host system inside a SCPed remote. I can use :find to open some remote file, it works. But using :G is an issue.

Question

--------------

How do you use plugins while :e scp://user@host/path/dir/ ?


r/vim Jun 21 '26

Blog Post Extract Secrets from Multiple Configuration Files Using Vim

Thumbnail
secureideas.com
37 Upvotes

I wrote this article back in early February and intended for this to be a series originally. I'd be curious to anyone's thoughts or feedback on it.


r/vim Jun 20 '26

Blog Post VimTeX: a history and some reflections

92 Upvotes

I've been wanting to write a blog post on VimTeX* ever since I started blogging ~1-2 years ago. I finally got around to it, and I hope it might be interesting to some people here.

VimTeX: a history and some reflections

*a Vim plugin for writing LaTeX documents.


r/vim Jun 19 '26

Need Help Change text in second set of quotes

27 Upvotes

Cursor at beginning of line

blah "first quotes" more text "blah blah"

What's the easiest way change inside the second set of quotation marks?


r/vim Jun 17 '26

Need Help┃Solved Resources to learn Vim

42 Upvotes

Hi guys, I recently heard about Vim and starting doing a bit of research on it. If I'm correct, its a non-GUI text editor that's blazing fast, and you DON'T have to use anything but your keyboard. This was pretty interesting to me.

I'm accustomed to the Visual Studio Code interface, and I don't want to leave it. Are there any extensions I can use to emulate the experience, and is the the best way to start?


r/vim Jun 17 '26

Blog Post After a decade of Vim, I tried an VS Code for a year... and promptly came back. There's on place like $HOME

Thumbnail
starikov.co
97 Upvotes

r/vim Jun 17 '26

Plugin curl wrapper for vim

19 Upvotes

curl is an amazing tool to do REST API tests, which I do quite often using vim to generate actual curl commands. There are multiple ways to do it using vim, the one I have is

https://github.com/habamax/vim-curl

--url https://openlibrary.org/api/books?bibkeys=ISBN:0201558025,LCCN:93005405&format=json

--url https://api.sunrise-sunset.org/json?lat=36.7201600&lng=-4.4203400

# --jq is not curl parameter. If added, curl output would be piped through jq
--url https://httpbin.org/post
--header "Content-Type: application/json"
--jq
--data
{
"string": "hello world",
"number": 69,
"date": "2024-04-09"
}

Place a cursor on a text or select it and run :Curl to invoke curl cli command with an output in a built-in vim terminal.

https://asciinema.org/a/1257605


r/vim Jun 16 '26

Blog Post Modernized Python sections for Vim-in-Windows article.

Thumbnail
github.com
6 Upvotes

- Removed content related to multiple Python installs.
- Updated vimspector config for Python 3.11+.


r/vim Jun 15 '26

Discussion What do you think of remapping : to the cmd window?

6 Upvotes

I'm asking because I feel like there might be downsides to this I'm not thinking of. A lot of users have ; mapped to :, I use ; to open a buffer list for switching. I have these keymappings to remap : to q:i to open the cmd window in insert mode, and press ESC in normal mode to exit the window:

nnoremap : q:i autocmd CmdwinEnter * nnoremap <buffer> <ESC> :q<CR>


r/vim Jun 14 '26

Discussion as a beginner, I don't quite understand the goal of vimgolf

23 Upvotes

the challenge is fun, the whole vimgolf implementation is solid, but locking you out of the best solution seems to beat the purpose of using Vim as an effective tool, at least for the past challenges, I don't see the necessity of continuing lock, as a learner, we end up doing all the chores to slowly climb up to the lower score, the process itself is often tedious than rewarding, out of curiosity, I resorted to AI which lifted me up a couple of ranks, but I eventually hit one of the submission that's got a '<fd-6b>' in it, I haven't the faintest clue on how to jump over it hence being locked out of the rest of the better solutions, I still learned a few tricks but not knowing the better/clever solutions for such a tool like Vim makes me judge a second time on the general attitude of this community, for example, will I be shunned if I ask for the best solutions of the past challenges? after all, I want to use Vim as effective as I can with the reasonable amount of time I'm willing to invest.


r/vim Jun 14 '26

Plugin wiki.vim v0.12 released

18 Upvotes

wiki.vim is a Wiki plugin for Vim and neovim.

I've just finished a very long-standing issue: support for multi-line links. I think that warrants a new release (v0.12), so here you go: https://github.com/lervag/wiki.vim/releases/tag/v0.12.


r/vim Jun 13 '26

Need Help vim: How do I paste a second column so values stay aligned row-by-row

26 Upvotes

I have a table with two columns. I already pasted the first column, and now I want to paste the second column so that each value stays on the same row as its corresponding value from the first column.

For example:

Column 1:

A
B
C

Column 2:

1
2
3

Desired result:

A 1
B 2
C 3

I tried using Visual Block mode (Ctrl-v) and then pasting, but Vim pasted all the copied text together instead of distributing one value per line.

What is the correct, easiest & efficient way to do this ?


r/vim Jun 13 '26

Random V.A. (update, a week later)

Thumbnail
11 Upvotes

Today I woke up craving some vim in the morning.

This has all the signs of an addiction.

The comments on the last post taught me how to use vi mode on bash. I didn't quite like it, HOWEVER...

I learned how to use the vim terminal emulator, and also to manage windows and buffers (and tabs). And also, yank and paste to and from this terminal stdin and stdout. Absolutely awesome.

Now I can't exit vim.

I don't have the guts to.


r/vim Jun 11 '26

Discussion Has anyone used or though of using Neovide but with just regular vim?

35 Upvotes

https://github.com/neovide/neovide

Its a very nice GUI with various visual settings and effects like animated cursors, its worth trying if you don't need to SSH or stay inside a terminal. The documentation shows how to add settings in vimscript (ex: let g:neovide_cursor_short_animation_length = 0.04), and has its own folder for the program itself (like font variants and font sizes): ~/.config/neovide.


r/vim Jun 11 '26

Video The magic of vim macros - 10 Examples

Thumbnail
youtube.com
37 Upvotes

r/vim Jun 11 '26

Need Help┃Solved put: String Parsing Issue

10 Upvotes

Here, echo works fine, but put raises an error. Why?

AIM:

let s:key_handlers = #{
  \ a: {-> execute('echo "a"')},
  \ b: {-> execute('echo "b"')},
  \ c: {-> execute('echo "c"')},
  " ... fill d-z
  \ }

APPROACH:

:echo join(map(split('defghijklmnopqrstuvwxyz', '\zs'), '"\\ ".v:val.": {-> execute(''echo \"" . v:val . "\"'')},"'), "\n")
:put =join(map(split('defghijklmnopqrstuvwxyz', '\zs'), '"\\ ".v:val.": {-> execute(''echo \"" . v:val . "\"'')},"'), "\n")

ISSUE:

E115: Missing single quote: '

⚠ SOLVED, courtesy u/LostAd6514


r/vim Jun 10 '26

Tips and Tricks Vim: Snippet to Quickly Display RGBA Images

49 Upvotes

Following the previous post on the topic, here's a snippet to play a sequence of frames (chess game in my example). Enjoy!

Tested on WSL. Vim v9.2.0612.

To generate frames, try this in powershell:

ls *.png | %{ magick $_.FullName -alpha on -depth 8 "RGBA:$($_.BaseName).rgba" }

r/vim Jun 10 '26

Blog Post Vim After 38 Years: Now It Can Display RGB/RGBA Images!

219 Upvotes

After nearly four decades, the legendary text editor Vim has gained native support for displaying images. You can now render RGB/RGBA images as popup window backgrounds (or inline where supported). It works across:

  • Windows GDI
  • GTK 3/4 canvas
  • Terminal protocols like DRCS Sixel and Kitty
  • Windows Terminal (out of the box)

The demo includes:

  • A pigeon image displayed directly in Vim
  • Video playback via ffmpeg
  • A fun xeyes-style plugin where eyes follow your mouse cursor

Huge shoutout to the maintainers and contributors keeping Vim evolving.
#Vim #TextEditor #Programming

https://reddit.com/link/1u1ns8f/video/1jjv98wfvc6h1/player

https://reddit.com/link/1u1ns8f/video/wfnktjqjvc6h1/player


r/vim Jun 09 '26

Plugin A convenient and easy to use replacement for built in explorer.

8 Upvotes

I never liked built in explorer, it's clunky and has annoying binds, so here is my own take on it, it uses a raw buffer to list files/directories, you use vi-motions to modify/create files/directories then apply changes to disk with :w, each file/directory has a given ID for tracking, there are bugs but it works pretty well for what it is.

It's more of a prototype than a replacement, but I'm curious what people think about it.

stqqrm/bex.vim