Questions tagged [vim]

Vim is a free and open-source modal text editor available for most major platforms. It allows high efficiency in many text editing tasks but has a steep learning curve. To learn the basics, run ":help vimtutor". For non-programming questions please use https://vi.stackexchange.com/ instead.

Filter by
Sorted by
Tagged with
0 votes
0 answers
5 views

How to run current python file in floating terminal? Using neovim and NvChad

FYI noob here. I want to run current file in floating terminal. I'm using NvChad and when I execute ALT+i I get the following: I already played with some key binds, but I haven't achieved what I need....
0 votes
0 answers
45 views

How do text editors efficiently operate on UTF8 text? [closed]

Currently I'm trying to advance my programming skills in Rust by trying to implement a medium to large size project. Specifically I'm trying to understand what approaches there are to efficiently load ...
0 votes
0 answers
16 views

vimdiff: Move cursor into a block of deleted lines

When I open two files using vimdiff side by side I cannot put the cursor into a block of deleted lines. vimdiff instead jumps over them. How can I configure vimdiff such that diffs are still side by ...
1 vote
1 answer
33 views

Vim: how to start vim with a command without opening new buffer?

I recently upgraded to neovim & I love it. One of things I start to use is the Fugitive plugin, which I really like. In order to use it as a replacement for git gui, I created a bash alias, to run ...
  • 599
1 vote
3 answers
43 views

How to bring back shell output buffer?

after running a shell session in vim (e.g. ! ls) and closing it (pressing ENTER), how do I bring back that content without running the command again?
  • 13.6k
0 votes
0 answers
17 views

vim-coc does not produce any diagnostic with linters using coc-pylsp

I'm setting up vim-coc. I have installed coc-pylsp. I have been using it for a couple of days and it works OK. It YAPF didn't work, though. Trying to fix it, I have been changing some few things and ...
  • 1,591
0 votes
1 answer
34 views

In Debian, visudo /etc/sudoers

why is this line not highlighted? Defaults authfail_message="message" If it is okay not to be highlighted, I wonder what standard it is decided on.
  • 1
-1 votes
1 answer
21 views

typescript-vim throws syntax error for flavored strings that actually compile fine

Cross post from https://github.com/leafgarland/typescript-vim/issues/201 but im not super optimistic of getting a quick response there. In our code base we use Flavoring: https://spin.atomicobject.com/...
  • 305
1 vote
1 answer
33 views

Accessibilit on VIM - Is it possible to play sounds on actions? [closed]

I'm visually impaired (legally blind, but I can still see a little) and would like to know if there is a possibility to play sounds when performing certain actions in VIM so I don't need to move the ...
1 vote
1 answer
31 views

How do i use vim surround from the middle of a word to the end of a line?

printemployee.fullname(emp_1) I want to use vs code vim-surround to give me this result: print(emloyee.fullname(emp_1) I've tried yss from the cursor on e but that wraps the whole line. I've tried ...
  • 11
0 votes
0 answers
38 views

How to configure vim/neovim to locate include (headers) with Makefile?

I'm searching an option or a plugin to vim that will configure vim to use my Makefile to find the paths to the files that I include. Example (in cpp file): #include "my_header.hpp" int main()...
0 votes
2 answers
34 views

Vim for windows: How can I prevent a powershell based command from forcing me to exit out of Vim and pressing enter

I'm running vim for windows in a Powershell 7 terminal. I'd like to make my own command, called SB that would do the following: Save the current file Run the script build.ps1 So I added the ...
  • 4,885
0 votes
0 answers
16 views

How to debug a random vim/neovim error condition while it's running?

For a couple of years now I experience a random bug: Both vim and neovim sometimes start to "swallow" lines when I scroll: You can see it in the image above: Lines 779-780 are missing. I ...
0 votes
1 answer
22 views

Vim custom command to execute 'c""<Esc>P'

I am trying to write a custom command that executes the following: 'c""<Esc>P', namely cut visually selected text, insert ""and paste the cut text into the quotes. I have ...
  • 5
-1 votes
0 answers
27 views

Why vim-fugitive set these weird colours in the commit window?

Here are the colours I see when writing a commit message with vim-fugitive. The commit starts with a red in the foreground, then goes to black as I'd expect. The second line has red a background and ...
  • 1,591
-2 votes
0 answers
17 views

VIM Ctrl-V Conflict with Windows Paste In Windows11

In this answer, VIM Ctrl-V Conflict with Windows Paste ctrl + Q is not working to enter visual block mode in VIM on windows11.but ctrl + alt + v is working . I donot konw why it is working.
0 votes
1 answer
30 views

Substitution in Vim using the capture sequence

I have the following lines in my text file: .abc(), .def(), .ghi(), .jkl(), and I'd like to transform them into this: .abc(abc), .def(def), .ghi(ghi), .jkl(jkl), I've tried :%s/\.\(\w\+\)(\),/.\1(\1)...
0 votes
1 answer
33 views

Remapping [ and ] in VIM

I like to use { and } keys quite often in VIM because they let me navigate quickly to the next empty line or between blocks of text. However, lately I've realized it would be a lot more convenient if ...
0 votes
0 answers
18 views

vim error grep: env: No such file or directory grep: LANG/: No such file or directory grep: */main.aap: No such file or directory

I am seeing some issue vim 9.0 version, not really sure whats causing the issue, whenever I try opening any file, I bumped with this below stuf from vim: :!grep -n /sys env LANG/ */main.aap /dev/null |...
-1 votes
0 answers
21 views

How to get vim to autocomplete a Python __repr__ function?

Can I auto-generate a __repr__ function for a python class from its attributes with Vim automatically? I am using Vim for writing python code. Does anyone have a solution for generating strings for ...
0 votes
0 answers
13 views

How set the keymap of Ctrl+Backtick in vim? [duplicate]

I want to set a keymap for Ctrl+` in vim. I tried all of the following: <C-`> <C>` ^` I want it to open the terminal similar to the functionality in VSCode. I expected this to work: ...
  • 401
-1 votes
1 answer
21 views

csv.vim pluging how to deactivate it (without uninstalling it)

I'm using the csv.vim plugging for handling column separated data with Vim. I don't found in the documentation who to deactivate it.
  • 7,136
0 votes
0 answers
22 views

Disable automatic text wrapping within custom word pattern in Vim

Vim/neovim's automatic line wrapping feature is great for writing reports in Markdown, but sometimes it kicks in when I don't want it to. Is there a setting somewhere that I can set a regex pattern to ...
1 vote
0 answers
36 views

If I update vim, will I have to configure .vimrc again?

If I update vim, will I have to configure .vimrc again? I have installed conquer on completion(coc) on vim version 8.1 but it requires vim version greater than 8.1 to work properly. I'm afraid of ...
-1 votes
1 answer
29 views

how to get the word between two character in vim script?

My cursor is on the word <header>. If I run the function expand("<cword>") it will return for me the word <header> I want get only what is between <> which is header. ...
0 votes
1 answer
27 views

Vim with +clientserver feature on Mac OS M1

Can Vim's +clientserver feature be used on MacOS 12.2.1? I have Vim installed +clientserver feature on, but the --serverlist and --servername <name> flags do not work. I don't mind compiling Vim ...
  • 4,544
0 votes
1 answer
22 views

Overriding the highlighting of default highlight groups within a syntax file

In my custom syntax file, I have the following: highlight default link sv_block_comment Comment highlight default link sv_macro PreProc ... I wanted to override the display of PreProc within the ...
  • 573
0 votes
0 answers
29 views

Modifying multiple interfaces model types in virsh using a startup script, reboot restores original types

I am attempting to create a startup script that will modify the model of the following interfaces in virsh: </interface> <interface type='bridge'> <mac address='52:54:00:df:9a:65'/> ...
1 vote
2 answers
29 views

Could I copy content in host A and paste it into host B using vim editor?

Could I copy content in host A and paste it into host B using vim editor? I connect with two remote host machine A and B. I want to copy a few lines in machine A use vim editor and paste these content ...
-1 votes
0 answers
13 views

Using <F9> with \ref{} fails

I am using vim-latex, v. 1.10.0 with VIM 8.2 as of 2019 Dec. 12 under windows. When I want to use the reference completion (pressing in insert mode with \cite{} or \ref{}) it works fine with \cite{}, ...
  • 1
0 votes
1 answer
42 views

VIM: How to move cursor in empty lines?

I've been through a lot of instructions, but I can't find a solution to this problem. Giving this code in vim as an example: #include <iostream> <--- My cursor is here int main(){ std::...
  • 43
-1 votes
0 answers
39 views

Vim cursor not highlighting or inserting at correct position

UPDATE: The problem in question appears to be caused by vim's conversion of the 2 characters </ to ↙ on the editor, resulting in an indentation that offsets the cursor's position by one. I ...
-1 votes
0 answers
16 views

Material-ui autocomplete in vim (Angular)

I'm using Material UI and angular and trying to setup autocompeletion for the material UI library whilst in vim. Is this a simple .vimrc edit? I'm using angular and coc as well.
1 vote
0 answers
40 views

I cannot install vim manually on my MAC with python 3.10 or more plugins

I have a problem I don't know how to solve. I'm currently trying to install vim manually, without any package manager like Homebrew or Macports, because I don't have and I cannot have the ...
-1 votes
0 answers
26 views

change close popup pane keybinding

I am trying to run vim in a tmux popup pane. The main issue I am encountering is that pressing ESC closes the popup instead of being forwarder to vim. Any idea on how to change the behaviour? I haven'...
-1 votes
0 answers
31 views

How to create a magic file that can be used with the command file to detect data files? [duplicate]

How can I create a magic file market.mgc that can be used with the command file to detect Market data files? This is what I did that is not giving me result #!/bin/bash 0 strings MARKET market data !...
-2 votes
1 answer
143 views

YouCompleteMe unavailable: requires Vim compiled with Python (3.8.0+) support

I would like to install the vim plug-in YouCompleteMe but after installing, when I launch Vim I get the warning: YouCompleteMe unavailable: requires Vim compiled with Python (3.8.0+) support. I know ...
-1 votes
1 answer
34 views

How do i paste outside content into vim? [closed]

I got a problem while using vim.i can't figured out any solution to paste content from outside into vim.so can any one please make my job easy. I tried lot from from stack overflow and more. but none ...
-1 votes
1 answer
31 views

Vim not changing tabstop to 4 after configurations in ~/.vimrc (details included)

Intended behavior is to have every time I press tab the system outputs 4 spaces for me. Currently it outputs a tab that is equal to 8 spaces of length. Here's my configuration in ~/.vimrc set tabstop=...
  • 1
-1 votes
0 answers
29 views

I'm using the ".data" directive in x86 GAS and my text editor vim is telling me: syntax error at testa.s line 1, near "."

I originally wanted to create a simple program (my program name is testa.s) to test if everything was working but whenever I use the ".data" directive my text editor will then tell me there ...
  • 1
0 votes
1 answer
26 views

How to auto-close Vim window in terminal?

I am trying to speed up the workflow and created an alias in ~/.zshrc: alias update='git fetch origin; git rebase -i origin/master' But the problem is, it will obviously open up the Vim window to ask ...
1 vote
1 answer
40 views

Redirect Vim output to file

I used to be able to do this, but how do I direct the output of a file open in vim to a different file? I used to redirect the output of a python script open in vim to the TTY of a different terminal ...
-1 votes
2 answers
33 views

bug: vim when save print "/etc/paths" E212: [closed]

after open "vim" editor by termnial try to save the path enviroment when write ":qw" it's print error: vim when save print "/etc/paths" E212
0 votes
0 answers
20 views

Unable to use any commands in vim-taskpaper

I'm a completely new vim user and my first foray into plugins is vim-taskpaper. This is the plugin I'm using: https://github.com/cweagans/vim-taskpaper The syntax highlighting works, but whenever I ...
-1 votes
1 answer
37 views

vim move tab to end of all other tabs

Is there way in vim to move a tab to the end (to the right) of all other tabs without having to count how many tabs there are and entering that number? Some times I have lots of tabs open, and tmux ...
  • 572
0 votes
0 answers
17 views

Vim abbreviations not expanding if I Backspace first before typing the abbrev

When I enter Insert mode, then backspace twice and then type an abbreviation, then the abbreviation does not expand. This is because Vim only looks for abbreviations after the cursor position where I ...
  • 59
0 votes
2 answers
58 views

Git commit doesn't open desired editor, despite changing core.editor config setting

I'm trying to set up git so that the vim editor opens when I do git commit without a message. Previously I had set up VSCode do this, but it wasn't working, it was giving me the error "aborting ...
-1 votes
0 answers
28 views

vimscript highlight does not recognize previously defined regex matches

I wish to highlight all instances of check-expect that end in a whitespace character. However, after defining a match, the highlight call on the next line does not recognize it. I have this in my ....
  • 1
0 votes
0 answers
19 views

How do you close/stop tab in vimscript?

I use a command in a function like the one below: execute "normal! i\begin\r\<tab>somethinghere\r\\end" and I am expecting this result: \begin somethinghere \end But instead I ...
  • 1,157
0 votes
1 answer
28 views

How do i call vim in my shell script to open with a file name that I've put in?

I'm writing this shell script to help me automate a few things. I basically input a file name, which my script reads and then commands vim to create and open an empty file( in the name i've just typed ...
  • 1

1
2 3 4 5
558