All Questions

Filter by
Sorted by
Tagged with
2 votes
2 answers
62 views

The way to excute same command in command-line mode multiple times

I'm recently working on a project in vim, and I need to execute the same command in command-line mode multiple times to different files which are in the same folder. like :%s/V1/V2/g Is there a ...
user avatar
0 votes
1 answer
12 views

How to setup intelephense with neovim + lua?

I have 2 neovims, one with coc, and another with lua. In neovim with coc, intelephense works. I am working with wordpress, and i need intelephense. Nvim coc setup. plugins.vim Plug 'yaegassy/coc-...
user avatar
  • 15
0 votes
2 answers
33 views

Execute the line pipping its STDOUT to a new tab

I have a lot of plaintext documentation of many different programming languages I like to browse with vim. My documents look like w3m -dump https://nodejs.org/dist/latest-v16.x/docs/api/events.html ...
user avatar
0 votes
0 answers
9 views

YAML / YML unwanted auto-formatting

YAML / YML unwanted auto-formatting The last days I made some configuration improvements of my vim environment, e.g. I installed vim-polyglot and coc and removed duplicated plugins within my vim-plug ...
user avatar
  • 101
0 votes
0 answers
12 views

"Unable to open swap file for 'Makefile', recovery impossible" for every edited file in vim

Upon editing any file I am now seeing this: In order to isolate this I have deleted all of the contents of ~/.vim or ~/.vimrc. I then consulted note here and recreated the `~/.vimrc with these ...
user avatar
0 votes
1 answer
11 views

Preview syntax highlighting from Telescope more accurate than in nvim buffer

Syntax highlighting within Telescope preview shows up better than inside neovim itself. From what I understand, the Telescope preview is based on what it would look like in an nvim buffer, so what am ...
user avatar
  • 1
0 votes
0 answers
18 views

Why is my vim key mapping not working?

The map noremap <silent> <C-i> :call CocActionAsync('doHover')<cr> doesnot work but doing same mapping for other key combination like <leader>h works. What might be the ...
user avatar
0 votes
1 answer
10 views

Change the fold marker characters used to delimit folds

So, oftentimes when I create folds, they actually interfere with other parts of my code and begin folding wherever (n)vim finds another group of three }}} A quick example would be: % {{{ Custom ...
user avatar
0 votes
0 answers
9 views

Attach to terminal buffer opened with termopen

I have the following Lua function: local function submit_diff(diff_msg_file) vim.fn.termopen("arc diff HEAD^ -F " .. diff_msg_file, { on_exit = function(_, exit_code, _) if ...
user avatar
1 vote
0 answers
15 views

Open a window with output of an external command [duplicate]

When editing a file, i sometimes run external commands - such as validating and formatting - and instead of capturing the external command's output and processing it in vimscript, i'd like to open an ...
user avatar
5 votes
2 answers
40 views

Yanking results displayed in status line

After pressing <C-g> in normal mode, prints useful information in the status line. How can I yank this text?
user avatar
0 votes
2 answers
37 views

What's the configuration used to make vim remember modifications after closing the file?

I've recently started using SpaceVim which is basically vim that comes with some extra plugins and pre-done configurations. However, it has a default behavior that bothers me... It remembers changes ...
user avatar
  • 375
0 votes
1 answer
12 views

How to get total width of Vim with vertical splits?

winwidth(0) returns the width of the current window. However, if vim has multiple vertical splits, forming multiple windows, winwidth(0) would only return the width of the current window. For example,...
user avatar
  • 23
0 votes
2 answers
49 views

Why is my colorscheme showing weird colors?

I recently (few days...) updated Vim on arch (via the package manager), and I've noticed something about colorschemes has changed. However, I don't understand why I should see color changing if I don'...
user avatar
  • 1,572
1 vote
1 answer
31 views

Is there a way to restore a previous version of file in vim

I had a swp file with old content, to which I restored and wasted much cleaning it. So I would like much such feature. Jetbrains's IDEs have feature local history: Which preserve history for ...
user avatar
5 votes
1 answer
260 views

Is it possible to break out of nested loops?

Say I have a nested loop, is there a way to break out of the outer loop from the inner one? For example this code: for i in range(3) for j in range(5) echo i j if i == 1 && ...
user avatar
  • 193
1 vote
2 answers
37 views

Check if VimPlug is installed in .vimrc

I'm trying to have a .vimrc that is portable between machines. Some computers I use have VimPlugin installed, while others don't. On the ones with VimPlug, I'd like to do some setup using call plug#...
user avatar
0 votes
1 answer
23 views

vim - why is the cursor different in different terminals

I have vim 8.2 installed on my Debian machine and when I open it in a gnome-terminal it has a solid non-blinking box as a cursor. But when I open a "pure" terminal with ctrl+alt+F3 and open ...
user avatar
1 vote
1 answer
83 views

A multiple movement of the cursor

For example the code below, 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 3: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa The arrow key moves the cursor from one character to the left, ...
user avatar
  • 113
1 vote
0 answers
19 views

Why zc fold all the sections at the first time?

I have just the following two lines in ~/vimrc to set vim's foldmethod to marker. I do not want all sections are collapsed when the document is opened. So I use nofoldenable to open all marked ...
user avatar
  • 111
1 vote
0 answers
28 views

How to Make Macros Stop with Custom Motion?

I am writing a custom Vim motion. The problem is that when used in a macro (especially at the end of a macro), the macro does not automatically stop when the motion no longer applies. For example, if ...
user avatar
  • 11
0 votes
1 answer
21 views

zf add fold marker comments with preceding spaces

Setting foldmethod=marker, I can highlight a few lines, press zf to fold them. By default vi will add {{{ and }}} at the ends of the beginning and ending lines. I am working on shell scripts with ...
user avatar
  • 111
0 votes
1 answer
26 views

!v command UNIX - relation to Vi or vim [closed]

Whenever I type !v command in the UNIX terminal, in a particular directory, my vim editor opens with the file "hello.txt" which I have never created in that same directory or anywhere. What ...
user avatar
2 votes
1 answer
15 views

How to have netrw ignore executables?

When I use netrw with the :Explore command I see that binary/executable files are highlighted in orange and have a little * start next to them, so I guess it can recognize them without having to rely ...
user avatar
  • 165
1 vote
1 answer
49 views

What is the significance of duplicating syntax-group name references?

According to :syn-define, several syntax ITEMs can be put into one syntax GROUP. Am I correct to infer that, regardless of the number of ITEM instances, e.g., syn keyword alphaBeta alpha beta syn ...
user avatar
0 votes
1 answer
36 views

How can I get netrw to not move the cursor when I return to it

When I open a directory in netrw by opening vim like vim ., it will show me a list of files in the current directory. If I find a file then press t it will open that file in a new tab, when I'm done, ...
user avatar
  • 193
1 vote
2 answers
26 views

How to find/highlight a word in the current line only

As title. The current problem is that my window is scrolled to the first/next(?) global occurrence. But I just want it to move my cursor to the local one, i.e. the current line, if any.
user avatar
  • 731
0 votes
0 answers
22 views

How to use command to insert a space in insert mode?

As title. Given that I'm already in insert mode and there is some insert mode function. Inside the function, I want to insert a space by command, how?
user avatar
  • 731
0 votes
0 answers
25 views

How can I align chained methods in Ruby files?

I often use = to indent lines but my configuration doesn't fit my needs. Is there an option that indent lines like this: 'vim rocks'.capitalize .concat(' !') Instead of this: 'vim rocks'....
user avatar
  • 101
1 vote
1 answer
56 views

What factors control the color scheme in a terminal?

I am trying to use VIM through new "Windows Terminal" app on a Windows 10 operating system. The VIM app is installed inside a debian WSL app. I can't wrap my head around how the entire color ...
user avatar
0 votes
0 answers
18 views

How to switch to normal mode after expand emmet in vscode?

I am using vim in vscode. And after expand emmet abbreviation, cursor goes to insert mode, and autocomplete don't work. It work just if go to normal and back to insert mode. I think is better to go to ...
user avatar
  • 15
0 votes
2 answers
46 views

How to "enter" the selected folder in the vertical wildmenu?

When using the vertical file/folder wild menu (ex: pressing Tab after :e or :cd ) and focused on a folder, is there a way to map a key to "move" inside that folder, and pick one of it's ...
user avatar
0 votes
1 answer
31 views

How to map a sequence of vim commands to a shortcut?

I have the following sequence of vim commands I use to copy a function va{Vy, how can I map this to a shortcut key like F1? I'd also like to persist this.
user avatar
0 votes
0 answers
14 views

HTML Lsp missing format shortcut

I'm having a problem in Neovim with Lsp formatting in Html files. :checkhealth is Ok :LspInfo is Ok, html is attached I have a shortcut for formatting, buf_set_keymap("n", '<space>fo', ...
user avatar
1 vote
2 answers
33 views

Upgraded my mac OS and now the vim colors are different. Is there an easy way for me to change the default syntax?

I upgraded my mac to Catalina and now the vim syntax looks all off to me. I am sure that strings used to be red, and I think that def used to be turquoise and import was pink. Is there a simple way ...
user avatar
2 votes
1 answer
31 views

vim-workspace does not save set options

I want to have a persisting vim setting in my workspace. The vim plugin vim-workspace seems to be the obvious solution for this. Yet it does not save some options. For instance I want to have my spell ...
user avatar
  • 38
0 votes
1 answer
18 views

Configure the statusbar to show rows

I want to configure the statusbar in vim to show which row I'm on. I have it currently set as statusline=%l/%L\ (%3p%%) I want however to do something like the following statusline=%3l/%3L\ (%3p%%) ...
user avatar
0 votes
2 answers
22 views

How can I strip footnotes using :global?

I have a very large table covering many pages in a document. The same footnote appears under the table on every page and I want to strip the entire document of these lines so I'm left only with the ...
user avatar
0 votes
0 answers
6 views

Build errors when installing neovim from source in Debian ModuleNotFoundError: No module named 'ninja'

I am facing some build errors in building Neovim from source in Debian (MxLinux). I tried the package installer and was able to install Neovim, but it is an older version. So, I installed all ...
user avatar
0 votes
0 answers
29 views

How to use tzachar/cmp-tabnine in NvChad?

This are the installation instructions for tzachar/cmp-tabnine using Packer: return require("packer").startup( function(use) use "hrsh7th/nvim-cmp" --completion use {'...
user avatar
0 votes
1 answer
18 views

How can i use Enter to select item from popup menu?

I am using UltiSnippets let g:UltiSnipsExpandTrigger='<None>' let g:UltiSnipsJumpForwardTrigger = '<tab>' let g:UltiSnipsJumpBackwardTrigger = '<S-b>' let g:coc_snippet_next = '<...
user avatar
  • 15
3 votes
2 answers
29 views

search for sentences that contains a few keywords (that is not in proper order)

Is there script or function for vim to do search of words that is not in proper location (sorry, i don't know how to put it in question) ? Example: This is a vim user who like the functionality which ...
user avatar
0 votes
1 answer
45 views

Executing Python scripts in Vim such that Vim remembers previously run code

Supposing I have the following python script open in Vim: a=1 b=2 c=a+b I know that I can type :! python3 in normal mode either for the whole script or by selecting the rows that I want to run in ...
user avatar
2 votes
0 answers
25 views

How to remap deleting a word in insert mode?

My terminal emulator in which I use vim is alacritty, and I want the key combination control + backspace to do the same that control + w does when in insert mode (i.e. delete the entire last word). So ...
user avatar
  • 33
0 votes
0 answers
34 views

Explanation of elvis' block system, specifically the block cache

From my browsing of the elvis editor source code, it appears that the block cache is a cache of recently accessed blocks, in the form of a linked list. However, I cannot figure out if this cache is ...
user avatar
1 vote
1 answer
23 views

How to jump to the first error when using ALE?

I've installed dense-analysis/ale from this repo: https://github.com/dense-analysis/ale I'm trying to use it to detect errors automatically in my Elm projects. Errors are detected since they are ...
user avatar
1 vote
1 answer
21 views

Only highlight trailing whitespace in normal mode

I have some code in my ~/.vimrc to highlight trailing whitespace. " Highlight trailing whitespace hi TrailingWhitespace ctermbg=red guibg=red matchadd("TrailingWhitespace", '\v\s+$') I ...
user avatar
0 votes
0 answers
24 views

vim-ternimal normal mode splits wrapped lines to 2 lines

Is there a way to make vim treat it as a single line? This blocks some functionality for example navigating to that line and hitting gf to open the file. Because it is read-only I can't even join the ...
user avatar
2 votes
1 answer
44 views

Is there a way to run an ex command without hitting colon first?

I am doing some scripting related to tmux and Vim. In my tmux window, I have Vim in one tmux pane and a Tcl command line in another tmux pane. I want to create a Tcl proc which will dump a string to ...
user avatar
0 votes
0 answers
7 views

netrw's Explore can't do both filepat AND content matching?

help Explore: one of the following four patterns Explore generates a list of files which satisfy the request for the local file system. */filepat files in current directory which satisfy filepat **...
user avatar
  • 101

15 30 50 per page
1
2 3 4 5
246