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
0 votes
1 answer
194 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 ...
ekaeo's user avatar
  • 1
2 votes
1 answer
1k 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 ...
neubert's user avatar
  • 7,092
2 votes
0 answers
63 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 ...
Dirich's user avatar
  • 121
0 votes
1 answer
368 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 ...
LordRishav's user avatar
1 vote
1 answer
1k 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, ...
harshrathod50's user avatar
0 votes
0 answers
63 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='%(...
Pranjal Doshi's user avatar
0 votes
1 answer
149 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 ...
hppyHNGRYslpy's user avatar
2 votes
1 answer
2k 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 ...
WalksB's user avatar
  • 185
0 votes
1 answer
177 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:...
knpwrs's user avatar
  • 1,403
2 votes
1 answer
1k views

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

I'm opening a 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 ...
s1n7ax's user avatar
  • 181
0 votes
0 answers
219 views

Vim doesn't change the directory in the title bar when the working directory is changed

I have only the Working directory or document and Active process name preferences checked for Terminal window titles. Then in VIM I use a custom titlestring. The title bar is displayed as "<...
shoe's user avatar
  • 121
0 votes
2 answers
228 views

Archlinux vim access in tty1 for editing resolv.conf

I installed Archlinux in Virtualbox and the installation has gone smoothly. I faced issues in pacman - temporary name resolution failure. When I read online, one of the solution was to update the /etc/...
Sachin's user avatar
  • 1
0 votes
2 answers
659 views

How to recover a deleted text file that is still open in vim?

I have text file that is still open in vim, but the original text file has been accidentally deleted. How can I recover it? The text file is still open in vim, so its original data is still stored in ...
Amir reza Riahi's user avatar
7 votes
1 answer
2k views

How to use vim to open files that begin with a plus sign (for example +foo.out)?

In my file system, I have some files which start with a plus sign. When I try to open these with vim an error is thrown. For example, when typing... vim +foo.out I get the following error... Error ...
John's user avatar
  • 73
0 votes
0 answers
26 views

Getting an error when attempting to change the path written in CMakeLocal.Local is located

So I'm trying to change the path written in CMakeLocal.Local to where the FFTW is actually installed. However, I get a syntax error: I assume the error is due to the text editor but I've used vi/vim ...
Linus's user avatar
  • 1
0 votes
1 answer
536 views

Share Nvim configure with other user?

Im currently using NeoVim and appearently it can only run with root privilege. When Im using a normal user and try nvim, it show the error : rror detected while processing /home/tuananh/.config/nvim/...
Ta219's user avatar
  • 3
0 votes
1 answer
116 views

vim what does %s/()()/()/g do

I used vim for developing one Go script, I intended to replace ()() with (), so I used %s/()()/()/g, and then I need help to understand its result: ()p()a()c()k()a()g()e() ()s()u()b() () ()i()m()p()o()...
Tiina's user avatar
  • 3,157
0 votes
1 answer
296 views

Does `yank` mean copying, pasting, or either in Emacs?

While yank means copying in Vim, I am a bit confused about Emacs. What does yank mean there exactly?
t7e's user avatar
  • 701
0 votes
1 answer
479 views

Tmux: Make vim command open buffer in the already running vim instance

I'm usually running one tmux session for all the work I do, with per-project tmux windows (tabs). Each tmux window has one big split running vim and one or more splits with shells/processes related to ...
Crazor's user avatar
  • 146
0 votes
1 answer
79 views

Remapping default bindings vim

When I press ctrl+h in insert mode vim cuts character to the left. I have tried: noremap h <NOP> inoremap h <NOP> noremap <C-h> <NOP> inoremap <C-h> <NOP> to ...
beardeadclown's user avatar
1 vote
1 answer
178 views

Tuning vim's less.sh: enabling persistent search history

So, I'm using vim's less.sh in place of standard less pager: alias less=/usr/share/vim/vim81/macros/less.sh However, I have a major and a minor problem with it. The major issue is that it does not ...
alamar's user avatar
  • 133
0 votes
1 answer
765 views

Change colour of comments in a server configuration file when opening from vim in putty

The comments in apache server configuration file, when I open them in vim through putty, are dark blue in colour over a black background and somewhat difficult to read Opening the file in vim in the ...
user13267's user avatar
  • 1,641
1 vote
2 answers
842 views

How do I move all of my dotfiles to a custom directory?

I'm a Mac user and I was wondering if there was a way to put all of my dotfiles to a .config folder to store all of them (something analogue to XDG Directories on Linux). I was trying to set up a ....
baggiponte's user avatar
3 votes
1 answer
2k views

Windows Terminal Ctrl key not working

I have a Ubuntu machine on the internet. I've used Windows Terminal to open PowerShell then used the Windows ssh command to connect to the Ubuntu machine. Finally I ran vim on the remote machine. I ...
Martin Brown's user avatar
0 votes
2 answers
2k views

Finding the encoding of a text file containing weird characters

I recently received a file, of Turkish origin, where the file has some English words which I can easily read, and some weird characters. I wonder if this file is encoded, encrypted or sth else. I ...
Sean Goudarzi's user avatar
1 vote
0 answers
188 views

Missing functions when installing vim to a local directory

I tried to install vim on a local directory by giving the --prefix command when running ./configure. More specifically, this was what I did: # Installed ncurses locally on $HOME/local/gpu2 cd vim/src ...
Tim Mak's user avatar
  • 141
1 vote
1 answer
1k views

Using Vim keybinding to scroll page up and down in tmux on Mac

I'm using Tmux on MacOS10.14.6 and want to scroll up and down with vim's keybindings. I can scroll with the arrow key using Ctrl-b, then [ and then the arrow keys (↑, ↓, ←, →). Instead of the arrow ...
ecjb's user avatar
  • 121
0 votes
1 answer
790 views

Is it possible to map control forward-slash with vim

Hey wondering if it is possible to map control + forward-slash in vim. The mapping would be for normal mode if that makes a difference. Have tried <c-/> but that didn't work. Tried looking at ...
RobStallion's user avatar
1 vote
2 answers
2k views

How do I resolve a keybinding conflict with coc for vim?

Just as a preface, I'm not a programmer, but I've written a bit of shell to automate things. This is on MacOS Mojave, but it shouldn't make too big of a difference since neovim's configs should carry ...
wildwestrom's user avatar
2 votes
1 answer
2k views

Vim installed with Git for windows does not work correctly in PowerShell

I am on Windows 10. I first installed Git for windows and then I installed posh-git in PowerShell. Git installed fine into the folder C:\Program Files\Git which included vim.exe in C:\Program Files\...
Håkon Hægland's user avatar
3 votes
2 answers
347 views

Viewing wide terminal output in tmux

I enjoy using psql with Tmux and Vim, using Vim to edit my queries and send them to psql in another Tmux pane. This is a fantastic workflow, far superior to a GUI like DBeaver in my opinion, but: It ...
LondonRob's user avatar
  • 425
1 vote
2 answers
147 views

gvim 8.2 doesn't redraw the screen when editing a git commit message in windows 10 powershell

I installed vim on windows 10 using chocolatey. When I edit a file in powershell, everything works great! I even got copy and paste to work. However, when I edit a git commit message, vim doesn't ...
Heath Borders's user avatar
5 votes
1 answer
3k views

Configure gvim swap, undo, and backup files on windows

I installed vim on windows 10 using chocolatey. When I edit a foo file in powershell, vim leaves behind .foo.un~ or .foo~ files. What are these and how do I stop vim from leaving them around?
Heath Borders's user avatar
1 vote
1 answer
675 views

gvim 8.2 doesn't paste on windows 10 in powershell

I installed vim on Windows 10 with chocolatey. Copy and Paste don't work when I invoke vim in powershell. I expect them to work as long as I'm in insert mode. How can I make copy and paste work?
Heath Borders's user avatar
1 vote
1 answer
837 views

Mapping Shift+Arrows to select text in tmux with vim

I use vim in linux and have recently started to use tmux too. I use vim with the Windows shortcuts instead of the vim ones, for example; Shift+Arrows for selection instead of HJKL, Shift+Arrows for ...
Tom's user avatar
  • 11
2 votes
1 answer
1k views

Using tmux copy mode just like vim

I'm trying make use of the copy mode of tmux to copy some part of text in one of my panes but I cannot really manage with it, spacebar is not working to select the text and I'm getting a bit lost. ...
freddie_ventura's user avatar
3 votes
2 answers
4k views

Default vim colorscheme in Debian?

In every Linux system I install or I happen to log into I want to use the same vim colorscheme, e.g. the default one Debian uses, because I usually use Debian and I like the default colorscheme. What'...
Lucio Crusca's user avatar
16 votes
5 answers
19k views

How to copy from vim to clipboard on ubuntu 20.04

I am trying copy text in vim and then i use the *y, but pasting it into a browser does not work. I am using ubuntu with i3 tiling manager. Can someone help with this?
David's user avatar
  • 299
1 vote
1 answer
571 views

Copy mutliple line in vim until empty line

I would like to yank some lines beginning from 'some_code_to_copy' until the empty line and then do the same for 'some_other_cody_to_copy' in vim. some_code_to_copy(){ statement; statement; ...
Amit's user avatar
  • 43
1 vote
1 answer
713 views

VIM go back (CTRL-O) to already opened tab

When I do gf then file under the cursor is opened in current tab. That's fine. When I do CTRL-W gf file under the cursor is opened in new tab - that's fine, but when I do CTRL-O newly opened tab is ...
Artur Pyszczuk's user avatar
0 votes
1 answer
133 views

vim: unable to match character after new line properly

In vim, I'm trying to match all lines that has ^A. but not followed by a B. on the next line. I'm matching it with /\v^A\. .*$\n[^B]. This correctly identifies the relevant portion in question 2., but ...
sathishvj's user avatar
  • 427
0 votes
0 answers
115 views

Passing BibteX options in Vim-Latex

My current Latex workflow involves using Mendeley to automatically create .bib files. These bibfiles are stored in a Mendeley directory in my home folder. Because I don't want to have all my projects ...
typewriter's user avatar
0 votes
1 answer
1k views

How to move to next line and enter insert mode at same indentation level in Vim

I am using VimIdea in IntelliJ. How can move to the next line from normal mode and enter insert mode matching the indentation. While in normal mode, using o creates a new line and enters insert mode ...
CodeTalker's user avatar
1 vote
1 answer
284 views

vim syntax file, how to mark everything after the word END as a comment?

i am writing a vim syntax file and would like to highlight everything after (but not including) the word END until the end of the file as a comment. thank you for any help!
inatreecrown's user avatar
1 vote
1 answer
1k views

Understanding and using \& in vim search-and-replace

I have come across the following specifier for a vim pattern on http://vimregex.com/: \& -- the next line where the previously used substitute pattern matches And not quite sure what an ...
David542's user avatar
  • 259
1 vote
1 answer
1k views

In notepad++, can I paste a block of lines adjacent to the existing block of lines

Existing file aaaaaaaaa nn mm kkkkkk ll o I want another block of lines just next to this block of data. if I have few lines copied in the clipboard(either from same file or from a different file), ...
Franc's user avatar
  • 141
0 votes
1 answer
1k views

how to copy all code in vim with invalid register name?

I'm trying to select all the code in my vim editor in a putty session on my windows 10 and paste it on notepad in windows 10. once I get into vim with terminal command vim code.s on ubuntu I've tried ...
rongfiggs1999's user avatar
3 votes
2 answers
2k views

How do I exit vim, that is within emacs term mode with evil?

I am trying to make transition from vim to emacs (specifically doom-emacs). I was using term mode and habitually used vim in an attempt to edit another file forgetting that I was inside emacs. I ...
Yao Wei's user avatar
  • 33
2 votes
0 answers
707 views

Why does Vim think it is still running?

This is a follow up to this question: Why doesn't vim always give me the option to delete a swap file? My laptop died with some Vim sessions open. These were all files I had already saved, so I ...
Dominick Pastore's user avatar
0 votes
1 answer
513 views

Git permanent cache password

Is there a way to use git config --global credential.helper without a timeout? i.e. have it never ask for my password again?
Thaddaeus Markle's user avatar

1 2 3
4
5
75