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.

0
votes
1answer
21 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
15 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
29 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
41 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
51 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
22 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
82 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 ...
1
vote
1answer
43 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
47 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
22 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
38 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 ...
0
votes
0answers
8 views

Cannot navigate nor use keybinds in neovim quickfix or location window

I’m trying to use the make command, but I cannot navigate in the quickfix window except than by using commands. If I press any key other than the command prefix (:) it closes. I also cannot use ...
0
votes
0answers
17 views

Why doesn't vim mouse in WSL work in any terminal emulator other than Windows console?

I can open the vanilla Windows console, type "bash," and use vim with mouse mode (placing cursor, scrolling, etc.). However, it DOES NOT work with the terminals in: Atom VS Code Cloud9 MobaXTerm ...
0
votes
1answer
21 views

Highlight colored syntax off when refresh in vim issue

Currently I'm using ctags and highlighting colored syntax in vim. but problem is that the colored syntax highlighting off when I refresh the vim window with "e!". my .vimrc is syntax on set exrc ...
1
vote
1answer
14 views

vim is using previous version of vimrc under some circumstances

Funny thing is happening to me on vim: I made some changes to a user's ~/.vimrc in order to customize the status line with a simple function (the changes were made on several saves while I refined the ...
2
votes
1answer
20 views

Stop vim indenting new lines after comma in plain text files

I use vim/gvim as my default text editor. When I'm editing plain text files with no syntax highlighting, it automatically adds indentation when I press enter, if the last character on the finished ...
0
votes
1answer
41 views

Open file as a tab in vim with double click

Could anyone suggest me how to open multiple files in a vim with a double click from filesystem. Currently I can open multiple files in vim using: :tabe NERDTree file navigation using gVim But I ...
0
votes
1answer
24 views

Configure accents for vim in cmder

I'm having problems to get accents work in vim under cmder. I open vim and try to write an accented letter like "á" or "ñ" and it does not render anything, but non-accented characters are written. My ....
0
votes
0answers
28 views

Taskwarrior with Timewarrior - cannot overlap intervals

I have a setup with VimWiki, TaskWarrior/TimeWarrior and TaskWiki. Yesterday I observed, that some task wheren't tracked, because I couldn't get a timew summary of it. When I started those task from ...
0
votes
2answers
41 views

FTP with Terminal and Vim

Is is possible to transfer files from local machine to server using FTP and terminal. For instance, can I create a file locally with vim, write my code, save it, then transfer that to a server without ...
0
votes
1answer
108 views

Using Solarized 'high' diffmode with vim-fugitive 'Gdiff'

I'm using the main Solarized colour scheme without any problems but when using Gdiff from vim-fugitive the high contrast diff mode is not selected. I've placed the following in my ~/.vimrc: set ...
0
votes
1answer
15 views

vim (vimdiff) errors before opening every file with git difftool

"~/Desktop/project/file.txt" [readonly] 81L, 2480C Error detected while processing command line: E344: Can't find directory "src/" in cdpath E472: Command failed Press ENTER or type command to ...
0
votes
0answers
53 views

Vim in terminal behaves middle-click as paste

In normal mode of the Vim, I'm expecting middle-click to send the selection text as Vim's command but Vim automatically insert the text to the buffer. How can I avoid this behavior? For example, ...
0
votes
0answers
16 views

Make Vim continue only some types of comments on the next line

I want Vim to continue /*...*/ comments on the next line by automatically inserting the comment leader, but to end // comments after a single line. The Vim wiki recommends: autocmd FileType c,cpp ...
2
votes
1answer
67 views

Vim: Delete all blank lines until first non-blank line

I have some text like this: Line 1 of text Line 2 of text. I want to delete all the blank lines between the two lines of text. I could put my cursor under the first line and type 5dd, but I'm ...
1
vote
0answers
20 views

Vim session with splits with remote ssh files

I use to use vim session to keep my opened files. I do it remotely, ssh remote machine and do things there. Today I tried to open remote files in local Vim, I mean with netrw: :e scp://user@remoteip/...
0
votes
1answer
31 views

Generate ctags for gVim to replace visual-studio intellisense

I am trying to generate ctags to use within gVim that would allow me to get the same kind of experience I get while using visual studio. My problem is that when I generate ctags inside my project, ...
1
vote
1answer
76 views

Extending formatoptions in vim

With my default settings, theformatoptions flag is tcq for text files, and croql for C++. I don't like that it autowraps the text, so I put this into my vimrc: autocmd FileType text set formatoptions-...
0
votes
1answer
27 views

how do you get 'screen-line' line numbers in vim?

I know that in VIM you can do :set number, but still if a line wraps then it counts as two one line. What vim called linewise. I can go up and down in a 'screen line' manner with gj and gk, so even ...
1
vote
2answers
33 views

Use vim in pipeline to dump current line on exit to stdout?

Is it possible for me to do something like this: $ ls | vim | xargs ... and have vim pass to stdout any lines that were visually selected on exit? If it'd be easier to just dump the "current line" ...
-2
votes
1answer
99 views

what's the correct command use vim copy to clipboard as the clipboard supported version has installed?

I'm using Manjaro, and open clipboard: ➜ ~ vim --version | grep "clipboard" +clipboard +jumplist +persistent_undo +vertsplit +emacs_tags +mouse_dec -sun_workshop +...
0
votes
2answers
32 views

Flexible renaming in terminal

Say I have a folder with some files: /Users/user101/Temp/rentest: ls fi_name1.txt fi_name2.txt fi_name3.txt I am looking for a flexible renaming method. For example if I do: /Users/user101/Temp/...
0
votes
0answers
75 views

Zsh does not enter vim mode

I have the following setup on Ubuntu 14.04. Here is my .profile which switches to zsh because I don't have permission to run chsh: export·PATH=$PATH:$HOME/bin export·SHELL=$HOME/bin/zsh exec·$HOME/...
0
votes
1answer
41 views

vim airline arrows misaligned

The arrows should look like this: here's what they currently look like How do I fix this?
5
votes
2answers
840 views

How can I Insert the result of a “.w” evaluation at the end of a line in Vim?

I'd like to be able to evaluate a line of Javascript (or other code) in Vim, and have the result appear in a comment at the end of the line. For example, if I have a file like: console.log(4 + 5); ...
1
vote
0answers
163 views

Alias file not working in Bash on WSL (Opensuse Leap 42.3)

I have my alias file set up like so in Bash in WSL: alias gvim='/mnt/d/Vim/vim81/gvim.exe' alias vim='/mnt/d/Vim/vim81/vim.exe' alias pngcrush='/mnt/c/Users/nathan/Downloads/pngcrush_1_8_11_w64.exe -...
2
votes
2answers
264 views

vim fails to load dynamic library

I just upgraded brew: brew update and brew upgrade and it broke vim. Running vim gives this error: dyld: Library not loaded: /usr/local/opt/perl/lib/perl5/5.26.2/darwin-thread-multi-2level/CORE/...
0
votes
1answer
409 views

How to use gruvbox airline theme?

I'm trying to use the gruvbox airline theme with my gruvbox color scheme but there doesn't seem to be an official airline theme for gruvbox. https://github.com/vim-airline/vim-airline-themes/tree/...
1
vote
1answer
175 views

How to switch between terminal, nerdtree and text editor?

I normally switch screen in vim using ctrl+h or ctrl+l to switch between NerdTree and vim main window. Vim8 got :term command to bring up terminal which is great! But I cannot figure out how to switch ...
0
votes
1answer
335 views

Recent brew upgrade breaking vim

This question is closely related to this question where I got a very similar error message when launching vim after doing a brew upgrade: dyld: Library not loaded: /usr/local/opt/python/Frameworks/...
0
votes
1answer
26 views

Can I configure vim to set noswapfile when editing a file that exists in a git repo

What vim APIs and facilities could I use to disable vim swapfile (the hidden recovery file) for a given buffer if the file exists in a git repo? Inside git repos I also want to enable an autosave ...
0
votes
0answers
30 views

how to make vim to have python interactive runtime window

Is it possible to have python live program mode window open in python so we can call program and see the live outcome straightaway instead of jumpout vim to CMD? It is a bit like VisualStudio setup.
0
votes
1answer
34 views

How to map python2.7 and python 3 to both VIM

In linux I have configured nnoremap <buffer> <F9> :exec '!python' shellescape(@%, 1)<cr> to map python2.7 to my vim How can I have both Python2.7 and python3 run on new ...
0
votes
1answer
22 views

shell command on matching line (in vim: combine the global `:g` or `:v` command with shell command)

I want to use a shell command (fmt in this case) to operate on every (non-)matching line of a regex in a file. I'd prefer to do it within vim! I am, nonetheless, open for a pure shell/bash/zsh ...
2
votes
0answers
138 views

View different parts of a file, in different terminals, scrolled in synchrony?

Two terminals, on different machines, viewing consecutive parts of a file in vim. You scroll/move cursor in one terminal, and the other moves the same relative amount. So you get one logical window ...
1
vote
1answer
60 views

Map “insert” key for ViM in RStudio to enter “insert” mode

I started using the ViM mode for text editor in RStudio (1.1.453). I can get into the "insert" mode using the 'i' key, but not using the "insert" key. I looked through the "Modify Keyboard Shortcuts", ...