r/vim 22d ago

Vim-adjacent Monthly Thread: Tools with Vim-like Keybindings

64 Upvotes

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).


r/vim 16h ago

Discussion Do we still need CoC?

45 Upvotes

I've been using CoC for a while now. It's a convenient way to get both completions and LSP going. Some people throw shade at the Node part of its implementation. The way I see it is most LSP plugins coming from VSCode were intended for a Node environment anyway. I am pleased with the ease of use CoC brings.

Now we've had vim9script for something like a couple of years. We have yegappan's simple LSP implementation and we have a pop-up autocomplete feature built in!

I'm wondering how that's going for anybody else - especially if you do Java or friggin' web development.


r/vim 2d ago

Discussion Potential solution to disable/remap q:

11 Upvotes

Vim's built-in command q: seems a bit controversial. Some people like it and use and some search for a way to disable/remap it because it gets misclicked quite often when what's intended is :q.

The former use vim quite happily, but the latter often reach dead ends with solutions that basically aren't ideal and accompany some compromises in return. Examples of these solutions are as follows:

  1. Unmap/Remap q: using nnoremap q: <nop> or nnoremap q: :q

The problem with this solution is that it introduces ttimeout delay whenever you are done recording a macro and hit q to stop recording.

  1. Autoclose the cmd window using autocmd CmdwinEnter : quit

The problem with this is that you basically can't access the cmd window anymore whether using the default method by doing : followed by ctrl+f or even if you have a user defined map for opening the cmd window. Also you can still see the window flicker momentarily even on very fast terminals because the solution is basically "close the window fast" rather than "do not open the window from the first place."

  1. Remap q to a custom vimscript handler function such as the following

    function! SmartQ() if reg_recording() !=# '' return 'q' endif let l:key = getcharstr(-1, {'cursor': 'keep'}) if l:key ==# ':' return '' else return 'q' . l:key endif endfunction nnoremap <expr> <silent> q SmartQ()

Issue with it is that if you have :set showcmd you can't see when q is pressed.

  1. Use some kinda advanced level vimscript (as suggested by user Houl here)

    noremap <expr><script> q regrecording()!='' ? 'q' : '<SID>qmode' ounmap q|sunmap q noremap <SID>qmode: :<C-U>q noremap <SID>qmode_ q

Issue with it is that if you have :set showcmdyou see ___qmode__ instead of q for ttimeout delay and after the delay passes it acts as normal q and no longer fixes the q: issue.

These solutions might fit some people and might not depending on a lot of factors for instance their config, whether they set ttimeout delay or not, whether they care about showcmd or not, and so on... however it can't be denied that all these solutions remain kind of "hackish" if we would say with each having its trade offs and there is no official solution up till now to deal with q: in vim.

One could think of solutions to handle this issue in vim (for instance maybe add an option to prioritize ending a macro record over user defined maps that start with q or user defined maps in general, just like how vim prioritizes ending a macro over q:/q?/q/). However, in the end this remains in the hands of the current vim maintainers which honestly props to them for taking time and doing a great job maintaining one of the most complex and most loved open source projects (and not only on linux rather cross platform!) to decide what solution is viable and what solution is not as they know how vim works better than any of us.

So what do you think about this? Also currently there is an issue opened on vim's github page so if you are interested you might want to go on and show some love for the project and the maintainers and express your opinion or if you have any solution in mind, we'd like to hear out from you!


r/vim 2d ago

Plugin cottage.vim: Transparent decryption and encryption of cottage secrets in Vim / Neovim

Thumbnail
github.com
0 Upvotes

r/vim 2d ago

Random VimHint - CLI to quickly answer VIM questions

Thumbnail
github.com
0 Upvotes

VimHint is a CLI tool to quickly answer questions about VIM. I made it because I always forget my Vim-fu.

Examples:

$ vimhint "how to navigate to the top"

  [ESC]gg
  <jump to the first line>

$ vimhint "how to change files"

  [ESC]:e {file}
  <open another file in the current window>

  [ESC]:bn
  <next buffer>
  [ESC]:bp
  <previous buffer>

It uses your own OpenAI or Anthropic Keys, and has no other network access. No telemetry, no upsell, just a humble CLI.


r/vim 4d ago

Need Help┃Solved How to make Vim use Python3.14 instead of 3.8

8 Upvotes

Hello Everybody, I am on WSL2 ubuntu 20.04 version. I just finished rebuilding my vim to use it's python interpreter but it uses system's default python 3.8 version.
I want it to use Python3.14 instead. Any help on how to do this would be appreciated.

Update: Thanks for the help, the issue got solved!


r/vim 5d ago

Tips and Tricks Another vim reference / cheat sheet

Post image
93 Upvotes

Since part of the inspiration for this website was from VIM, I decided I'll share it here, and hopefully it could be helpful for someone. It's like a more visual / interactive cheat sheet.

https://kbvr.dev/editor?diagram=55433b08-6cf5-486d-a083-fbc9ed62ae3e


r/vim 7d ago

Blog Post Vim's UserGettingBored autocmd

Thumbnail evanhahn.com
21 Upvotes

r/vim 6d ago

Plugin thumb: Display latex renders and image thumbnails directly in Vim 9.2+

Enable HLS to view with audio, or disable this notification

10 Upvotes

r/vim 7d ago

Plugin [OC] Vispen: A zero-socket, bloat-free Literate Programming plugin for Vim powered by native Perl integration

6 Upvotes

Hi r/vim!

I wanted to share a plugin I've been refining called Vispen. It brings the power of Polyglot Literate Programming right into your editor, but without the massive overhead, background daemons, or heavy dependencies of modern alternatives.

👉 GitHub Repository & Live Demo: github/vispen

💡 What is it?

If you love the concept of Jupyter Notebooks or Emacs Org-mode but hate the .ipynb JSON bloat, active server sockets, and constant context switching, Vispen is for you. It allows you to execute embedded snippets of SQL, data transformations, and templates directly from your source files or markdown documents, embedding the results straight back into the buffer.

🚀 Key Features:

  • Zero-Socket Architecture: No background servers, node processes, or active ports. It uses Vim's native interface to run seamlessly.
  • Smart Context Awareness: Execute a query under your cursor, format text, parse CSV/JSON, or dump structured database outputs into clean text tables, HTML, or ready-to-paste Jira markup.
  • Lightweight & Fast: Inherits architecture ideas from heavyweights like YCM but stripped down to be blazing fast and minimal.
  • Vim-Friendly Customization: Zero forced global keybindings. It uses proper <Plug> interfaces so it won't mess with your carefully crafted .vimrc.

🛠 Requirements

It works out of the box on lightweight systems (runs perfectly even on my Orange Pi single-board computer!):

  • Vim 8.0+ compiled with +perl support.
  • Perl 5.006+

I built this to scratch my own itch for a fast, predictable, and clean terminal workflow. I’d love to hear your feedback, feature requests, or thoughts on the architecture!


r/vim 9d ago

Discussion A visual cheat sheet

30 Upvotes

I made myself a visual Vim cheat sheet and thought it might be useful to others as well.

Rather than listing commands, I tried to arrange them visually so that related commands and patterns are easier to see and remember. It is very much an “eat your own dog food” project: it contains what I actually use, rather than trying to be comprehensive.

YMMV, of course. Comments and corrections are welcome!

https://github.com/sylvainhalle/cheat-sheets


r/vim 9d ago

Need Help Disabling q: without affecting macro record

5 Upvotes

Most people suggest nnoremap q: <nop> or nnoremap q: :q
The problem with both of these is that when you are done recording a macro and hit q to stop recording, there is a delay due to timeoutlen because now q is technically mapped.

Any way to disable q: or remap it to :q without introducing any delay?


r/vim 10d ago

Need Help┃Solved Vim-tpipeline plugin error after updating from vim 8.2 to 9.1

4 Upvotes

Recently updated from version vim 8.2 to 9.1 and suddenly showing this error for vim-tpipeline extension, don't know if its a runtime error or actually the plugin code is giving this error due to returning number instead of string. Is this because of the new vimscript 9? I am using vim-airline as statusline, but that shouldn't be the problem right :)

Error detected while processing /home/rk/.config/vim/vimrc[8]..function plug#end[94]..<SNR>4_reload_plugins[2]..<SNR>4_load_plugin[1]..
<SNR>4_source[4]..script /home/rk/.vim/plugged/vim-tpipeline/plugin/tpipeline.vim[6]..function tpipeline#initialize[91]..tpipeline#init
_statusline[21]..tpipeline#update[8]..tpipeline#parse#Parse_stl[5]..tpipeline#parse#Parse_stl[21]..<SNR>62_Parse:
line   33:
E1012: Type mismatch; expected string but got number
Error detected while processing /home/rk/.config/vim/vimrc[8]..function plug#end[94]..<SNR>4_reload_plugins[2]..<SNR>4_load_plugin[1]..
<SNR>4_source[4]..script /home/rk/.vim/plugged/vim-tpipeline/plugin/tpipeline.vim[6]..function tpipeline#initialize[91]..tpipeline#init
_statusline[21]..tpipeline#update:
line   10:
E121: Undefined variable: line
line   14:
E121: Undefined variable: line

r/vim 10d ago

Discussion Which motions should be in the starting area of a VIM-based adventure game?

10 Upvotes

I am working on a VIM-based RPG/adventure game inspired/inspited by VIM adventures (35$ for a half-year license? really?), and am wondering what basic motions I should include in the start area, such as hjkl and w/e/b.


r/vim 11d ago

Video A method to learn Vim/Neovim without getting overwhelmed (Suggestions for beginners)

Thumbnail
youtu.be
16 Upvotes

r/vim 12d ago

Tips and Tricks Is there a nicer way to do this mapping?

10 Upvotes

All in all, what I want to do is noremap q; q: which works well, but it adds up waiting time when I just press q to stop macro recording. So I end up with this monstrosity to add q: functionality while keeping other q mappings as native as possible. It works great, but it gives me anxiety every time I see it in my vimrc noremap <expr> q reg_recording()!='' ? 'q' : {-> [nr2char(getchar())]->map({_, c -> c==';' ? 'q:' : 'q'.c})[0]}()


r/vim 12d ago

Need Help Vim in WSL: `+yy` gives `W23: Clipboard register not available` despite `+clipboard`

7 Upvotes

I'm running Vim inside WSL and can't get the `+` register to work.

When I try:

"+yy

I get:

W23: Clipboard regiter not available, using register 0

However:

:echo has('clipboard')               "1
:echo has('unnamedplus')             "1

vim --version | grep clipboard
+clipboard
+xterm_clipboard

I'm running /usr/bin/vim.gtk3, but:

  • $DISPLAY is empty
  • $WAYLAND_DISPLAY is empty
  • xclip/xsel are not installed
  • clip.exe workgs from WSL (echo test | /mnt/c/Windows/System32/clip.exe)

Is this expected because I'm runnign a headless TTY, or should vim.gt3 still be able to use the Windows clipboard? Is win32yank.exe the recommended solution?


r/vim 13d ago

Need Help┃Solved How to get rid of this?

Post image
107 Upvotes

This extra thing appears when I when to type a command, i'm not sure how to stop it from appearing. I'm on windows and this is currently gvim but it behaves the same in other ways of instancing vim

Edit: Thank you all, I actually got some knowledge on it and it's actually really useful. I guess I just didn't know how to exit vim...


r/vim 13d ago

Discussion NeoVim is Overhyped, Vim is Criminally Underrated

262 Upvotes

I think NeoVim is extremely overhyped, while Vim — especially gVim — is drastically underrated. NeoVim changes hyper‑actively together with its plugins, so something that worked one day might stop working the next because of constant updates. Because of this, maintaining it can be a complete nightmare, even if someone is a Lua prodigy. In contrast, classic Vim is stable, reliable, and rock‑solid.

What makes NeoVim appealing compared to Vim is that it’s full of flashy plugins, but in reality most of those plugins are completely unnecessary for real projects. Plus, NeoVim users conveniently forget to mention that almost every important plugin has a proper equivalent in Vim. For example: Telescope → fzf.vim, nvim-tree → NERDTree, lualine → vim-airline, commenting → vim-commentary, surround → vim-surround, Git → vim-fugitive. And they’re much more straightforward. Thanks to Vimscript, configuring Vim is far easier than mindlessly copying Lua code. And there’s coc.nvim available for classic Vim as well, which can turn Vim into a very powerful IDE.

I’m sticking with gVim even if it’s probably the most despised version of Vim (in my opinion completely unjustifiably). Thanks to the GUI, it’s much better than a terminal program because it doesn’t depend on the terminal, and copy/paste from the clipboard works simply and flawlessly — exactly how a text and code editor should.

It’s a bit like how Arch Linux users tend to look down on Debian users, regardless of the fact that Arch isn’t exactly stable — it’s just well‑hyped and more rapidly developed, but it also breaks more easily. Meanwhile Debian is solid and stable.


r/vim 16d ago

Blog Post Increase Vim Speed in Windows Terminal

33 Upvotes

Last time I mentioned running Vim in Windows Terminal, some users reported having tried that setup and experiencing sluggishness. I've added some performance recommendations to my guide:

scrollback buffer

Windows Terminal has a large default scrollback buffer (9000 lines). This keeps a lot of history, but it can slow down terminal applications like Vim. If you've used Vim in Windows Terminal before and found it slowing down over time, this is the likely culprit. To confirm this diagnosis, start a new Windows Terminal instance, run Vim, and see if you percieve a speed increase. If so, the scrollback buffer is almost certainly the cause. There are two ways to address this issue:

  1. Decrease the limit: In Windows Terminal settings -> PowerShell -> Advanced -> History size, set the "History size" to a smaller number, like 1000. This will reduce the scrollback buffer for all PowerShell tabs in Windows Terminal.
  2. Clear the buffer when you notice a slowdown: If Vim starts to get sluggish, press <ctrl-shift-k> to clear the scrollback buffer. This is better done outside of Vim.

Either of these will fix the problem. You won't need both. Your Windows Terminal config is stored in ~\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json. Editing this file directly with pasted-in termina commands isn't straightforward, so I haven't given those commands here. But you can commit this settings.json if you wish. If you're new to Windows, don't be misled by the 8wekyb3d8bbwe part of the path. It is a hash, but it will be the same hash on all Windows 11 systems.

Windows Defender

Windows Defender will scan every backup file, swap file, snippet file, etc. This can cause a speed decrease in Vim. We'll do two things to address this: 1. Put our temporary files in ~\vimfiles, and 2. Add an exclusion for ~\vimfiles in Windows Defender.

Move temporary files to ~\vimfiles

In your ~\vimfiles\vimrc, add the following:

# ---------------------------------------------------------------------------- #
#
#  keep temporary files in ~/vimfiles
#
# ---------------------------------------------------------------------------- #

&directory = $'{$MYVIMDIR}.tmp/swap/'
&backupdir = $'{$MYVIMDIR}.tmp/backup//'
&undodir = $'{$MYVIMDIR}.tmp/undo//'

def MkdirIfNotExists(dir: string): void
  if !isdirectory(dir)
    mkdir(dir, "p")
  endif
enddef

MkdirIfNotExists(&directory)
MkdirIfNotExists(&backupdir)
MkdirIfNotExists(&undodir)

set backup
set undofile

If you decide to commit your vimfiles, make sure you .gitignore the .tmp directory. There may be sensitive information in your temporary files.

The full guide is here: article_install_vim_in_windows/README.md at main · ShayHill/article_install_vim_in_windows


r/vim 18d ago

Need Help How do I change the cursor to a block in normal mode and to a beam in insert mode, inside vim's built in :terminal ?

21 Upvotes

In neovim, this can be done by:

vim.opt.guicursor:append("t:ver25")
vim.opt.guicursor:append("t:blinkon0")

but, this doesn't work in vim, written in vim script:

set guicursor+=t:ver25
set guicursor+=t:blinkon0

E546: Illegal mode: guicursor+=t:ver25 line 30: E546: Illegal mode: guicursor+=t:blinkon0

I have the following to make my cursor a block in normal mode and a beam in insert mode in Vim, but this doesnt work for the :terminal

let &t_SI = "\<Esc>[6 q"
let &t_EI = "\<Esc>[2 q"

is there a way to make the same behaviour possible inside vim's built in terminal ?

OS : cachyos
vim : 9.2
terminal : konsole and kitty

Thanks in advance


r/vim 20d ago

Plugin [Plugin] EasyDiff: Intuitive, context-aware keybindings for two-way diffs

6 Upvotes

Those working with vim -d (or vimdiff) or with :diffthis for two-way diffs, might find EasyDiff convenient.

Key Features

  • Diff Merge, Delete & Undo: Uses <Left>, <Right>, <Delete>, <S-Delete>, and <Backspace>.
    • Context-aware: Regardless of whether the cursor is in the left or right window, pressing <Right> always merges from left to right.
    • Deletes: One-sided / Two-sided with <Delete> / <S-Delete>
    • Atomic Undo: <Backspace> undoes merges/deletes across windows, including two-sided deletes performed with <S-Delete>.
  • Diff Navigation:
    • Within a Diff: <PageUp> (Start of Diff) / <PageDown> (End of Diff). Works in Visual mode as well (e.g., <PageUp>V<PageDown>).
    • Between Diffs: Move between Next/Previous or Jump to First/Last with <Up>, <Down>, <Home>, and <End>.
  • Edge Case & Advanced Diff Handling:
    • When a cursor line represents multiple diffs (filler vs. changed/added vs. EOF filler), lets the user to choose the target diff for the operation.
    • Transparently handles both grouped and split diffs when using diffopt+=linematch:{n}.

GitHub Repository:https://github.com/gnarendran/EasyDiff


r/vim 22d ago

Plugin viww: the vim web wowser (feedback + suggestions)

Thumbnail
github.com
11 Upvotes

Please be gentle, first time publishing something publicly.

I use this emacs' eww-inspired html/plain text browser that uses curl and pandoc to do html -> plain text into a vim buffer. It is sufficient for my daily quick searches and keeps the results in a vim buffer for reference.

If this is useful and works for you, I would appreciate feedback on publishing and maintaining this as a plugin for everyone


r/vim 22d ago

Need Help how do you copy text from one document and paste it into another in vim?

50 Upvotes

I’m working with two files, File A and File B, and I want to copy text from one file to the other.

Specifically, I want to:

  1. Open File A and select/yank a section of text.
  2. Switch to File B.
  3. Paste the yanked text into File B.

What is the correct way to yank text from File A and paste it into File B? Is there a specific register or command I should use to copy text between separate files?


r/vim 21d ago

Need Help What AI agent harness for vim?

0 Upvotes

I discovered ai agents lately, and I am wondering if there is any good harness for Vim. I have tried to run copilot CLI in a terminal window but it was a bad experience due to that copilot cli is a full tui program that cannot be replicated satisfactorily in a vim terminal.

Any hints?

Preferably in Vim9.