All Questions

Filter by
Sorted by
Tagged with
0
votes
1answer
10 views

Can I execute the make command only on selected lines?

Let's say I have the following script: sudo apt update sudo apt upgrade sudo apt install jq sudo apt install jo If I use the command :set makeprg=bash\ % | make inside Vim, the system will ask me my ...
0
votes
2answers
21 views

Is it possible to make Vim give me suggestions based on the libraries that I have on my system?

Let's say I create a folder called folder on my HOME directory. Let's also say that I enter this folder and create a node.js file called code.js. If I open this file with Visual Studio Code and I ...
1
vote
0answers
10 views

How to show where the word is found when using “auto complete” if it's “The only match”

When I type some letters and hit CTRL+P, vim shows a list of possible words that may complete my letters. On the left of the list, it shows the completed word. And on the right of the list, it shows ...
0
votes
1answer
21 views

How can I comment multiple lines on NeoVim?

On Vim, when I want to comment multiple lines I always use the following procedure: 1. select the first caracter of your block 2. press Ctrl+V ( this is rectangular visual selection mode) 3. type j ...
0
votes
1answer
16 views

What does <special> do in a mapping?

While reading the code of some plugins, I found the key <special> being used. Typing :h <special>, :h <Special> or :h <SPECIAL> yields nothing. I tried to search for it (/\c<...
1
vote
1answer
32 views

How can I return to the file that I'm editing when I execute it from inside Vim?

Let's say that I have the following node.js script: console.log("test") If I use the command :set makeprg=node\ % | set autowrite | make I'll execute this node.js code and see the following ...
0
votes
0answers
13 views

How to find all function in runthime by Telescope

i'm using a lot of plugins in neovim, for each plugin , we have a lot of function How can i grep all function by telescope :Telescope find_call then run this function if possible
0
votes
0answers
21 views

Syntax highlighting for uppercase headings using === or — syntax

In Vim, without using any markdown plugin, headings like # Uppercase heading # lowercase heading lowercase heading ================= lowercase heading ----------------- get highlighted, while ...
1
vote
1answer
32 views

Inserting abbreviation from file

First, I apologize if this is a trivial question. I have the following file (main.ab) defining a Python snippet: def main(args): ... if __name__ == '__main__': args = ... main(args) And ...
0
votes
1answer
21 views

Bind :w to ASCII bell?

My question is a little weird. I'm using the Visual Studio Code Vim plugin to write my master's thesis. VS Code has an 'autosave' setting, which I have enabled, which means I don't need to use :w to ...
0
votes
1answer
12 views

Using “(?=<)” in regex leads to “E866: (NFA regexp) Misplaced ?”

The following command should output the string "st": :echo matchstr('test', '\(\?<=e\).*') However, it leads to the error mentioned in the title. Reading :h E866 didn't help much. I also ...
0
votes
0answers
23 views

How dose colorscheme file working when python.vim file not exist?

I deleted python.vim in ~./Vim/vim82/syntax directory, and define colorscheme.vim in ~./Vim/vim82/colors directory. The colorscheme.vim contain this code call <sid>hi('pythonNumber', s:...
0
votes
0answers
61 views

What does “bound to github” mean?

The lastest Vim documentation has this paragraph: Neovim A Vim clone. Forked the Vim source in 2014 and went a different way. Very much bound to github and has many more dependencies, making ...
1
vote
1answer
43 views

How to disable scrollbind and cursorbind after using vimdiff?

I have this issue where I need to both compare files, which I do using vimdiff, but also work on individual files with vertically split screens (vs). However, after I call vimdiff on a file, opening ...
0
votes
0answers
14 views

vim colorscheme not apply clearly [duplicate]

I apply colorscheme by writing in _vimrc file, but colors are working Partially. I brought source code of colorscheme from code-dark using Plugin Vundle. For explanation, upload the pictures. First ...
0
votes
1answer
22 views

manually set syntax highlighting works from command-line mode but not from .vimrc/init.vim

The gruvbox colorscheme and syntax highlighting for C++ doesn't highlight some elements such as: string vector I have this: So I decided to change the colors manually using in init.vim syn keyword ...
4
votes
0answers
56 views

How to get bold comments in vim

I am trying to add bold comments to my vim files. What i mean, is to be able to get something like this: I saw other articles like this that allow to toggle bold comment. The proposed solutions from ...
1
vote
1answer
13 views

Netrw - Lexplore is not an editor command

I was trying to configure vim to have a file explorer on the side with no plugins. I found the following script: function! ToggleNetrw() if g:NetrwIsOpen let i = bufnr("$") while (...
1
vote
1answer
23 views

replace simple pattern with sequential next line from another file

My file working.txt has 1000's of lines, which repeat in a simple pattern as follows: name date_ax name date_cd name date_ed name date_dc ...etc I need to replace each instance of name with the ...
0
votes
2answers
32 views

How to execute a shell script from a line in a file with `%` in it

I have a shell script on a line alone in a file which I would like to be able to easily execute from vim. Normally I could simply use Y:!^R", but this particular script has % in it, which is ...
-1
votes
0answers
24 views

How to check for columns count of a line?

I am writing a plugin that highlight marks. I am getting out of range error, and I want to check the count of columns of a line. How can I do that in Vim or Lua? Answer in Lua is preferred.
4
votes
1answer
44 views

Register for your last action (.)

Vim has a lot of useful registers from which you can access the contents of various actions. There's ": for the last command in the command line, "/ for the last search, ". for the last ...
0
votes
0answers
11 views

Are there any word processing apps that use Vim keymaps? [migrated]

I'm looking for word processing apps and text editing apps that have, say, a Vim mode, where you can navigate using Vim keystrokes. Plugins would work too. IntelliJ IDEA has IDEAvim but I'm not going ...
1
vote
0answers
46 views

colorcheme in vim is partially working. how can I apply the theme successfully?

Thank you for all yours advise that for help to improve my question. I'm not find yet how to resolve this problem in here. I'm really appreciate If you left the link about answer of this problem. ...
0
votes
0answers
17 views

How can I edit a file and show a diff in a vertical split pane [duplicate]

I have a program file prog.pl and a backup prog.pl-20210615. At first they are identically. But then I want edit prog.pl and see the differences to the backupfile prog.pl prog.pl-20210615 text to ...
0
votes
1answer
23 views

Can I define a function with '#'-namespace in a file with hyphen '-' in its name?

I often see #-namespaces in plugins source code, e.g coc#status(), fzf#run(), fugitive#extract_git_dir. I would like to use namespaces in my own config, mappings and commands source code also. But I'm ...
0
votes
1answer
25 views

Change default tab behaviour for autocomplete to bash like tab

When I press tab for autocompletion (with the supertab plugin, but its applicable with vim's autocomplete feature as well), the selection scrolls from the bottom-most selection towards top with the ...
3
votes
1answer
56 views

Vertical WildMenu in Vim

One thing that really bothers me in vim (probably the only thing), is the wildmenu. In neovim, the wildmenu is vertical and looks as following: However, in vim, it is horizontal and looks like this: ...
2
votes
0answers
42 views

Does vim-easymotion only work in neovim?

I was wondering if the easymotion-overwin was compatible with vim, or does it only works in neovim? I have my .vimrc's keymaps setup like this for easy-motion "----- Easy-Motion ----- map <...
0
votes
1answer
12 views

Mapping Leader to a Ctrl combination not working/being ignored in NeoVim mappings?

I'm trying to map my leader to <C-s> and local leader to <C-q>, in my NeoVim (0.5.0) init.lua file. I know Ctrl-S and Ctrl-Q are software flow control, and I mainly use the terminal ...
0
votes
1answer
36 views

vim-test :TestSuite return message Not a test file

It's a really simple setup. I'm actually following along with the modern vim book. (I've been using vim emulation on IDEs for years and want to fully dive in). Anyway, my project structure is: ...
0
votes
1answer
25 views

Building: --disable-statusline is unrecognized option

I want to improve Gentoo ebuild. I tried :helpgrep statusline. In the future, how can I get all possible build flags about features in :version?
0
votes
1answer
38 views

Turn a search & replace regex one liner, with counters, into a function with a for next or while loop

this post has been simplified and re-written here: Making a function work with a loop I have this one liner, which takes the regex pattern match and replaces it with a string and a couple of counters: ...
1
vote
1answer
63 views

How to set more than 52 marks?

Possible marks are {a-zA-Z'}. Is there a mechanism to set more of them? The goal is to track certain (modifiable) lines and detect when they are deleted (e.g. with dd). Background I am building a UI ...
0
votes
1answer
35 views

Apply `:mkview` to all open tabs at exit from Vim

I use Vim from the CLI and use tabs rather than buffers (as I understand the terminology). I may or may not open multiple files using the -p option, but end up with a few tabs open at once. If I ...
0
votes
0answers
26 views

Make keypresses stay in the bottom-right until the next action

Say I type ciw then it will show c then ci then blank. Is it possible to keep it there until I start a new sequence of commands? I'm assuming that since a lot of videos I see use an overlay logging ...
0
votes
1answer
97 views

Is there a way to display in the statusline when capslock is detected?

One of the biggest problems I currently have in Vim is I start working enter a few commands and suddenly all key binds and commands start acting up. After a few seconds of panic and trying to do the ...
1
vote
0answers
46 views

How to sort the list of buffers

How to sort the list of buffers Vim displays on entering :b <Tab> by most recent? I'm used to the Spacemacs ordering, which displays buffer filenames in separate rows (vertically) in the order ...
1
vote
2answers
51 views

Vim - Yanking a set/number/block of lines, and inserting/appending them before/after another set/number/block of lines?

If I have two 'sets' of lines, each consisting of X number of lines (but the lines differing in their individual lengths), can I yank one set and insert (or append) it to the other? To illustrate, can ...
1
vote
0answers
27 views

:PlugUpdate is required every time I open vim [closed]

I’m setting up my LaTeX environment for vim, but the snippets (Ultisnips + vim-snippets + Gilles Castel’s tex.snippets with some changes) only work after I run :PlugUpdate (using vim-plug). I have to ...
0
votes
2answers
68 views

How can I detect if the vim I'm running on is the Git for Windows vim?

I have a shared .vimrc that I use across platforms. It works fine in most circumstances, but looks terrible when I run git commit from the command line. I want to make my color scheme not load when ...
1
vote
0answers
18 views

cannot run `:normal s<CR>` just for nerdtree (opens file vertically splitted)

what im trying to achieve: use <C-V> to paste text in normal mode in current buffer use same <C-V> to vertically split a file from nerdtree what i know: when you are with your cursor in ...
1
vote
1answer
16 views

Replace escape sequence `^[` carat left square bracket

Have text file with contents like: ^[[31morigin/some-branch^[[m ^[[31morigin/some-other-branch^[[m These ^[ sequences are highlighted and treated as one character as they are ascii escape sequence. ...
3
votes
2answers
82 views

how to jump to start of tag

I might have some text like the following: <foo>something very important</foo> 1 2 ^ 3 4 If the cursor is inside the tag, for example on the m character, what is ...
3
votes
0answers
25 views

is it possible to get incremental and hl search when using “q/” search window mode

I've been using the "q/" mode for all my searches recently because it allows quick and ease of access to previous searches, but it lacks the ability to perform incremental searches and ...
2
votes
1answer
57 views

Moving by word (w/b) and staying within the line

Background I'm attempting to remap the arrow keys to move by word while staying within the current line. I.e. I'm looking for a behavior similar to w and b, but that acts like h and l in the sense ...
1
vote
1answer
11 views

How can I make Packer ignore the splitright setting?

I have splitright set in my init.lua so that when I run :vs, the new split opens on the right. Using Neovim 0.5-HEAD, Packer follows this setting and opens its splits on the right. I would like these ...
1
vote
0answers
29 views

neovim, vimscript execute keystroke from function

I am trying to execute a keystroke from function when its called. However, it does not work. function SmartNERDTreeFocus() if expand('%') =~ 'NERD_tree.*' normal <C-w><C-p> ...
0
votes
0answers
21 views

`echohl` not highligthing with custom color, but its working with the defaults

in my init.vim (.vimrc) file i have this: hi TerminalGreenColor guifg=#6bd676 function! EchoInitVimReloadedSuccessfully() echon " -- [ " echohl Identifier echon "init.vim&...
0
votes
1answer
22 views

How to create an abbreviation that matches a regular expression

I'd like to create an abbreviation that will change the following (in a markdown file): - list item 1 into this: - list item 1 Whenever I type - f it should be expanded to - f (from 1 space to 3 ...

15 30 50 per page
1
2 3 4 5
222