All Questions

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

Change colour of character under cursor?

I'd like the character under my cursor to always be black in normal mode, so it contrasts with the cursor. I'm using windows terminal, which doesn't support this directly, and vim (not gvim), so guifg ...
0
votes
0answers
6 views

Plugins are nore loaded after a new vim compilation

I've got a new PC and I've compiled vim from source, and copied my .vimrc and plugins from an older machine. Unfortunately the plugins are not loaded. Neither automatically, nor with packadd command. ...
0
votes
1answer
8 views

Language specific custom syntax highlighting

So I have to follow a name convention for my C data types : Typedefs must start with a t_ prefix such a t_mytype. Structs must start with a with an s_ prefix and so on for other data types. So I added ...
0
votes
0answers
7 views

How to display Vim confirmation prompts in French but error messages in English

Is there a way to make Vim display confirmation prompts in French but error messages in English? I have gotten very used to responding to the French confirmation prompts. A change to English would ...
1
vote
1answer
16 views

Re-indent for eruby files does not work

I am trying to re-indent a foo.html.erb file, however when I do gg=G everything gets aligned to the beginning of the line. I couldn't figure out why that happens. I've tried installing polyglot or ...
0
votes
0answers
12 views

Vim formarts postgres wrong

I use vims autoformat feature a lot. But it doesn't work properly for postgres CREATE TABLE foo (fooid INT, foosubid INT, fooname TEXT); INSERT INTO foo VALUES (1, 2, 'three'); INSERT INTO foo VALUES (...
0
votes
1answer
25 views

escape sequences showing up within vi

When I am working in vi there pop up things that look like uninterpreted escape sequences. They come for example when I type i to enter insert mode, or ESC to leave it Example, triggered by typing i ...
1
vote
1answer
21 views

Showing showbreak character at the end of the line that is wrapping

Is there a way to show showbreak character at the end of the line that is wrapping, not at the beginning of the next one? 1. Lorem ipsum dolor sit amet, consectetur \ adipiscing elit, sed do ...
0
votes
1answer
14 views

Map comma in select mode to exit select mode, enter insert mode, append a comma

Is it possible to remap comma in select mode to exit select mode, enter insert mode, [optionally: go the end of the last selection (which the cursor seems to be for ultisnips)] and append a comma? ...
0
votes
0answers
7 views

iterm2 vim closes after I run current (python) file

I am using iterm2 and enjoy using vim terminal vim within it. A really annoying issue i'm having is that when writing python .py files and compiling using commands like: :!python % The code compiles ...
0
votes
0answers
8 views

How to open a file with terminal running a multi argument command in a vertical split?

How can I configure following behavior in nvim through ftplugin file, as soon as I open a specific file (eg .clj files), I wish to automatically in vertical split on RHS start a terminal buffer ...
0
votes
1answer
10 views

Move the caret to proper indentation inside insert mode in C files when using arrow keys

In insert mode, scope indentation is not taken into account if I navigate rows during insert mode. Example: In such a case, if I would press the up arrow key, Vim would place my caret at the start of ...
0
votes
0answers
28 views

How do I prevent theme loading issues with transparency?

I just installed the jellybean theme and when I opened a random cpp file I got a black area that disappears when a new line is added, like in this picture: How do I prevent the black area from ...
1
vote
2answers
48 views

Is it possible to generate a list of increasing numbers from a list of fixed numbers on vim?

Let's say I have a file that contains a specific number that is always the same, something like the following: 1 1000 10 1000 100 1000 1000 1000 10000 1000 100000 1000 1000000 1000 10000000 1000 ...
0
votes
1answer
35 views

Bset language to write a vim plugin? [closed]

Currently we can use many different languages to write a (neo)vim plugin. I heard that the vim language is actually pretty slow which was surprising me. I don't have the links of the websites anymore ...
0
votes
1answer
24 views

How do I determine encryption method via command line?

I have files which are encrypted by vim. From the command line, how can I determine which encryption method was used on a given file?
0
votes
0answers
11 views

How to scroll neovim terminal buffer automatically

With chansend function I can send any keys to neovim terminal buffer and execute any commands. ex: chansend(<job_id>, 'ls\n') But the buffer doesn't scroll automatically...(Of course, I can ...
1
vote
1answer
30 views

Vimrc, two functionalities become one

I have a vimrc file. In that file i have the following two lines. noremap gg :silent exec "!/home/john/gf.sh /home/john/guides/"<enter><C-L> nmap gh tlet @"=system('perl /...
1
vote
0answers
12 views

Folding lists in vimwiki with custom folding enabled

vimwiki's help docs, and this answer, both explain how to set g:vimwiki_folding so that list folding is enabled: let g:vimwiki_folding='list' But a few lines down in the docs, I've followed ...
0
votes
0answers
44 views

Vim-Airline TabLine not displaying with arrows

I have set up Vim-Airline, but Vim-Airline-Tabline's tab seperator is showing vertically rather than as arrows. My tabline: Expected tabline: init.vim relating to airline: let g:...
0
votes
1answer
26 views

“Visual around two Words”?

If I type 2daW, I can delete the current Word and the next (though I can't really see that case covered in the manual). Is there a way to visual-select around two words? I tried 2vaW, but of course (...
-1
votes
0answers
22 views

Mapping to <Esc> and <Return> not registering

I have this set of maps: nnoremap <C-s> :^[:w snoremap <C-s> <Esc>:w<Return>v<C-o> xnoremap <C-s> <Esc>:w<Return>v inoremap <C-s> <Esc>:w&...
0
votes
1answer
18 views

Lightlin background colors not displaying in MacOS Terminal

Background colors in the status line (and elsewhere in vim) are not displaying. This may be because I am using someone else's Lightline config, but it looks quite different to what I am seeing. My ...
1
vote
3answers
286 views

Don't show grey boundaries between windows

I am using vim as a book reader. For this purpose I have three windows open as shown ________________________________________ |~ ||The book I'm||~ | |~ ||reading ...
3
votes
3answers
356 views

What does the 'z' flag for search() do?

I was looking at the documentation for search() (:help search()). I noticed that there is a "z" flag: 'z'    start searching at the cursor column instead of zero When the 'z' flag is not ...
0
votes
0answers
19 views

Put previous jump location in other buffer

I have multiple interesting buffers in my jumplist, but I would like to view two of them side-by-side. How would you do that? That's the general case of this question. In my particular case, it is ...
1
vote
2answers
40 views

Is there any way of copying a macro inside a register to a different register?

I've discovered I can execute vim macros from the command line using the following command: vim myfile -c "argdo norm @aZZ" This command executed from the command line will execute a macro ...
0
votes
1answer
25 views

Shortcut for a multiline J/K

This question is a sort of follow-up to this: https://stackoverflow.com/questions/66466202/how-to-go-back-in-vim-to-last-cursor-position, which asks how to be able to do something like 17j and then ...
1
vote
1answer
31 views

Where is the .vim folder by default in Ubuntu?

I have seen that the .vim directory is in $XDG_CONFIG_HOME/, but it isn't. The closest I can find is /etc/vim/, but that does not contain what I need (namely, init.vim). Am I missing something? I am ...
0
votes
1answer
24 views

Apply new 'bold' highlight rule to all format, preserve color

Since I usually use a blank line to denote start of a new codeblock (function, class, etc.) I defined the following syntax rule. The intent is to make the first line of a code block standout. While ...
1
vote
2answers
28 views

Using ! in a function

I have the following command for arranging a few lines in a file using sed and column: :-3,+2!sed 's/- 2021/\&2021/' | sed 's/ 2021/\&2021/' | column -s '&' -t This works fine. For ...
2
votes
1answer
96 views

Fastest way to find last occurence of a character in line?

Say we have the following: echo 'This is a test'.$test1.$test2.$test3.$test4.$test5.'and this is another test'; ^ With the cursor being on the first dollar sign, and I want to ...
-1
votes
1answer
17 views

Split Navigation in vim terminal [duplicate]

I use vim splits quite a bit. To switch faster, I use this shortcut instead of doing ctrl + w + h/j/k/l/ " Quicker window movement nnoremap <C-j> <C-w>j nnoremap <C-k> <C-w&...
0
votes
1answer
25 views

VIM: How to call a vimscript function after press a shortcut or execute a command?

I want to know how to call a function after a normal or Ex command. Examples: bind a function to search command. When I input /xxxx to search xxxx, also call the function. press * to highlight ...
0
votes
1answer
16 views

Popup menu: Set a selected item on creation

I have a popup_menu. I want to have the second, for example, option chosen when it opens, rather than the first. Is this possible? I've looked in various threads on the internet and :help popup and ...
1
vote
0answers
20 views

gvim 8.2 windows10 _gvimrc location

I am using gvim. I have checked the location of the RUNTIMEFILE with :echo $RUNTIMEFILE and found that is is located in c:\Programme\vim\vim82. The file _gvimrc is there indeed. However, I do not have ...
2
votes
2answers
112 views

Highlight Unicode Characters

Is it possible to highlight unicode characters? When I copy/paste a code sample I sometimes run into problems because the website uses ‐, ‑, ‒ or – instead of - or some other characters that are hard ...
1
vote
1answer
28 views

How to match brackets in matchadd command regular expression?

I want to highlight breakpoint() - including brackets as keywords in Python files. I have added these two commands to my .vimrc: highlight link PyBreakpoint Keyword call matchadd("...
0
votes
1answer
21 views

How open two files in split mode but one came from stdout

all these works git show bf5500a8 | vim -R - vim file1 file2 -O git show bf5500a8 > tmpfile ; vim tmpfile file2 -O ; rm tmpfile but I'd like to know if I can open stdout and other file ...
0
votes
0answers
19 views

ctags cannot find the definition of a local variable in a c function

I use ctags -R * to generate tag files. I have tried exuberant-ctags and universal-ctags. In a c function, I define a local variable, but ctags cannot find the definition of the local variable. Is ...
0
votes
1answer
25 views

Is there a plugin for syntax highlight for assembly MIPS?

I haven't been able to find any syntax highlighting for MIPS assembly language. I have CoC installed, but I don't think it supports MIPS. Is there any other plugin that I could use for basic syntax ...
1
vote
0answers
24 views

Run a command when a buffer is closed and show errors in a new buffer

Goal I'm trying to create a commit buffer: write text, save to commit, show errors in new buffer on failure. Progress I'm having trouble with the last step. I figured I'd use bufhidden=wipe and ...
2
votes
1answer
26 views

Git bash / Neovim not working

I'm trying to get Neovim to work in Git bash. When I type nvim in cmd, everything works as expected and it opens Neovim, when I do the same in the Git bash, the whole editor just turns blank until I ...
0
votes
1answer
29 views

Prepend text to all commands in terminal mode

I would like to prepend clear; to all commands in terminal mode. This reduces the amount of 'clutter' in my terminal screen and makes things slightly clearer for me.
-1
votes
0answers
17 views

Set granular extension configurations globally in coc-settings.json

After setting up coc.nvim and adding the extension coc-pyright, I'm getting the following import warnings/errors: reportMissingModuleSource reportMissingImports As stated here it's possible to add a ...
1
vote
1answer
46 views

Configure Vim 8 behavior regarding substitution in visual selection

When I select a section of text within a line, then indicate I want to substitute on that line with :s, the result is that the entire line is affected. In order to actually do what I intend, I have to ...
4
votes
1answer
115 views

What is the most idiomatic way to achieve filetype-specific functions?

Is it possible to declare a function only for a specific filetype? Currently, if I have the following in ftplugin/tex.vim: function! Foo() echom "yes" endfunction Then when I load a *....
0
votes
0answers
20 views

VSCode Vim — don't want escape to enter normal mode if I'm exiting tooltip or Intellisense

I'm new to VIM and I'm loving it. I'm learning slowly but surely. I've passed the point where there's enough benefit and not too much hassle. I'm using the VS code integration. I'm learning VIM (...
0
votes
0answers
34 views

How to make tabs in vim work like they do in windows notepad

In notepad, whenever you hit tab, it will take up all the space up until the next "column". | | | | | # lets say these are the columns sdf f # Pressing "...
1
vote
1answer
17 views

Vim won't open unless I Ctrl+C

Having this strange problem, where when I do vim ...some_file... The shell will freeze until I send a signal <Ctrl + C>, and then the vim opens up properly. I haven't touched anything (.vimrc, ....

15 30 50 per page
1
2 3 4 5
213