Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [vim]

vim (Vi IMproved) is a text editor supporting different editing modes.

1
vote
1answer
24 views

High lighting a word in vim/bash

While I was working on the terminal (mac os) I pressed wrong combo then the 'def' word highlightend. I found it is very useful. How to turn on and turn off highlight on a word? (shortcut key, no ...
1
vote
1answer
29 views

setting `xterm-keys` in `tmux` affects Shift-Enter in `vim`

I enabled xterm-keys in tmux in order to have normal xterm key bindings like whole-word movement using the Ctrl-arrow keys. However, by enabling xterm-keys it causes Shift-Enter to have undesired ...
0
votes
0answers
22 views

Vimscript infinite loop

I'm trying to combine fzf-bibtex with UltiSnips so that I can search my bibliography file and insert a BibTeX key automatically. I use the following function from fzf-bibtex (which calls the binaries ...
-1
votes
1answer
28 views

hidden files and directories warnings

I received these rkhunter results; what are these files, and are they dangerous? [23:17:48] Checking for hidden files and directories [ Warning ] [23:17:48] Warning: Hidden file found: /etc/....
0
votes
0answers
51 views

Terminal(kitty) colors altering vim color scheme

I'm using the base16 color schemes for both my terminal(kitty) and vim. However changing the color scheme of kitty results in the color scheme of vim changing into something similar. The relevant(I'...
0
votes
0answers
41 views

In vim in binary mode what is a ^K character?

When I open a file with vim -b it displays ^K sometimes in the text, which cannot be removed by dos2unix. It prevents dos2unix from processing the file:dos2unix: Binary symbol 0x0B found at line 628 ...
1
vote
1answer
54 views

Binary executable file with write permission get READONLY from vim

First I know that use vim to write a binary executable program is not recommended. So, I don't want to talk about its rationality here. I have a binary program, with permission 755(owner is root), so ...
0
votes
2answers
87 views

How to do vi edit on bash Linux? [closed]

Almost 5 years ago, used to do something like VIEDIT (forgot exact word I used to use). Usecase - when I want paste bunch of lines of program or strings I do something like viedit (again I forgot the ...
0
votes
0answers
25 views

Is there an yum repository that contains vim with python 3 support?

I am using CentOS 7 and trying to install vim 8 without having to build it from source. Using ubuntu, the latest vim installed using apt comes with python 3 support. Is there such a repository for ...
1
vote
1answer
24 views

Is it possible in VIM to delimit an external (bash) command?

Given the following I want to write a file Change to the directory of the file Execute a bash command change to the previous directory I made the following command command Asc execute ":w | :cd %:p:...
0
votes
2answers
68 views

vim colorscheme completely wrong inside screen or tmux sessions

I've been trying for 3 days now to get my colorscheme to display properly inside of a screen session versus at the terminal prompt outside of screen or tmux session. I've read all the links and tried ...
0
votes
0answers
30 views

Vim statusline shows ^[[2;2R^[[>41;330;0c^[]10;rgb:e5e5/e5e5/e5e5^G^[]11;rgb:0000/0000/0000^G after mapping Capslock to Esc

I added au VimEnter * silent! !xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape' au VimLeave * silent! !xmodmap -e 'clear Lock' -e 'keycode 0x42 = Caps_Lock' to my .vimrc to map Capslock to Escape. ...
0
votes
0answers
48 views

shell expansions while in vim

Being in vim.tiny in command mode and executing some shell command with :!, is there a way that I can benefit from the shell expansions, namely from the filename generation? When I simply enter key, ...
2
votes
1answer
59 views

GVIM : Shortcut for finding end for particular begin in SystemVerilog language

Need a shortcut for finding the end for a particular begin in SystemVerilog syntax.
0
votes
1answer
25 views

How to use vim command-mode indention in ex colon-mode?

I am trying to script some file changes using ex per this answer. The issue that I'm running into is that ex seems to assume that every command is preceded by a colon, so while I can do something ...
1
vote
1answer
46 views

Copy to tmux copy buffer using command line

I use tmux to copy text while in copy-mode often, but what I'd like to do is copy text using command line instead of entering copy-mode. For example, when I'm in vim directly on my mac computer, I ...
0
votes
0answers
12 views

Vim with ruby support on fedora

Are there any packages in the fedora repos that have vim with ruby support enabled? It seems that debian has these packages but I am unable to find the same thing for Fedora.
1
vote
1answer
52 views

vim: How to insert output of shell command in-line?

Suppose I want to edit a new libvirt XML file: virsh dumpxml machine1 > machine2.xml Then I open the file with vim, vim machine2.xml and then I want to change the UUID. Now do this, I use :r !...
5
votes
2answers
564 views

Is possible to search in vim history?

On bash I press CTRL+R and typing vim bash return list of commands typed in past with vim string.Is possible to make something like this in vim history for commands starting with the : ?
0
votes
1answer
24 views

Vim freezes in insert mode when .vimrc contains set tags=tags;

I am using vim-gtk on Ubuntu 16.04 and use exuberant-ctags to generate a tags file in the root directory of my project. My instance of vim would randomly freeze in insert mode, usually after inserting ...
0
votes
2answers
116 views

Replace block of text with sed, awk, perl or vim

I am trying to replace every instance of a block of six rows with another block of six rows, just reducing the six rows block of two columns to a six rows block of only one column. Thank you to your ...
-1
votes
1answer
15 views

How to layout this bar with vimscript?

I'm trying writing a vim completion script, but I don't know how to layout this bar with vimscript. How to trigger this bar when in i mode(Can I make it with vimscript)? And how to customize the ...
0
votes
3answers
48 views

are there side-effects to remapping/aliasing less to vim?

I added the following to .bashrc to remap less to vim alias vsi='vim -R -c ":map Q :q!<enter>" -' # Vim Standard Input [readonly] alias less='vsi' the reason is that I don't want to maintain ...
1
vote
1answer
163 views

Can't install Vim on Debian 9

Sorry buy it's in spanish: ~# apt install vim Leyendo lista de paquetes... Hecho Creando árbol de dependencias Leyendo la información de estado... Hecho El paquete vim no está disponible, pero ...
8
votes
1answer
410 views

Why I don't see the difference between two different files in insert mode in vim?

Let's create two files: $ echo -n 'test' > test.txt $ wc test.txt 0 1 4 test.txt The file test.txt doesn't contain the trailing newline. $ echo 'test' > test_n.txt $ wc test_n.txt 1 1 5 ...
1
vote
1answer
28 views

Vim - How do I paste a inner-word to line above?

I always use the following commands to yank an inner word and then paste it in the line above: yiw -> O -> Esc -> p Obviously P by itself (without using O to insert a line above) doesn't ...
0
votes
0answers
286 views

failed to execute child process xterm (no such file or directory)

When I right click on a file and select vim from upcoming tabs I get this error. Some files of vim should missing. In addition I'm able run vim from bash but can't run from desktop. Debian 9.8 ...
0
votes
0answers
37 views

Open VIM with zle key binding

I would like to setup a bindkey to launch a fuzzy search across projects, home directories, files etc... and launch some command depending of the choosen file type. If the file is a regular file, I ...
0
votes
1answer
75 views

cat shows file contents, gedit and vim show blank file

I was planning on building a current logging device with an Arduino, and tried starting off with the basic SD-card write example from the Arduino IDE sketchbook. The Serial console showed no errors, ...
22
votes
4answers
2k views

How vim overwrites readonly mode? [duplicate]

Quite often we see that the file we are trying to save in vim after edit is reported to be read-only. The way around this is to add !wq, i am trying to figure out what internally goes that allows the ...
0
votes
0answers
20 views

No change while editing interfaces

I have old Debian Squeeze blackbox device connected via serial terminal. Trying to configure network by editing interfaces: vim /etc/network/interfaces When I finish and do save no problems was ...
0
votes
1answer
366 views

How can I set the default editor as nano on my Mac?

I have vim as default editor on my Mac and every time I run commands on Mac terminal, it automatically opens "vim". How can I set up "nano" instead and make sure the terminal will open "nano" every ...
1
vote
1answer
35 views

Vim - opening man pages

I'm aware that exists a shortcut to open manpage of current function (the function cursor is on), but I can't recall how to do that.
0
votes
0answers
30 views

Best way to get rid import error in `vim-latexsuite`

I'm running Arch Linux and I have the vim-latexsuite package installed. A while ago I noticed started getting an error whenever I opened a .tex file: Traceback (most recent call last): File "<...
0
votes
1answer
39 views

How to split a window with terminal below in vim with predefined size

What I want is something like: :below 10sp Then open the terminal: :terminal ++curwin This two commands do exactly what I want but I don't know if it is the best way.
1
vote
1answer
50 views

How to open multiple man pages in split in vim?

From View man pages in Vim, I learnt how to open man pages in vim by adding the following lines to ~/.vimrc: " Enable viewing man page in vim by ":Man ..." runtime ftplugin/man.vim " Set keyword 'K' ...
0
votes
1answer
364 views

Privilege escalation with sudo vim

I have the following problem: I configured sudo with permissions for everything except for a few commands, remove, reboot, shutdown, block from sudo to shell, preventing a user from elevating the ...
1
vote
4answers
76 views

prevent vim from replacing % with file name

I am messing around with .vimrc and I had this idea to have function like follow: function Fill_line () execute "! printf '=%.0s' {1..10}" endfunction my output is: Hello =test.cpp.0s I ...
2
votes
1answer
73 views

Validate `~/.vimrc`

I want to validate that my ~/.vimrc file is correct, basically just by launching vim and immediately running quit. I can almost do this with vim -c quit, except that I have to press the enter key. For ...
1
vote
1answer
38 views

Remove multi line comments in vim

I want to remove a multi line comment in vim: /** * Factory for creating [MainViewModel] * * @param arg the repository to pass to [MainViewModel] */ I tried %s,/\*.*\*/,,gc but it doesn't work ...
0
votes
1answer
126 views

Close the file in vim without closing the file explorer

I am browsing the files in vim file explorer by entering vim dirname. Then I am opening the file, saving and closing it by entering :wq. Now the file explorer window disappears. How to prevent this ...
0
votes
0answers
88 views

How can I get neovim to load my init.vim file when in sudo mode?

I'm having an issue with neovim on a Raspberry Pi coding with Python. I have installed it by sudo apt-get install neovim, and it works using just the nvim in commandline. For some reason I can create ...
1
vote
1answer
45 views

How to get clipboard as input file name to Vim on bash?

I install xclip to access system clipboard, my setting and some operations as below: ➜ ~ cat .zshrc | grep xclip alias c="xclip -selection c" alias v="xclip -selection c -o" ➜ ~ which dict | c ➜ ~ ...
2
votes
0answers
159 views

How to edit a 100GB file in Linux?

I have a file that has several times my RAM capacity and I need to edit it, search for some expressions, etc. I've tried Vim (with LargeFiles plugin and CTRL + C trick), joe, shed all without luck. ...
1
vote
2answers
71 views

Why updates overwrites Vim that built from source?

I build Vim from source, and install it with checkinstall. Soon after Software&Updates warned there is an update for Vim. But after the installation, Vim path is altered and another build take its ...
0
votes
0answers
48 views

Output in terminal after quitting program

I'm using Kubuntu with i3, and I've recently migrated from Manjaro because things. My terminal emulator is urxvt but, when I use programs such as vim, less or nano in the terminal remains the part of ...
1
vote
3answers
82 views

Nailing down vim regex substitution

I started using Vimwiki to document weekly progress on my projects last year. As the year rolled on, the format of my list of links to weekly wikis changed a bit. At the end of the year I decided to ...
2
votes
0answers
47 views

Vim editor universal config for copy/paste on multiplatform environment does it exists? [closed]

I spend a lot of time to get comfortable working with Vim, and I am there right now, except one thing. Also it look like Vim has advantages in many cases working on embedded programming or kernel ...
1
vote
0answers
69 views

Need to edit a single file in a tar.gz using Python [closed]

Vim provides the ability to edit a single file in a tar.gz without unarchiving. ( i.e. vim some_archive.tar.gz ) How could I script the same type of operation using Python?
0
votes
2answers
122 views

How to make Readline in vi mode to read .vimrc?

When using Readline's vi mode in Bash, I can use command v from normal mode, to open the current command line in Vim for editing. However, in this case, Vim does not read my ~/.vimrc file, so none of ...