bash-completion script for vim command
MIT License
This repository contains a bash-completion file for vim.
The following features are curently supported:
vim scp://$host//files
)Host machine
Hostname 10.0.0.1
User account
IdentityFile ~/.ssh/id_ed25519
PubkeyAuthentication yes
Host *
ControlMaster auto
ControlPath ~/.ssh/sockets/%C
ControlPersist 15m
mkdir -p ~/.ssh/sockets/
.:
from COMP_WORDBREAKS which can be done by adding the following line to your bashrc
vim scp://machine//home/user/.bashrc
does not use the same format as {rsync,scp} machine:/home/user/.bashrc
does but the completion files by bash-completion are re-usedexport COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
git clone https://github.com/SuperSandro2000/vim-bash-completion.git ~/.bash_completion.d/vim-bash-completion
$BASH_COMPLETION_USER_DIR/completions
which defaults to $XDG_DATA_HOME/bash-completion/completions
which on itself defaults to ~/.local/share/bash-completion/completions
Q. Where should I install my own local completions?
at the bash-completion faq for details~/.bash_completion
~/.bash_completion
I was surprised that I couldn't find any bash-completion script for vim.
I also learned a couple of days before the scp:// remote feature in vim which is not that usuable without knowing file paths off the top of your head.
I knew that scp and rsync have fantastic bash-completion for remote files which are very responsive if you use ssh sontrol sockets. See man ssh_config
and search for ControlMaster.