Compiling a custom vim to support +xterm_clipboard support for Unix systems.
This will include (vim --version
)
+client-server
+clipboard
+X11
+xterm_clipboard
+etc...
brew uninstall vim
Run
brew doctor
to check for any issues.
If not consider installing homebrew.
Do Not Remove
/usr/bin/vim
git clone https://github.com/vim/vim.git && cd /vim
Use --disable-darwin incase of "Quickdraw.h error".
For more options : less vim/src/feature.h
, :help feature-list
or Vim Docs.
Example :
--with-features=huge
: Includes the most features
./configure --with-x
sudo make & make install
Verify:
which vim
outputs: /usr/local/bin/vim
If not:
Adding the following snipet to your ~/.zshrc
or ~/.bashrc
will allow echo $PATH
variable to locate vim from /usr/local/bin/
not /usr/bin/
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH"
Re-launch Terminal
type -a vim
should locate dirs of all vim instances
vim is /usr/local/bin/vim
vim is /usr/bin/vim
which vim
should locate our installed vim in
/usr/local/bin/vim
make uninstall
xauth
program/etc/ssh/ssh_config
containsForwardX11 yes
XQuartz.app
installed~/.ssh/config
contains
Host *
ForwardX11 yes
This will allow running graphical applications remotely without the need to add -X
ssh user@hostname & xterm
This will open the server's graphical terminal. If not consult ssh docs & x docs.
vim --version
supports+xterm_clipboard
The unnamed "*"
& unnamedplus "+"
register will sync to system clipboard for MacOS and Windows.
While the unnamedplus "+"
register will sync to linux system clipboard and the other "selection" clipboard is mapped to unnamed "*"
.
To use cross-platform vim's system clipboard and "selection" clipboard, edit server-side and client-side .vimrc
to include :
set clipboard^=unnamed,unnamedplus
This setting sets 'clipboard' option to prepend the "string" values.
-
Ctrl+C
in other programs -
p
to all vim platforms. -
y
yank in Vim -
Ctrl+V
in other programs on all platforms.