Stack Exchange Network

Stack Exchange network consists of 174 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 is a highly configurable text editor built to enable efficient text editing. It is an improved version of the vi editor.

1
vote
0answers
5 views

Color scheme not affecting whitespace in Vim

I have been trying to add a color scheme to my .vimrc, but for whatever reason it's not wanting to highlight the whitespace to the right of my lines. Here's what my .vimrc looks like right now under ...
0
votes
0answers
11 views

how can I open a terminal split in vim 8.1 without switching to it or going back to the previous split inside a vimscript

Basicly I want the following functionality: Using vims new terminal functionality, I want to be able to press a button, that opens a new terminal window, without stealing focus from the file I'm ...
0
votes
0answers
7 views

Vim always stay on the last line in output buffer

So I made myself a build console ini vim using the following funciton: function Printbuild() "let logjob = job_start("cmake\ -Bbuild\ -H.\ &&\ cmake\ --build\ build/\ --\ -j4\ -w", {'...
0
votes
1answer
30 views

Can I open a split build window in gvim 8.1 that shows the build output live while I can continue looking at code?

I like using gvim but I think its kind of time consuming to have to always watch the build process complete until I can continue editing. I'd like to just hit a key and have a bottom split open up ...
0
votes
1answer
32 views

Vim run command in background, but show output live in vsplit

How can I run a terminal command (for instance build) in vim while working on a file, while simultaneously showing the output live in a vsplit?
0
votes
0answers
8 views

Ubuntu 16.04, uninstalled python, now vim is broken and I can't fix it

I was having some problems with conflicts between my Anaconda python installation and my system Python on Ubuntu 16.04, so I decided to remove the system python packages. Apparently that was a bad ...
0
votes
1answer
52 views

softlink to gvim opens regular vim instead

I have made a softlink inside /bin/ that points from gvim to v, so I can just type v in console it would open up gvim. But instead it opens the regular console version. How can I make it open gvim ...
0
votes
0answers
33 views

editing what .sh files do on install

I'm trying to install Anaconda on my laptop running the latest version of elementary os. I followed the steps on the official site. http://docs.anaconda.com/anaconda/install/linux/ However when I ...
-2
votes
0answers
41 views

How to create the .vimrc file with windows 10

So I am using windows and vi (not vim) but I don't know how to create my .vimrc file. I have looked at other questions on stack exchange and online and I can't get _vimrc to work. I also tried using ....
0
votes
1answer
36 views

How to set vim as the default Text editor?

I'm trying to set gVim to be the default text editor on Windows but it won't work. It works with notepad++, editor... but not with Vim. Any ideas how to fix it? Screenshot: http://prntscr.com/lm069a ...
0
votes
1answer
28 views

VIM - running a shell command fails within a macro

I have a list of items in a file, and I am trying to add an id on the line before each one. The id is generated by an external shell command and added to the buffer: :r !php _setup/getid/php item | ...
0
votes
0answers
50 views

How to make Vim play nice with Python 3.7 on Windows

I want to use Gvim 8.1 with some plugins, but some of those mostly require Python 3.7 Fine, I found one Gvim installation ( https://github.com/vim/vim-win32-installer) that was compiled with Python 3....
1
vote
0answers
21 views

How do I hide empyy lines in a Python file in Vim?

I have some empty lines showing as dark purple lines in my color theme in vim(Gvim). I would like to hide them for real. I use "set list" but that just replaces with some other characters. I just ...
0
votes
1answer
40 views

Install vim plugins without internet in windows

I have installed vim in windows. But I can't install vim plugins. I tried putting files in vim folder. But it is not working.
1
vote
1answer
24 views

How do I use a custom vimrc file?

I have just started using vim and I find a bunch of vimrc files online. How exactly do I tell vim to use this vimrc as the default vimrc. I know I can copy every time but is there a better way to do ...
-1
votes
1answer
39 views

vim error 'E45: 'readonly' option is set' on a file with write permission Debian 9 vim 8.0.707

I wonder why I have the error in title while the edited file have write bit enabled and the good user : # ls -l /etc/hosts -rw-r--r-- 1 root root 693 Nov 15 09:46 /etc/hosts # whoami root Any idea ?...
0
votes
0answers
38 views

How to set scrolling speed of vim like set mouse=a when mouse=v?

I wonder how it's possible to set scrolling speed. As is, when I scroll with my mouse in command or edit mode, it moves only one line at a time. I prefer to move by example 3 line at a time. (speed ...
0
votes
1answer
17 views

vimrc changes to not affect vim sessions, settings do not persist

I'm trying to change my tabbing to 2-spaced width tabs instead of the default 4 spaced width. My vimrc file looks like: " Configuration file for vim set modelines=0 " CVE-2007-2438 " Normally we ...
0
votes
0answers
30 views

vim color scheme breaks when using tmux

I am using Ubuntu 18 LTS, gnome-terminal, with vim 8.0. When I am not using a color scheme, vim looks the same when launched inside or outside of tmux: However, when I use a color scheme (in this ...
0
votes
0answers
48 views

tmux interfering with vim mouse commands, depending on pointer location

For several years, I've been running an environment that very smoothly uses vim inside of tmux. But they've recently started fighting with one another, and I don't understand why. If the mouse ...
0
votes
1answer
21 views

How to pass selected text in Vim as external program argument?

I want select some string in visual mode (v) and send it to any external program (e.g. tmux send-keys) I tried use xargs: switch to v (visual mode) select some words press : getting :'<,'> ...
0
votes
0answers
10 views

Editing file in the same directory using neovim

I'm using neovim on windows, as per this vim guide, I have added these two lines to my init file :set shellslash :nnoremap <leader>e :e <C-R>=expand('%:p:h') . '/'<CR> This only ...
-2
votes
1answer
36 views

What time is it? - Fewest number of keystrokes in vim? [closed]

Task: display current time to the vim user. It is not a matter of inserting the time into a document, which one can easily do with e.g. !!date. In my question, the user simply wants to know what time ...
1
vote
0answers
39 views

True Copy/Paste shortcut remapping in X11

Can I use CMD-C and CMD-V to trigger the X11 clipboard functionality? I do not want to remap CMD to send CTRL. This is not just about ergonomics and muscle memory. Existing answers seem to ignore the ...
0
votes
1answer
23 views

Vim: Operator pending mode remaps not working

I'm trying to build a vimscript can be used with the Dvorak Simplified Layout. I.e., given that the keys on the keyboard plugged into the computer are laid out in the Dovark Simplified Layout (and the ...
2
votes
1answer
41 views

How to edit protected files on mac

I've just bought a new mac, I'm trying to edit the DockMenus.plist file from Dock.app to remove finder from dock like I've done with my previous macs. However, on saving, vim prompts this error: "...
0
votes
1answer
37 views

Is there a way to open tmux while inside vim?

Lets say I open vim to edit a file but I forgot to open tmux, I would usually quit vim then run the tmux command then run vim again, is there a way to streamline this to open tmux while in vim. I ...
1
vote
2answers
49 views

How do I make <Ctrl-a><Ctrl-c> copy and select all in vim?

I know :%y+ is a convenient way to select all and copy to the system clipboard--which works on my system--but I'm so used to using <Ctrl-a> <Ctrl-c> that I'd like to use the same keystroke ...
2
votes
2answers
16 views

Remove up to a character and insert space

Given I have text such as: (* is cursor position) let(:study) { FactoryBot.create :study*, site: site } And I want let(:study) { FactoryBot.create :study } At the moment I do ct}, press space ...
1
vote
0answers
11 views

vim: mapping a shortcut to save all files opened in tabs

I have this in ~/.vimrc: noremap <C-s> :wa<CR> Now, when I press Ctrl-s, it saves current file (tab) only. If files are modified in other tabs, it does NOT save them. At the same time, ...
3
votes
2answers
261 views

How can I redirect output from stdout into vim? [duplicate]

I would like to view the output of echo in vim, and save to a file after having a look at it. I have tried echo $PATH | vim, but I get the following error: Vim: Warning: Input is not from a terminal ...
0
votes
2answers
31 views

How do I prevent a leading newline in Vim when using :r!date and other shell commands?

Most of the time when I'm inserting a date, I'm trying to do it in the middle of a line. By default, it looks like the :r! flavor of insertion always puts the result on a new line. This makes some ...
1
vote
1answer
38 views

How to add a number to string\d

I want to replace a file's all string\d\+ For example string10 to string 20.I tried using s/\(string\)\d\+/\1\=submatch(0)+10 I know \= is judge \1 is exist or not .But help: submatch use like this....
0
votes
1answer
60 views

Missing Vim registry `*` on Windows 10 WSL? Not really :)

For the bare version of Vim that comes with WSL on Windows 10, attempts to "yank to registry *" will fail with the following error message: One way to reproduce the symptom is to assign the following ...
3
votes
1answer
22 views

How to type ặ̀ in vim

So vim has a great feature digraphs for entering special characters like á. But it seems to be limited to just 2 characters (hence the "digraphs"). What I'm wondering though is what the vim way is for ...
1
vote
1answer
29 views

install vim for all users

I've cloned and then compiled vim using this guide: https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source After running configure I ran make VIMRUNTIMEDIR=/usr/local/share/vim/...
0
votes
1answer
19 views

Mapping a command not the same as writing command in vim terminal

I'm trying to use a mapping in my vimrc to execute a command. The command works if I directly type it into the vim terminal, but when I use the same command it stops typing it after the first space. ...
0
votes
1answer
35 views

How to enable both this vim feature: mouse cursor move and paste with middle mouse in same time?

I would like to have two features in VIM Mouse Cursor Movement Paste from global clipboard with middle mouse For the first feature I can set mouse=a and the second mouse=r. Separately these ...
0
votes
1answer
42 views

Tabs in Xubuntu terminal showing up as characters

I'm writing code using Vim in my terminal in Xubuntu 14.04, but when I hit tab, instead of showing whitespace,it looks like this: I've tried to search for a solution but haven't found anything. ...
0
votes
1answer
38 views

nvim: langmap doesn't work with alt?

I run nvim 0.1.7 in gnome-terminal. I map a-a to something and set langmap so that I can use the same shortcut when entering in other language: nnoremap <a-a> :echo 'it works'<cr> set ...
0
votes
1answer
60 views

vim: alt mappings conflict paste mode in terminal

I use vim in terminal. Sometimes I want to paste text from outside into it, but avoid autoindent, abbreviations and such. Vim has paste mode for it, but when I enable paste mode most shortcuts stop ...
1
vote
1answer
71 views

vim: prevent composite mapping from acting as its suffix

I have mappings to copy/cut/paste to/from register: nnoremap <c-r><c-c>a "ayy -- copy current line into register a nnoremap <c-r><c-x>a "add -- cut current line into ...
0
votes
0answers
29 views

vim if_pyth and python GIL: is vim.current.buffer thread safe?

vim does not provide multi-threads support, but the python extension make it possible to create multiple threads. vim if_pyth provide access to vim variable via object like vim.current.buffer. The ...
2
votes
1answer
105 views

diff each individual line in first file against all lines in second file?

I have 2 TCL representations of a project that get generated by 2 different versions of the same tool, let's call them v1.tcl and v2.tcl These logs are normally logically identical for all intents ...
3
votes
1answer
84 views

Is it possible to use vim key bindings in iterm2?

I want to use w for next word and b for previous word. If I could do more than that I would be even happier. I use bash if that matters.
0
votes
2answers
62 views

Vim: c-del in command line mode

Is there a shortcut to "delete till word start boundary" in command line mode (similar to dw in normal mode)? I want to remap C-Del to it. If no, maybe there is another way to make C-Del work?
1
vote
2answers
35 views

need to delete all lines from file that are contained in the line below

I have some files that look like this: 0 04 040 040t 040te 040tes 040test 040test2 041 041t 041te 041tes 041test 041test1 0n 0ne 0ne- 0ne-o 0ne-os 0ne-osx I need to delete all the lines that are ...
0
votes
1answer
58 views

YouCompleteMe can't import libtinfo.so.5

I tried to install the vim plugin YouCompleteMe. When I now start vim I get the error The ycmd server SHUT DOWN (restart with ':YcmRestartServer'). Unexpected error while loading the YCM core library....
1
vote
1answer
27 views

MacVim - how to make mouse based selection be “visual mode”?

Sometimes I select text in vim using the mouse. I'd like that selection to be treated the same as a visual mode selection, so I can immediately start running commands against it. Is there a way I ...
0
votes
1answer
40 views

How to use sed to remove "(double-quotes) on code lines while leaving them on real comment lines in a vimrc file?

On Ubuntu(Server/Desktop), I wish to remove a single " (double quotes) character from the beginning of lines in my /etc/vim/vimrc. This should be done for all lines that start with a ", but not if ...