All Questions

0
votes
0answers
8 views

Syntax hightligh broken in html file after ^F

Expected behaviour Syntax highlight should work even after CTRL-F Actual behaviour Syntax hightlighting stops working after scrolling to next page Steps to reproduce using nvim -u NORC: nvim -u ...
0
votes
0answers
13 views

Emacs like narrow to region

Is it possible to narrow the text to a region, or function, and widen it as needed, as is possible in emacs via narrow-to-region ?
0
votes
1answer
14 views

How can I overwrite a whole file with the content of another?

I have two tabs open, file1.txt and file2.txt, each with different content. How can I copy the whole content of file1.txt and overwrite file2.txt with it, resulting in both files having the same ...
1
vote
2answers
21 views

How can I easily open two similar files?

I'm trying to setup a simple environment which would allow me to work on a local file and it's remote counterpart. Both files are accessible on my filesystem. So let's say I have : File 1 : /home/...
1
vote
0answers
43 views

Vim Swap File Became 187 GB, What are Possible Explanations?

I am running an Ubuntu Subsystem for Windows 10. Within Ubuntu, I worked on a small file via vim and backgrounded it (CTRL-Z) and foregrounded it (% job #) multiple times over a couple day period. Out ...
0
votes
0answers
17 views

E488 trailing characters error when working with errorformat and quickfix

I'm trying generate a list of files with find and use it in quickfix mode. I'm executing the following commands: set errorformat=%f !find . -type f -name "proto_*.c" > tmp.txt copen tmp.txt but ...
1
vote
0answers
21 views

expandtab tab as 2 spaces show visually as 6 columns

How can 2-space indenting be shown as 6 column tab-style indents when editing, while remaining as 2-spaces? Background: a team uses a convention of 2 spaces for indenting code I prefer indenting of ...
1
vote
1answer
21 views

Understanding YouCompleteMe's 'Configuring through Vim Options' Mechanics

There is a bit in YouCompleteMe that I do not understanding. It is the following bit from the documentation: Configuring through Vim Options --- EDIT --- So to clarify the question: How different is ...
1
vote
0answers
18 views

Incorrect auto-indent bash

Result of auto-indent in vim (filetype indent on) main() { case $1 in --ssh) echo "sshing into ${aws_ips[$1]}" ssh -i VPN_NODE_1.pem ${aws_ips[$1]} ;; --scp) ...
0
votes
0answers
29 views

Vim Airline: font symbols not rendering properly

I have a weird problem. I wanted to install the airline plugin via Plug. It works so far, but looks boring without any powerline fonts. I installed them via git clone git@github.com:powerline/fonts....
0
votes
0answers
25 views

Problem to run the Python3 program with spacevim

I just installed spacevim , i tried to follow it https://spacevim.org/use-vim-as-a-python-ide/ and it worked but when I want to run a python3 program it works but it stops on line 2 i don't know why. ...
2
votes
2answers
38 views

Create a custom keybind for a notes file on vim

I want to create a simple notes file and manager it with vim. The system is really easy (plain text rules): - [ ] new entry - [x] done entry Well, in my .vimrc I only have the keybind for add new ...
2
votes
1answer
25 views

autocmd changes only applying to new files

I've been going through learn vim the hard way and am currently adding abbreviations via autocmd. I've added the following to my .vimrc augroup outputs autocmd! autocmd FileType php :...
0
votes
0answers
26 views

Specify a syntax checker for Chef on Vim with Syntastic

[Arch linux 4.18.14 with Vim 8.1 and Syntastic 3.9.0.] I am trying to configure the syntastic plugin on vim with a checker for Chef recipes. For that I installed the plugin dougireton/vim-chef inside ...
0
votes
0answers
18 views

How to make Gvim run output shell commands inside split/inner terminal

Sometimes Gvim uses cmd.exe and terminal pop up or blinks in few miliseconds as a external window. How to force Gvim to use internal terminal in split? This behaviour causes anoying blinking or ...
3
votes
1answer
23 views

Syntax highlighting of key = value pairs

I "inherited" a custom syntax script and I want to update it since it's a little out of date. The text file for which the syntax highlighting is written contains several blocks like this: {Group1 ...
0
votes
0answers
12 views

How to make YouCompleMe ignore certain custom syntax?

I have a tpl file, which contain a custom proprietary language and javascript. YCM correctly reads the js, but goes grazy on the custom code. Like: $$GENERATE-HTML$ | Item unkown <script> ...
0
votes
3answers
39 views

How do I replace all accented characters like “á”, “ő” and “é”?

I am trying to master VI and found some nice tricks to replace a letter with a single :%s/ command and this works. If I'd like to replace for example word with wardos I can use :%s/word/wardos/g and ...
3
votes
1answer
39 views

Highlighting only in a certain file

At every opening of a special file I want vim to automatically highlight all the lines, where the 7th character is a 1. How do I do that?
7
votes
3answers
793 views

Open man section 3

I'm using Vim to develop C on Linux. When I press K in order to open man page for the underlying word, I don't have control on which man section is opened. Is there a way to specify that somewhere ?
1
vote
1answer
34 views

How to visual select everything within a pair of fold markers

Are there simple tweaks that I can visual select everything with in a pair of fold markers? Just like what vi" will do for a pair of double quotes. Preferably vi plus some other keys.
3
votes
1answer
38 views

replace or operate within regex match

underlying question: Is there a way to operate on text within a regex match? I.e. is there an analog to the 'g' command that operates on match substrings instead of lines usecases: One example of ...
1
vote
1answer
40 views

Enable digraph only for certain characters

I have digraph enabled :set digraph I really like the digraph setting in vim, but I often find it changes my keystrokes to some foreign character without my intention. I can see that there are ...
1
vote
1answer
26 views

How to stop “tab” key indenting whole line

In one version of VIM that I run, when I hit the "tab" key in insert mode, it indents the whole line, regardless of the cursors position in the line. Here is what I believe to be the only modified ...
0
votes
0answers
33 views

gvim and Linux - <C-c> not mapped, yet acts

gVim under Linux Ubuntu 18.04 LTS Bionic Beaver seams to have <C-c> (Ctrl-C) mapped to cancel the visual selection, despite not being mapped at all. :map <C-c> No mapping found To ...
1
vote
1answer
34 views

How to get neighboring buffer numbers

Lets pretend I have a Vim session with buffers that look like this: +-------------+--------------+ | | | | | | | | | | ...
0
votes
1answer
51 views

What is the configuration equivalent to `gg`?

call feedkeys('gg', 'int') seems to work, but what would be the Vim configuration language equivalent?
1
vote
1answer
37 views

Visual Select highlighting not working anymore

The issue My custom highlighting styles for Visual mode selection of text is not as it was. It use to be yellow background with black text. Now it is just underlined. Environment vim 8.0 term, not ...
2
votes
0answers
23 views

vim recorded session like doitlive

I have a presentation to make for a conference and I'm not allowed to use slides, only live coding. Is there a tool in vim which will help me avoid typos ? :) Something like doitlive which you can ...
0
votes
0answers
22 views

How do you end the command when using :c?

When using the ex command change (c), carriage returns become part of the input, so how do you indicate that you are done entering text? (I notice that if I hit the backspace, it finishes the command,...
1
vote
1answer
24 views

Is there any `setvirtcol()`?

I'm looking for a way to precisely set the cursor position given a virtual column. Is there only :exe "normal! ".vcol."|"? NB: I need virtual columns as they're the only thing that I'm able to ...
0
votes
1answer
24 views

Unable to copy line with .co

Since dot (.) is the range indicator for the current line I was expecting :.co to copy the current line, but it does not do this. What am I doing wrong? In contrast :.w my_line.txt will write the ...
0
votes
0answers
20 views

How can I see what arguments vim was invoked with?

Is it possible to see what arguments vim was invoked with when it was run? vim -O foo bar To show -O foo bar, but especially if there are configurations set like -Z?
-2
votes
1answer
51 views

Why does :new create a split?

Why does :new create a split? What is the use case for that functionality? Normally when I open a new scratch buffer, I don't want it to be in a split.
1
vote
0answers
34 views

How do I get neovim to automatically return to normal mode when idle?

This works fine in vim 8: autocmd CursorHoldI * stopinsert After about 5 seconds or so of inactivity in insert mode it automatically returns to normal mode. However, in neovim I use the deoplete ...
2
votes
1answer
32 views

vmap and visual block: how do I write a function to operate once for the entire block?

I'm trying to write a simple function that wraps a visual selection of lines with Markdown ``` lines. Here's what I currently have: function! MarkCodeBlock() " Add Markdown code-block delimiters ...
1
vote
1answer
34 views

Binding horizontal scroll in a function with feedkeys

I'm trying to create a function to make editing TSV files easier. The function changes spacing settings, turns off wrapping, and creates a 1 row tall split at the top so that the column headers are ...
1
vote
1answer
48 views

Is there a text object or motion for non-comment lines are not separated from comment lines by blank lines? E.g., in git commit messages

Consider the text A B # C # D Is there a text object or motion that will select lines A and B if the cursor is on either, but not select lines C and D? ap or ip with the cursor on any of those four ...
1
vote
0answers
28 views

Using pathogen, will allow me to exploit neovim capabilities when developing a plugin?

I just finished reading Learn Vimscript the Hard Way, and I am working right now with neovim And I had a bulky config file with a lot of stuff, that really slowed down vim, when I was handling heavy ...
1
vote
1answer
42 views

How can I conveniently close all read-only buffers?

For a longer running vim session, the number of buffers increases. However, often $VIMRUNTIME files, system files and netrw buffers can usually be closed with “closed” eyes. These are typically read-...
0
votes
1answer
10 views

folding in matlab

I'm using vim for my matlab editor. And It works nicely, except I cannot get folding to work. I found my syntax file on github: matlab.vim And I wanted to add folding. I changed the line syn ...
0
votes
0answers
23 views

how to use the job_start command after deleting the output buffer

I am trying run a job_start command and place the output in a buffer. So, for example, if I start Vim and run let job = job_start('/bin/sh -c "echo hello"', {'out_io': 'buffer', 'out_name': '...
1
vote
3answers
45 views

Quoting blocks but ignoring whitespace

Let's say I have Foo BAR Baz Quxxx Foo Baar Asd Duxxxxx Bar Foo Baazzz Kuxx Baz I would ideally like to be to highlight the first, second, or third column. Then I would ...
1
vote
1answer
34 views

Check if key is already bound in vimscript / Map key only if not mapped already

I'm wondering if it is possible to check in vimscript if a key (or key combination) is already bound? I know about the :map command which lets me see visually which keys are bound to what actions, ...
0
votes
2answers
26 views

How do I insert a single space into the same column of a group of lines?

For example, I wish to change 1 1 2 3 5 8 13 to 1 1 2 3 5 8 13 Where this is not necessarily at the start of the line. How can I do this?
1
vote
1answer
30 views

Last buffer order

I usually open files one in a single vim application. Occasionally, I open multiple files at once to fix some mistakes in batch, for example, after static analyzer. If I was edited files in the ...
0
votes
1answer
36 views

Mapping backspace to delete previous word

I would think this would work to make backspace delete the entire previous word in insert mode: imap <BS> <C-W> but it doesn't. Tried in vim 8.0 and neovim 0.2.2 iterm2 if that matters. ...
3
votes
1answer
29 views

How can I make Vim recognise ordinal numbers (1st, 2nd) as valid spellings?

If I set spell, Vim seems to only recognise some ordinal numbers: 1st, 2nd, etc. are fine, but anything from 10th to 20th is apparently misspelled. Then 21st, 22nd and 23rd are fine, but then they're ...
2
votes
1answer
32 views

Are counts commutative?

Newbie question: Are counts commutative? 2d2w is the same as 4dw, right? Is it the case for all commands that (count1)(verb)(count2)(whatever) the same as (count1+count2)(verb)(whatever)? If counts ...
1
vote
1answer
37 views

Function to toggle set colorcolumn

I like the set colorcolumn=80 option which highlights the column at 80 characters, however I find it annoying when working with multiple split windows. I'd like to have an option to enable or disable ...

15 30 50 per page