Questions tagged [vim]

Vim is a highly configurable text editor built to enable efficient text editing. It is an improved version of the vi editor.

Filter by
Sorted by
Tagged with
3
votes
1answer
48 views

How to delete everything after every a specified word in vim

so i have this string fruit banana fruit apple fruit grape planet jupiter planet mars planet saturn And I want to change those string to like this fruit fruit fruit planet jupiter planet mars planet ...
0
votes
0answers
19 views

Terminal font breaks after exiting vim

My terminal's (alacrity with zsh/powerlevel10k) font breaks after I leave vim. Anyone that could tell me how I could fix this? Interestingly, the font seems to fix itself if I enter and then exit vim ...
0
votes
0answers
17 views

VIM Cannot autocomplete using return key, when there is one completion possibility

I have autocomplpop plugin installed, but it shouldn't change much. So normally when I toggle autocompletion and there are multiple choices, I navigate by arrows and press enter to complete. But when ...
0
votes
1answer
27 views

Why does my colorscheme sometimes get all messed in GVIM on Windows 10?

I have recently added the following code to $MYGVIMRC (which otherwise has been unchanged for years and has been working fine) to have my GVIM (8.2) on Windows 10 switch background automatically ...
1
vote
1answer
33 views

How does the shell output line separator fail to get reset?

I execute an incorrect command over ssh: watch /bin/df | grep _23 Now I execute a command like env and get this: LC_TERMINAL_VERSION=3.3.4 LC_TERMINAL=iTerm2 ...
1
vote
0answers
13 views

How to use advanced vim copy selections methods in TMUX

I'm using vim and tmux and I am interested if there is a way to use something like advanced vim selection methods in tmux. So for example if I have a text in vim This is a sentence "and I want to ...
0
votes
0answers
16 views

Vim inside xfce4-terminal under Cygwin displays symbols when I enter insert mode

I am using xfce4-terminal via Cygwin/X. When I open a file in VIM and press Shift-A (to get to the end of the line and enter insert mode), some strange character is displayed at the start of the line. ...
0
votes
1answer
27 views

Cycling through splits and maintaining fullscren in tmux with neovim navigation

I use tmux with Neovim as a software developer (on Debian 10). I'm having the following two issues and after much investigating still can't find a solution that suits me: I would like to cycle ...
0
votes
2answers
40 views

(vim) How to remove word that has a specified character?

so I tried to remove any word that has a letter "a" in it with vim I want to change this string hotel echo lima lima oscar whiskey oscar romeo lima delta to hotel echo whiskey romeo I hope I ...
1
vote
1answer
82 views

How to paste commands into vim command mode?

It used to be possible to leave vim in command mode (rather than insert mode) and then paste some copied characters into the vim window to make it execute the characters as a sequence of commands. So ...
0
votes
0answers
27 views

Add a space when pasting at start/end of line in vim

When I yank some text (say a word) and want to paste that word at the end of another line in vim, it ends up being joined with no space and I then need to manually insert the space myself. For example:...
0
votes
2answers
67 views

sudo vim can't write file

spotify.desktop can be written by root owner, so, I use $ sudo vim spotify.desktop to edit it, but, find that I can't save the modifications. The error is "only readable". Does anybody know ...
0
votes
1answer
31 views

TagList vim plugin is not working

I have issues in using taglist. For example if I TlistOpen, it shows an error E117: Unknown function: taglist#Tlist_Window_Toggle I am using a Ubuntu18.04 , with vimrc looks like as follows; test@test-...
0
votes
1answer
36 views

How to start Vim with a clean jumplist

I want Vim to start up with a clean jumplist. I don't want to go back to old files i edited in another session when I press CTRL-O. The jumplist is stored in .viminfo and I can't get it to disappear ...
0
votes
1answer
11 views

How to turn a visual selection into a visual block selection?

Is there an easy way to use a visual selection, made with vip for example, and turn it into a visual block selection?
1
vote
1answer
74 views

YouCompleteMe unavailable: requires Vim compiled with Python (2.7.1+ or 3.4+) support. Press ENTER or type command to continue

I was editing my vimrc but after I had added tabnine (or I don't know is that's the problem), it shows this message every time I open a file with vim. The vim version is 8.1 and I'm on Linux. This is ...
0
votes
0answers
12 views

Why does find | xargs vi act this way? [duplicate]

Running find . -name index.html | xargs vi instead of, say, find . -name index.html -exec vi {} +, seems to do what I want, but with some odd side-effects: backspace prints the delete character ^?, ...
0
votes
0answers
13 views

Cannot execute xdg-open from gvim

I'm trying to open a PDF file from within gvim, but I cannot seem to execute xdg-open. Running :!xdg-open file.pdf doesn't yield any errors, but nothing happens. The same command runs fine in vim. ...
0
votes
0answers
26 views

Use the mouse past 220 columns in Neovim with rxvt-unicode

When using neovim with mouse support in urxvt, any mouse events past the 220th column are wrapped around to the left of the screen. The mouse works normally in vim, and in nvim with another terminal ...
0
votes
2answers
24 views

How do I simply replace a visual mode selection I've made in Vim with any amount of new words?

Today, I'm in a line and need to replace a few words to clarify an idea, like so: Superuser is THIS IS THE TEXT I WANT TO REPLACE awesome. After visual selection, however, being the novice I am, I ...
0
votes
1answer
36 views

Why is VIM not listening to local .editorconfig?

I'm just trying to use editorconfig for the first time, and for some reason it doesn't appear to be reading local configuration files. This is on MacOS 11.2.1, with VIM 8.2. I installed as a VIM 8 ...
1
vote
2answers
240 views

I am unable to install vim on my machine, unmet dependency libpython3.8

$ sudo apt install vim Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an ...
0
votes
0answers
15 views

Vim cannot detect openssh installation on windows 10

Vim/Gvim is unable to detect my OpenSSH installation in windows10. How do I make vim detect the installed ssh? I want to edit files over sftp using vim, which I cannot do at this moment. I can use ssh ...
1
vote
0answers
41 views

Fuzzy finder script to search file contents while floating (i.e. in dmenu/rofi style)

I've been trying to create a script with the following functionality: I push a button in my window manager -> a fuzzy finder menu in floating mode pops up where I can type a keyword to search the ...
0
votes
1answer
24 views

How to cancel the reference by locate?

My os info: uname -a Linux mydebian 4.19.0-14-amd64 #1 SMP Debian 4.19.171-2 (2021-01-30) x86_64 GNU/Linux There is no /usr/share/vim in the os,it is my first time(never install before) to install ...
2
votes
2answers
183 views

Why installed part of vim instead of entire diectories?

I find that part of vim installed with the command: sudo apt install vim Check all directories whose path contain vim. sudo find / -name vim /etc/alternatives/vim /etc/vim /var/lib/dpkg/alternatives/...
0
votes
0answers
21 views

How do I map “<CTRL+[>” to Escape in Visual Studio Code (especially for the Search Box)?

I am trying to use <CTRL+[> as my Escape key in Visual Studio Code, but I can't seem to find the right keybinding to do so. In particular, I want <CTRL+[> to exit the search window ...
0
votes
0answers
27 views

Is there any way to make conemu in windows cut off the left and right sides of the screen and stay in the centre?

I would really like to use an old-style text-based editor like vim in fullscreen using conemu, a bit like what GRRM uses to write his books. However modern monitors are just too wide for this to be ...
0
votes
1answer
30 views

What does ctrl+arrow do in vim within tmux, and how do I skip words?

I am used to using vim in a normal gnome-terminal, in which by default ctrl+arrow can skip words. However, if I am using vim in tmux, these key combinations would delete lines of words. Question: ...
0
votes
1answer
44 views

vim: find a line containing pattern that is not in the neighbouring lines

I want to find a way to show all the lines that contain certain pattern, but it's neighbouring(previous, next) lines doesn't. e.g: let's say pattern is word "PATTERN" 1.######################...
0
votes
0answers
18 views

Scrolling down in nvim, inside tmux running on cmder creates empty lines and random characters

I'm currently running neovim inside tmux, running on cmder and every time I start scrolling down with my keyboard on a file with text, empty lines are inserted within each line. A lot of the times ...
1
vote
0answers
21 views

Unable to Install gvim/dependency in local directory without super user permission

Wanted to install gvim in the local drives as I don't have the root permission but it does install the GUI version [i.e. GVIM] of it. Steps Followed: First I tried doing the ./configure process with ...
0
votes
0answers
53 views

Ranger opens file with NeoVim in a new windows instead of the current one

When Im trying to open some files for example .m instead of "transforming" the current terminal into vim. Ranger opens a totally new terminal and it opens it there in vim. That does not ...
2
votes
2answers
41 views

I have to reinstall Vim on every restart

I followed these instructions from YouCompleteMe to build Vim from source: https://github.com/ycm-core/YouCompleteMe/wiki/Building-Vim-from-source It worked. But now, every time I reboot the computer, ...
0
votes
0answers
408 views

Vim: jump between phrases with particular pattern and feed matching words to command

I have a text file with content like this: [example.jpg|image] [example.pdf|document] [another.jpg|image] [yetanother.doc|document] And I'd like to make vim "jump" between the 4 items back ...
0
votes
1answer
27 views

Is there a way to provide a template file (as argument) when opening a new file in vim?

I have created a command called vimbin which is called like this: # performs "vim /x/y/z/bin/myscript" vimbin myscript What I want is that: if the file does not exist, to provide a default ...
1
vote
1answer
37 views

Open file highlight color changes in Vim when used on a remote server on macOS Big Sur (11.1)

I use the terminal and it has set to ‘Pro’ scheme which has a dark background. When I SSH to a Linux server (CentOS 8.3.2011) and use VIM open a file, the color of the keywords in the file changes ...
0
votes
1answer
25 views

lightline plugin doesn't load on new vim instance

I've trying to do this for a while and it just doesn't want to work. It installs the plugin, it shows the plugin, but upon opening a new Vim instance it just doesn't load the plugin. I think it might ...
0
votes
0answers
9 views

VSCode + VimPlugin: tabcompletion point of reference is different than file open

A colleague suggested that I give VSCode a try, instead of working in Vim all the time. Reluctantly I gave in, but I've been encountering a bunch of issues right from the start. The main one is that ...
1
vote
1answer
150 views

making it so right clicking in WSL / Ubuntu 20.04 / vim pastes code?

I'm running Windows 10 / WSL2 / Ubuntu 20.04 and when I right click in vim the text at the bottom left goes from -- INSERT -- to -- (insert) VISUAL --. I'd like it to paste whatever was in the copy ...
2
votes
0answers
36 views

Terminal not cleaning lines

I'm working on a remote Ubuntu 20.10 machine [linux version 5.8.0-1011-gcp] in Google Cloud, built from a basic Ubuntu image, using gnu bash 5.0.17(1)-release and xterm 353, and the terminal isn't ...
0
votes
1answer
55 views

How do I change Vim splitting key-mapping?

I have recently started learning Vim, and I don't like the default key-mapping of splitting windows in Vim. That is, I don't like to enter C-w and then S for horizontal and v for vertical, and moving ...
0
votes
0answers
73 views

Dynamically changing cursor color rxvt/urxvt based on vim syntax

I try to switch my terminal emulator from terminator to urxvt. However, I cannot change the cursor background color dynamically depending on the underlying color of the syntax in vim in urxvt, which ...
1
vote
1answer
945 views

Why am I getting this error after removing vi? “No vim found, using vi”

I'm on Fedora 33 Server. I've removed vi and installed vim-enhanced: dnf remove vi dnf install vim-enhanced But I get this error on using vim command: [root@localhost ~]# vim No vim found, using vi, ...
0
votes
0answers
34 views

How to edit file inplace

I am writing some logs in a file using logging module #filename : demo.py import logging #other imports as well logging.basicConfig(filename="myfile.log", format='%(...
0
votes
1answer
21 views

Try to setup static IP on CentOS

I am very new to Linux based operating systems. I can navigate terminal a little, I know how to "VIM". I am trying to give my machine a static IP. I need to get into and save an edited file ...
1
vote
1answer
105 views

Tmux: How to move current pane to far Left/Right/Up/Down like in Vim

In Vim, pressing Ctrl-w followed by H, J, K, or L, moves the current window to the far left/down/up/right, without messing up any of the other windows' ordering. I'd like to implement this same ...
0
votes
1answer
87 views

gq in vim resulting in shell error

When I highlight a line and press gq in visual mode I normally expect (neo)vim to wrap that line at a specific length; however, today neovim started overwriting the line with the following text: zsh:1:...
0
votes
0answers
19 views

Is there a way to make VIFM move into a directory but not launch a file on `l` or <right> key?

Currently when clicking letter l or arrow it moves into a directory or open a file. I am wondering if there is a way to make just change directory but not launch the file. Maybe move the "view&...
0
votes
1answer
78 views

How to open horizontal split that takes full width of the window in vim

I'm opening terminal in most of my project. I want to open the terminal in full width when there is already a vertical split in the window. It would be awesome If it can work with Nerdtree so It don't ...

1
2 3 4 5
73