sudo add-apt-repository ppa:jonathonf/vim
sudo apt update
This PPA typically contains newer versions of Vim, including Vim 9. After adding the PPA, try to install vim-gtk3 again:
sudo apt install vim-gtk3
vim
:echo has('clipboard')
This should output 1
if vim can copy to system clipboard
If you are using Windows WSL2, you must further add the following to your .vimrc to enable copying from vim to Windows
" WSL yank support
let s:clip = '/mnt/c/Windows/System32/clip.exe' " change this path according to your mount point
if executable(s:clip)
augroup WSLYank
autocmd!
autocmd TextYankPost * if v:event.operator ==# 'y' | call system(s:clip, @0) | endif
augroup END
endif
You may also get slow load times if the version of vim you are using has the clipboard enabled, you have the DISPLAY
env variable set, and you do not have an X11 server running. To fix this, either run an X11 server with the DISPLAY
environmental variable pointing to it or unset the DISPLAY
variable. More info can be found here.
cd ~
git clone --recurse-submodules https://github.com/reflashed/.vim
Or if you want to make changes to this repo:
cd ~
git clone --recurse-submodules [email protected]:reflashed/.vim.git
Remember to use the --recurse-submodules
flag because the pathogen bundles are just git repos themselves
If you forget to clone the repository recursively, you can just run
git submodule update --init
from within the submodule repository you need to download.
In your vim/neovim, run command:
:CocInstall coc-tsserver
The following are helpful resources for learning vim:
We use pathogen to install vim plugins. To add a plugin, simply add the plugin repository to the bundle directory in this repository as a submodule.
e.g.
cd ~/.vim/bundle
git submodule add https://github.com/tpope/vim-surround
You can find pathogen versions of pretty much any vim plugin on VimAwesome.
Vim not extending background color to the whole screen: