Hot answers tagged

4

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 the terminal: tnoremap <C-J> <C-W><C-J> tnoremap <C-K> <C-W><C-K> tnoremap <C-L> <C-W><C-L> tnoremap <...


4

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 plugins load together with the ones in start. In your particular case: packadd! vim-javascript The examples you give hint that what you're actually trying to ...


2

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 other things that might have gone wrong there, then the most likely explanation is that 0read is working, but the contents of the buffer are later erased by ...


2

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 commit message and save/quit, the split window shows unpushed commits; you can use - to push individual commits. The exact push line and parameters are shown in ...


2

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 command doesn’t ever execute a shell—it executes the name of the external program you give it (which, by default, happens to be the shell). So, terminal cd . tries ...


1

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 at Stack Overflow.


1

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 them to anything you want, but it's best to stick to the vague color descriptions below. term_setansicolors({buf}, {colors}) *term_setansicolors()* ...


1

should I base this setup upon neovim or vim 8? If you don't have any problems with Vim, there's no need to switch to Neovim. In particular, Vim's terminal support is very decent. Open new splits with terminal similar to tmux (each split is a separate terminal) Yes, it's trivial. In fact, it's hard to avoid this. Ability to go into netrw from terminal ...


1

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 upstream interaction. If this isn't an option, the official solution is to use the core.askPass Git option to request the password via a GUI. Fugitive will ...


1

I looked at the source and I don't see any user-facing way to disable the bell limit. You'd have to build your own version as you mentioned. Think twice about that, though... Rather than being a killjoy "feature" this apparently was implemented for the sake of Vim stability. I saw a couple comments indicating that rapid bell sequences can hang Vim. Here's ...


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