r/vim • • Aug 17 '26

Need Help┃Solved How to get rid of this?

Post image
111 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 • • Jun 17 '26

Need Help┃Solved Resources to learn Vim

46 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 • • Jan 12 '26

Need Help┃Solved How do you navigate in insert mode?

25 Upvotes

I've been using vim motions as a plugin in IntelliJ for like two years now and would like to switch to vim at some point. However, I still use arrow keys to move around, since I also use some intelliJ shortcuts that open context menus where you have to use them to navigate.

I feel like before switching to the real thing, I should get somewhat used to hjkl but I was wondering how you get around in insert mode then? Say you want to move like three characters left, do you go to normal mode and use h? Do you still use arrows?

r/vim • • Nov 29 '25

Need Help┃Solved How to become faster in Vim ?

78 Upvotes

Hello, I’ve been using Vim daily since last year for programming, taking notes, etc., but I still can’t get comfortable with it. I feel like I’m not “fast enough” when it comes to manipulating text with keybinds, and I’ve never used any macros. I've already went through vimtutor a couple of times but never found an occasion to use the stuff I learned while I'm using it. May I get some advises and tips ?

r/vim • • Jan 16 '26

Need Help┃Solved Is there a list of all *insert-commands* that I can do without leaving insert mode?

35 Upvotes

Those are some of the insert-commands that I use all the time:

  • C-h (delete character behind cursor, similar to backspace)
  • C-w (delete word behind cursor)
  • C-m / C-j (insert Return)
  • C-o (one shot normal-mode command)

They are the most powerful feature in vim IMO, and I found them very handy.

But I couldn't find any command for

  • delete the character in front of the cursor... like what the actual delete key does (C-h equivalent).
  • delete the word in front of the cursor (C-w equivalent).

If there's no already available keymap, then I guess I'll make my own, but I don't want to overwrite a important command.

So, is there a complete list of insert-commands that I can look into?

and if I have to map delete-front-char, delete-front-word, what should I map them into?

solution:

For a list of all commands use :h insert-index

For the second question, I think of remapping either C-s, C-f, or C-b since they aren't used.

r/vim • • Aug 26 '26

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 • • 1d ago

Need Help┃Solved How to get past skipped lines?

3 Upvotes

I've been getting good with vim but every now and then when I want to access a certain line, I can't move the cursor into it, it just jumps over. What I usually do it move the cursor a line above it and (number)+w a few times. Any advice for this small problem I'd be grateful.

r/vim • • Oct 30 '25

Need Help┃Solved Seeking Vim Experience and Tips for Programming NSFW

33 Upvotes

Hi all,

I would like to ask you to share your experience working with Vim. I am looking for the best editor to use on my Linux PC. VS Code is good, but it is not available in the Debian repository.

Could you please share your experience and tips on how to customize Vim for programming? I would really appreciate your advice and recommendations.

Thank you for sharing

r/vim • • May 16 '26

Need Help┃Solved Why does my terminal Vim look like this?

21 Upvotes

I'm tired of putting up with this. I made some computer changes earlier in the year, or late last (graphics card, drive, etc.), and when I got back up and running—Linux, Ubuntu 24.04, bash, Apprentice colorscheme—it started always doing this. I can select all text, and deselect, and it fixes it, but can leave a stray line at the bottom.

I've scoured Google a few times over the last year, conversed with ChatGPT, searched forums, mucked around a bit with settings, plugins, etc... I've tried a handful of suggested term and Vim fixes. I can't get anything to work. The background is supposed to be that dark gray, not black.

The terminal itself is fine; it's just Vim. Starting with -u NONE means standard black background (w/ green text), so the issue either doesn't exist, or isn't visible.

UPDATE: Ctrl+L/:redraw don't fix the issue, like selecting all does.

r/vim • • Nov 17 '25

Need Help┃Solved vim-lsp is being confusing with C for loops.

Thumbnail
gallery
58 Upvotes

i just dont understand whats up, the lsp is clangd.

r/vim • • Jul 24 '26

Need Help┃Solved Translucent Text Label At Buffer's Corner

Post image
16 Upvotes

Is is possible to display a customizable text label at one of the corners (it mustn't block text written in the buffer itself) of an open buffer? I have several terminal panels open at once, so, having a visual marker like this would be great. Any advice in this direction is appreciated.

⚠ RESOLVED

popup works just fine for this task. I'd tried it earlier but couldn't make it persist, owing to a faulty highlighting logic of mine. Anyway, I'm listing a simple function that achieves set objective. You can modify it to add custom text, toggling & highlights.

Also, see this for how my solution worked out.

function! LabelOverlay(text)
    let l:options = {
    \   'line': 1,
    \   'col': &columns - strlen(a:text),
    \   'pos': 'topright',
    \   'wrap': 0,
    \   'zindex': 1,
    \   'highlight': 'Normal'
    \ }
    let g:popup_id = popup_create(a:text, l:options)
endfunction
call LabelOverlay("TEXT HERE")

r/vim • • Sep 26 '25

Need Help┃Solved How to start at the first line when opening a file in Vim terminal mode?

8 Upvotes

In Linux, I run Vim in terminal mode to view an ANSI text file:

vim -c "terminal cat file.txt" -c "only" -c "1"

I expected -c "1" to move the cursor to the first line, but it doesn’t.
I also tried -c "go", with the same result.

How can I make Vim start at the top of the terminal buffer in this case?

---

EDIT: Adding more context for the motivation. I’d like to use Vim as a replacement for the default pager (less) in git log. However, Vim doesn’t render ANSI colors correctly in normal mode. The workaround I found is to use :terminal cat so that the colors display properly.

My approach is to dump the git log output (with ANSI colors) to a text file, then open it in Vim terminal mode with cat. Here’s the alias I’m using:

[alias]
    graph = "!git --no-pager log --graph --oneline > /tmp/graph.txt; \
             vim -R -c \"terminal cat /tmp/graph.txt\" -c \"only\" -c \"1\"; \
             rm /tmp/graph.txt"

This works fine, except Vim doesn’t start at the first line of the buffer. I’d like it to open at the top (to see the most recent commits) without needing to type gg every time. I added -c "1", but it seems to have no effect inside the terminal buffer and I don’t understand why, so hence the original question.

r/vim • • Nov 19 '25

Need Help┃Solved How to learn vim bindings

47 Upvotes

I know the basic vim bindings but I want to be better at the motions.

I know about the manual but is there a book you recommend to learn the motions

Edit : finished vimtutor

r/vim • • Sep 11 '25

Need Help┃Solved Am I the only one finding it hard to read code in vim? + any wish I’d knew tips?

27 Upvotes

I’ve been using Vim for the past 2 weeks and I’m growing into it!

I use vim packs to install plugins, basically vims own integration. I.e I pull the plugin from git and thats it.

I also set some keybindings. I modified the leader key to “,” and use YouComplete me.

For example I have nnoremap <leader>gl to go to declaration.

Orher tha that I am only using;

Hjkl to move around. v or shift +v, d, ctrl+ i and o to jump lists. E.g go back to “page” before going to its declaration.

What now? What should I learn next, I am trying to do this step by step to not give up. Also I feel like it’s harder reading code in vim. Maybe due to the color scheme I use? Which is gruvbox dark. How did you tackle this? And what are things you wish you knew before

Thank you!

r/vim • • May 13 '25

Need Help┃Solved What does :s//foo do?

180 Upvotes

Playing today's Vim Golf the challenge was to change a list of five email address domains from user@example.com to user@example.org.

I did the obvious:

:%s/com/org/⏎

and was surprised to see that others had solved it more quicly with just

:%s//org⏎

(nothing between the first two slashes and the third slash omitted altogether). I tried it myself (completely vanilla Vim, no plugins other that the game) and was a little surprised to discover that it worked.

Could someone explain this? This was new to me.

r/vim • • Aug 20 '26

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

6 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 • • Jul 14 '26

Need Help┃Solved Does a plugin like this exist?

6 Upvotes

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.

r/vim • • Sep 26 '25

Need Help┃Solved what does ".*" mean? in :help starstar

0 Upvotes

Hi, I am reading :help starstar

The usage of '*' is quite simple: It matches 0 or more characters.  In a                                                  
 search pattern this would be ".*".  Note that the "." is not used for file                                                
 searching. 

In a common search in vim * is an special character meaning Here from 0 to bible...
but in this help, the meaninig of * is another...
What will be an example of use ".*" for text please not code!
Thank you and Regards!

r/vim • • Aug 29 '25

Need Help┃Solved Workflow question: how to avoid swapping between insert and normal all the time

15 Upvotes

I'm sure this is a relative newbie question, but here goes. When defining a new function, to make sure I don't end up with mismatched braces, my instinct is to type:

int foo() {
}

then to navigate to in between those braces and start typing my code. This means pressing Esc h i Enter Esc k i Tab or similar before my cursor is actually in the right place to start coding, which is obviously insane. I suppose I could reprogram myself to type

int foo() {
[Tab]
}

but this isn't ideal either, because on line 3 I have to press backspace to get rid of the auto-indentation, and I still end up having to revert to normal mode to do the navigation. So in practice I just end up staying in insert mode and using the arrow keys, and by now I've used vim long enough that that feels wrong too.

A similar thing happens when I'm dealing with complicated expressions involving lots of parentheses. I want to be able to type () first, rather than typing ( and embarking on a big complex expression while also keeping track of how many brackets I owe and where. But leaving insert mode, navigating one character to the left and reentering insert mode every single time I type some brackets feels like an arcane form of punishment.

In all these cases, it feels like vim is working against me. Most modern IDEs deal with this fairly sensibly: they'll attempt to auto-match brackets and indentation and place your cursor in a natural place without any prompting from you (even if this isn't always seamless). I'm sure the seasoned vim denizens probably have a better solution. Any tips?

r/vim • • Jun 05 '26

Need Help┃Solved What is <fd-6d>?

8 Upvotes

I'm just coming back to vim, and played a round of vim golf. The 3 people above me all used this key press, I'm confused what it is.

r/vim • • Jul 13 '26

Need Help┃Solved when vim session is restored, u (redo) and c-r (redo) don't work

3 Upvotes

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

r/vim • • Oct 16 '24

Need Help┃Solved I’ve been using vim motions for a week now and I already have the urge to tell people that I use Vim btw

149 Upvotes

No one cares but me :)

r/vim • • Jun 04 '25

Need Help┃Solved Best way to copy and paste between Vim and other apps

30 Upvotes

I frequently have to copy contents from Vim buffer, paste it into browser, copy the result and paste it back into buffer.

Here is my workflow: - yank into + register (select, Shift-+, yank) - paste in browser and copy new text to be inserted into buffer - Shift-+ paste

As you can see copying and pasting is 2 keystrokes insted of regular C-c/C-p on Windows.

r/vim • • Mar 15 '25

Need Help┃Solved Clipboard not working

39 Upvotes

r/vim • • Aug 26 '25

Need Help┃Solved Toggle between Vim and git diff?

28 Upvotes

When I do code reviews I page through git diff's output but may want to see the changed lines within the file.

So currently I quit git diff to load the file in Vim. And then quit vim and run git diff again and scroll back to the place I left off.

Is there a way I can have both git diff and Vim running and switch between the views? (Or other suggestions for a Vim-based workflow for code reviews?)