Skip to main content
Share Your Experience: Take the 2024 Developer Survey
110 votes
Accepted

What is the Vim8 package feature and how should I use it?

First of all, the relevant documentation can be found with :h packages on the newly compiled Vim8 version and here on Github. A first important note is about the vocabulary: In Vim8 a package is ...
statox's user avatar
  • 50k
23 votes

What is the Vim8 package feature and how should I use it?

The answer provided by @statox is very descriptive, but for a new user that can be overwhelming. Instead I want to outline what you need to do in step-by-step pointers. Create pack/*/start directory ...
3N4N's user avatar
  • 5,754
15 votes

What is the Vim8 package feature and how should I use it?

To expand on the "can it replace plugin managers", I used to use Vundle, which was fantastic, but now have replaced it with 18 or so lines of bash. I find it useful to use subfolders in the pack ...
Cam's user avatar
  • 251
13 votes
Accepted

How to start an async function in Vim 8?

From discussion in comments I learned that OP has a custom vimgrep call and would like to run it asynchronously. The utility of this is pretty clear, especially if you run a lot of searches that take ...
B Layer's user avatar
  • 19.9k
12 votes
Accepted

how to load vim8 optional packages in vimrc?

how to load vim8 optional packages in vimrc? The way to load vim8 optional packages in your vimrc is to use the :packadd! command, which will add them to your 'runtimepath', which will make the opt ...
filbranden's user avatar
  • 28.9k
9 votes
Accepted

Job still running in buffer while :qa

Running process in a terminal buffer is treated mostly the same way as "an unsaved file". So you can do :qa! or :set confirm etc.etc. Well, anything to allow exit from Vim with buffers unsaved. But, ...
Matt's user avatar
  • 20.8k
5 votes
Accepted

Is it possible to use <C-H> (and J/K/L) for navigation inside a Vim 8 terminal?

You need to use :tnoremap to map keys in the :terminal window. So if you want that to work in both normal mode of a regular buffer and of terminal windows, you need to add another set of mappings for ...
filbranden's user avatar
  • 28.9k
5 votes
Accepted

How to open a terminal horizontally on the right side of vim

Use the :vertical and :botright modifiers. nnoremap <F5> :wa \| vertical botright term ++kill=term<CR> Or: nnoremap <F5> :wa<CR>:vertical botright term ++kill=term<CR> (Also note ...
filbranden's user avatar
  • 28.9k
5 votes

How to delete non-empty directories in netrw (Vim 8 or Neovim)?

mf to mark the directory mx to apply shell command to marked files rm -rf <enter>
Frankva's user avatar
  • 51
5 votes

How to delete non-empty directories in netrw (Vim 8 or Neovim)?

There's a way to delete non-empty directories with netrw in vim 8+ or nvim? You could do :!rm -rf directory That warning means, you have files still in that directory. So if a file in that directory ...
chriz's user avatar
  • 221
4 votes

I am running into problems while using Gpush command from vim-fugitive plugin

I rarely ever run :Gpush on its own, so maybe try this: :Gstatus in the new split view, use - to toggle which changes you want to stage for the commit, then use cc to commit. After entering the ...
Richard Wonka's user avatar
4 votes
Accepted

Matching parenthesis and such not being highlighted in strings since VIM 8.0 on Ubuntu 18.04, how do I get this highlighting back?

I did a little investigation. At first I could not reproduce, but I think I have found the problem (part of it was, you did not mention what version you were using :/) I have a local machine with an ...
Christian Brabandt's user avatar
4 votes

Gvim 8.1 on Windows 10 won't source $HOME\_vimrc

The solution was to define $HOME as a Windows environment variable. Once I did that and restarted gVim, it read my ~\_vimrc and also sourced my native Vim 8.1 packages correctly. Source: this answer ...
William L.'s user avatar
4 votes
Accepted

Installing vim8.2 with python3.8 : Python.h not found

You mention in the comments, that the file Python.h is located in the directory $LOCAL_INSTALL/include/python3.8. This directory is not in the search path for include files. So it has to be added ...
Ralf's user avatar
  • 9,247
4 votes
Accepted

Close vim 8.1+ terminal buffer without unloading

Terminal buffer is special: When the job has finished and no changes were made to the buffer: closing the window will wipe out the buffer. Change buffer type will stop this. Manual After job ...
dedowsdi's user avatar
  • 6,268
4 votes
Accepted

Leave terminal normal mode

From :help Terminal-Normal *Terminal-Normal* *E946* In Terminal-Normal mode you can move the cursor around with the usual Vim commands, Visually mark text, yank text, etc. But ...
D. Ben Knoble's user avatar
  • 26.4k
3 votes
Accepted

Debug how vim calls makeprg

how to debug it? You can use the :verbose command to increase verbosity of a specific command. In this particular case, you need verbosity level above 3 to see the actual shell command executed by ...
filbranden's user avatar
  • 28.9k
3 votes

I am running into problems while using Gpush command from vim-fugitive plugin

Quote from vim-fugitive README: FAQ Why can't I enter my password when I :Gpush? It is highly recommended to use SSH keys or credentials caching to avoid entering your password on every ...
Thunderbeef's user avatar
3 votes
Accepted

How does g:terminal_ansi_colors affect the :terminal colors?

The help for the function term_setansicolors provides some more details. The short story is these 16 colors form a conventional palette which terminal programs use when outputting text. You can set ...
Mass's user avatar
  • 14.1k
3 votes
Accepted

What's wrong with "terminal cd ." in vim 8.1?

Based on Chris’s comments on the OP, I would make the shell do the work, using a level of indirection: terminal bash -c "cd wherever && do_something" The issue is that the bare :terminal ...
D. Ben Knoble's user avatar
  • 26.4k
3 votes

How to gF (go to file Particular line) to popup window?

You can use any of the popup_* functions that open popups with a buffer number, so, let bufnr = bufadd(expand('<cfile>')) let popup_id = popup_create (bufnr, {})
D. Ben Knoble's user avatar
  • 26.4k
3 votes

How to show a terminal under all tabs?

Is there a reason you open each file in a different tab with -p? The standard way to open multiple files is to open them in different buffers. See this answer for more about buffers vs windows vs ...
Andrew Ho-Lee's user avatar
3 votes
Accepted

Vim 8.2 no user defined functions

There was a regression bug in 8.2.3337 and it was fixed yesterday.
Maxim Kim's user avatar
  • 13.5k
3 votes

Leave terminal normal mode

There are 2 modes : "Terminal" or "Terminal mode" : You can execute bash commands, launch programs "Terminal >N" or "Terminal Normal mode" : VIM has control ...
floupinette's user avatar
2 votes

What is the Vim8 package feature and how should I use it?

The new format can be thought of as a Pathogen equivalent so there's still space for a manager that can download the plugins you want. There's a few new plugin managers who leverage this new pack ...
genotrance's user avatar
2 votes
Accepted

How to move the cursor out of the terminal

See :h Terminal-mode: Terminal-Job and Terminal-Normal mode Terminal-mode Terminal-Job When the job is running the contents of the terminal is under ...
muru's user avatar
  • 24.9k
2 votes
Accepted

vim8 - why does my 0read not read?

Using 0read on BufNewFile actually works as expected, in fact the documentation for BufNewFile explicitly mentions using that event for loading a template or skeleton file. If we also rule out the ...
filbranden's user avatar
  • 28.9k
2 votes

Debug how vim calls makeprg

(Thanks to @d-ben-knoble) makeprg does not include filename, so :make % should be used to lint the current file
xaxa's user avatar
  • 177
2 votes
Accepted

How to autoload multiple rc-style files in Vim 8+

Without newish packages feature you can use ~/.vim/plugin/ folder. All vim files you have in this folder are auto sourced using :h :runtime: I do exactly this for my settings: main vimrc is ~45 lines ...
Maxim Kim's user avatar
  • 13.5k
2 votes

How to start an async function in Vim 8?

Is it possible to call a vim script function with the help of job_start? Not directly. I guess you would need Vim to be multithreaded, which might be possible in the future. In fact I've used the ...
user938271's user avatar
  • 5,987

Only top scored, non community-wiki answers of a minimum length are eligible