All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
142 views

How to pass '\v\C[pattern]' into the built-in match() VimScript function

I am attempting custom fold logic as my first VimScript. What works for me: USING VERY MAGIC (\v) and explicit CASE SENSITIVE (\C), find python comments in foo.py that begin with hash, then Roman ...
Charles Kong's user avatar
0 votes
0 answers
115 views

How do I create the help system for Vim?

I built Vim from source and unfortunately when doing this the help system is not created (in other words you get an error if you execute :h). What is the procedure for creating the help system? This ...
Tyler Durden's user avatar
  • 2,041
0 votes
0 answers
47 views

Any way to add an existing Vim environment to a tmux session?

If I already have vim running with numerous documents open and I want to use tmux, it seems that I have to quit vim, start the tmux session and then reopen everything again. Is there anyway to start ...
Tyler Durden's user avatar
  • 2,041
0 votes
1 answer
46 views

How to show the left-hand side of insert mode mappings while invoking them in Neovim

Much like what was asked in this question: I want Neovim to show what I type, and keep recognising it as a mapping in progress even if I use Backspace or Delete. This is actually a very useful ...
Paul Kim's user avatar
  • 231
0 votes
1 answer
3k views

Vim Airline no GitBranch name [doing echo fugitive#head() shows correct branch]

I have Fugitive vim and Airline vim installed via Vundle. I installed them as follow: Plugin 'https://github.com/tpope/vim-fugitive.git' Plugin 'vim-airline/vim-airline' Airline status works fine. ...
mle0312's user avatar
  • 321
0 votes
0 answers
742 views

YCM is not working with .ycm_extra_conf nor compile_comands.json on Windows

I have problems using YCM plugged for C-family languages. Here are what I have done: project layout -- build -- src -- source file dir0 -- include main.cpp -- source file dir1 ...
Yukun Du's user avatar
0 votes
1 answer
69 views

Number in the beginning vs. number in the end

Yes, I know that d2e and 2de are two different commands and therefore works slightly different, though it's not visible to the eyes. Let's call them "number-in-the-middle" (nim) and "number-in-the-...
john c. j.'s user avatar
0 votes
0 answers
145 views

How do I get Vim (with TComment) to do proper block comments in OCaml?

(I have TComment installed, and I'm on NeoVim 0.4.0.) Given this code, for example: let mem key st = let is_matching_key = function | Positional _ -> false | Flag f -> f.name == key ...
ELLIOTTCABLE's user avatar
0 votes
0 answers
17 views

How to diagnose configuration---:w doesn't always work [duplicate]

I've somehow introduced a problem in my Vim configuration and I don't know how to track down where the problem is. Sometimes (most times) when I do :w then the buffer is not actually written; ...
jlconlin's user avatar
  • 113
0 votes
0 answers
17 views

How can I reproduce a Linting Plugin Behavior

I'm trying to get in to plugin writing, and currently I'm doing some builds (like Latex and LanguageTools checker), and I have in place hotkeys that call for the compilation, and It throws the output ...
ekiim's user avatar
  • 133
0 votes
0 answers
47 views

Ugly black thing when using :ls with colorscheme [duplicate]

I installed gruvbox color-scheme. Then I did :ls and saw this: After ".vimrc" there's some black stuff. It is kind of ugly and makes it harder to read. Is there any way to fix this?
CcVHKakalLLOOPPOkKkkKk's user avatar
0 votes
0 answers
45 views

Mapping Buffer Movement [duplicate]

How can I configure Vim and MacVim to respond to control-arrow and meta-{h,l} key-presses? The configuration below is ignored by both. I'm using iTerm2 (version 3.2.7), Tmux (version 2.8), and Vim (...
Ari's user avatar
  • 131
0 votes
0 answers
218 views

Editing file on remote host using scp not working

I'm trying to edit a file on a remote host using vim scp://user@host//path/to/file However, vim just displays "Stopped" and crashes. Here is the log thats produces when I run vim -V9 scp://user@host//...
Tristan Wiesepape's user avatar
0 votes
0 answers
173 views

BufRead autocmd error for "*.*" and E45

I have vim version 7.4.1689. It was running quite smoothly. But recently I noticed a problem that I didn't have before. Whenever I run :help <something> in command mode the following error shows ...
mahbubweb's user avatar
  • 562
0 votes
0 answers
61 views

Select characters in Visual mode (works differently than Normal mode)

I'm trying to understand the difference in character counting between Normal and Visual modes. Roses are red, Violets are blue, Sugar is sweet, And so are you. The task is to copy everything from ...
john c. j.'s user avatar
0 votes
0 answers
544 views

How to get the current word starting from the cursor?

In vimscript expand('<cword>') gives me the word under the cursor. How can I get the word under the cursor starting at he current cursor location (skipping the word start).
ideasman42's user avatar
  • 3,613
0 votes
0 answers
175 views

How to bind command+s to save file on macOS?

I have a Macbook. I want to save files by pressing command + s (this should happen if it is in insert mode or not, and I want it to go to non-insert mode after it is saved). How do I do this? ...
user2719875's user avatar
0 votes
0 answers
1k views

How does (neo)vim set $PATH for system(['command'])

When I want to call an external program, I have the option of spawning a shell or not. system('my command') will spawn a shell (executing your .bashrc/etc and all it seems). system(['my command']) ...
purplelulu's user avatar
0 votes
0 answers
66 views

"--INSERT--" doesn't go away with a remapped escape key

I remapped the Esc key to jj as follows: inoremap jj <esc>l If I only put <esc> the cursor is always one letter to the right, however once I add the l the notification message --INSERT -...
SLN's user avatar
  • 487
0 votes
1 answer
101 views

Loading UTF keymap file

I need to load a particular keymap file that enables me to write underscore, special characters by typing :set keymap=iast where iast.vim is my keymap file This no longer works. Where should this ...
jayr's user avatar
  • 33
0 votes
0 answers
211 views

How to properly organize persistence of the vim state of all opened buffers?

Before switching to vim years ago I was using Sublime Text and it perfectly handled situations when I just close it and open again. Nothing is lost and at the place where I left it off. So I'm aiming ...
Georgy Grigoryev's user avatar
0 votes
1 answer
302 views

Vim syntax line matching mechanism

Can someone explain or link to valid explanation information on the syntax highlighting mechanism. In particular I am having having a hard time understanding how rules are applied. Imagine the ...
JM. Marcastel's user avatar
0 votes
0 answers
215 views

Blockwise pasting from "+ register not working

UPDATE: I run an X server (XQuartz 2.7.11) on MacOS, which I forward via ssh to any Linux machine I use. The problem seems to be that under XQuartz, the "+ register does not support blockwise yanking/...
Anders Lundstedt's user avatar
0 votes
1 answer
141 views

How to get the same message and error behavior as normal `n` when calling `normal n` in function

I wrote a vimscript function that prevents the cursor from changing its location on the screen when I press n: function! s:my_n() let l:start=line("w0") let end = line("w$")...
Bananach's user avatar
  • 494
0 votes
0 answers
174 views

In PHP files, how can I auto close HTML tag pairs and indent the new line?

I have been a Vim user for several years now and I haven't been able to find a solution to this issue. There have been a lot of questions on the internet that try to address it, but none of the ...
Zach Russell's user avatar
0 votes
0 answers
56 views

Displaying specific text only in the airline of a given window

Suppose that using bufwinnr() I find the windows number where a given buffer is being displayed to be 2. With that information, is there a way to display a specific string only in the airline status ...
Jorget Millani's user avatar
0 votes
0 answers
65 views

install / repair help system

I built vim from source on Arch Linux and the help system is not present. I do not see any help-related options when I do vim --version. I assume it is either broken somehow or not installed. How can ...
Tyler Durden's user avatar
  • 2,041
0 votes
1 answer
148 views

inoremap inserts unwanted tabs

I recently made myself custom insert mode keybindings to type faster in LaTeX. However, When I use them, Vim adds tabs that weren't part of the original keybinding. Example: Here is my inoremap: ...
Benjamin Chausse's user avatar
0 votes
0 answers
37 views

How to limit a key binding to a single key

I'm having trouble putting to words what I'm looking for, please mark as duplicate if appropriate I have a key binding that launches a search based on a fuzzy finder (specifically bindings to fzf and ...
cbcoutinho's user avatar
0 votes
0 answers
129 views

What is the [0/0] that pops up in corner of tmux vim if I try to scroll up?

When I'm in vim on tmux with terminal and I scroll up, the cursor will jump to where my mouse is and show a [0/0] on the right corner of my window. When that happens, I can't type or move the cursor ...
appljuice's user avatar
0 votes
0 answers
49 views

How to show "/foobar match 1 of " or "E486: Pattern not found: foobar" in commandline when calling `normal! n` in function [duplicate]

I'm calling normal! n in a vimscript function. If there is a match, I don't get the message /foobar match 1 of 3 in the commandline. If there is no match, my commandline shortly flickers up and down ...
Bananach's user avatar
  • 494
0 votes
0 answers
58 views

Is there a C++ format plugin just like Visual Studio

Coding C++ in Visual Studio, if you type ;, this line will be formatted. For example, typing a ; after int i= 1+ 2 will make this line as int i = 1 + 2;, which means that each operator is surrounded ...
Yves's user avatar
  • 943
0 votes
1 answer
65 views

Grep on type with delay. Scripting / Looking for plugin

I use fzf.vim (with rg) to search through (grep) my project. The problem with this implementation is that (from what I understand) fzf.vim joins all the files (adding filename at the beginning of the ...
droso's user avatar
  • 3
0 votes
1 answer
233 views

In Vim 8.1, ":term ipython" gives a different version of IPython than typing "ipython" on an already open terminal

When I open a Gnome terminal in my Ubuntu 18 and execute the command ipython, I start an Anaconda IPython terminal version 5.8.0. Within Vim 8.1, that is what I also get if I first open a Vim terminal ...
FVb's user avatar
  • 193
0 votes
1 answer
207 views

Configuration from Vim 7 (macOS) to Vim 8 (Ubuntu) results in errors

I'm working long time with my own vimrc and lots of adjustments for different file types, ... in the macOS terminal (Vim 7.4.8056)and (the same config-files) on a rented Apache Server. Now I just ...
TravelTrader's user avatar
0 votes
0 answers
31 views

Are there already a series of switches/commands/aliases to initiate vim and auto backup to new file when writing out

...with confirmation that is somewhat similar to the "you are in RO mode" that you get as a layer of security if you run the command as view. I want a single command [that I may alias to something ...
Rulent's user avatar
  • 1
0 votes
0 answers
19 views

Why does second const VARNAME not have syntax highlighting?

I copied and pasted a .php file and edited it. It went from: <?php class Foo { const RESET = 'reset'; to <?php class Foo { const RESET = 'reset'; const ...
treyBake's user avatar
  • 101
0 votes
1 answer
941 views

Asterisk search does not find text with question marks

In gvim normal mode, the * key searches for the word under the cursor. Say I have a file with the following lines: life alifexea a_life_xea a life x a=life life=a b=life; c=b?life:a; life? ?life ...
Narasimhan's user avatar
0 votes
0 answers
58 views

terminal shell behaves differently from normal shell

I run this command in a common terminal: $ ps aux | grep work | grep python | awk '{print $2}' Then I have three different pids, however, in the vim-term window, the same line gave me two pids. ...
coin cheung's user avatar
0 votes
0 answers
49 views

Using horizontal scroll commands without setting `nowrap`

I tend to use a lot of vertical splits in my vim (version 8.1, via Arch Linux official repos) usage (on top of tabs, horizontal splits, tmux, etc.), and it gets frustrating when many of my lines wrap ...
user's user avatar
  • 151
0 votes
0 answers
230 views

make vim produce patch files without editing originals

I want to edit text files with vim, I would love vim file.txt To work like normal, and open file.txt in vim, like normal, and allow me to edit it seemingly like normal. The only difference is, all ...
theonlygusti's user avatar
  • 2,083
0 votes
1 answer
236 views

Apply the new setup of .vimrc to the file open to the other tab in the terminal [duplicate]

I have two tabs on my terminal. The first one is where I'm doing my project (html & css). On the other tab I'm working on my .vimrc. I added a new plugin (nerdcommenter) and it works on the .vimrc ...
isemaj's user avatar
  • 121
0 votes
1 answer
588 views

set shortcut depending on filetype [duplicate]

For some markup and programming languages I use VIM and the usual procedure for me checking if my code works is :w and !<compile>. Depending on the filetype <compile> can be very different ...
quiliup's user avatar
  • 155
0 votes
0 answers
62 views

i<c-e> and i<c-y> copy to end of line

In insert mode <c-e> and <c-y> copy a character at a time from the above line. I generally use these when working with aligned bits of text inside a program and want to copy to the end of ...
Greg Nisbet's user avatar
  • 1,755
0 votes
1 answer
303 views

Matching 'Capitalized' words in Vim

I'm trying to use the following regex to match 'Capitalized' words: "\l\@<!\<\u\w\+" Which matches 'Main' and 'Canvas' in: public class Main extends Canvas Or another example, matches all ...
jred_kai's user avatar
0 votes
0 answers
55 views

Automatically uncompress section of buffer

I'm using a simple text file in Vim as a task manager and am keeping completed tasks in an archive section of the same file. I'd like to compress that section of the buffer when saving changes to a ...
Vitor's user avatar
  • 1,702
0 votes
0 answers
47 views

Multiline search like with f and F [duplicate]

I'm using vim for C programming and I have a question about jumping to the next/previous character. I can use f or F to jump to the next or previous character correspondingly. But this does not work ...
St.Antario's user avatar
  • 1,087
0 votes
0 answers
41 views

aliased commands don't work with the shell ex command? [duplicate]

I have a number of aliased commands in my .bashrc and they work fine on the command line. However, if I use them in Vim, they do not work. For example: :!mycommand results in: /binbash: mycommand: ...
Tyler Durden's user avatar
  • 2,041
0 votes
1 answer
184 views

Automatically reindent lines filtered through formatprg

I have following xml file: <?xml version="1.0" encoding="UTF-8"?> <graph id="G" edgedefault="undirected"> <edge id="e6" source="n5" target="n4"> <data key="d1">1.1</...
Hotschke's user avatar
  • 4,510
0 votes
1 answer
866 views

Fixing pug syntax highlighting

Update I've managed to get the top part of the file fixed with syn region pugJavascriptLine start=/^\s*-/ end=/$/ contains=@htmlJavascript from this programmer: https://github.com/digitaltoad/vim-pug/...
Costa Michailidis's user avatar

15 30 50 per page
1
267 268
269
270 271
274