Skip to content

Instantly share code, notes, and snippets.

View shiqimei's full-sized avatar
🎯
Focusing

Shiqi Mei shiqimei

🎯
Focusing
View GitHub Profile

Vim and clipboard support

I generally prefer to use the terminal version of vim, rather than macvim. The major downside is no direct OSX clipboard integration. I tried running brew install vim but even that doesn't seem to compile with +clipboard support. I really wish "+yy and +"p would just work!

Turns out that there's a great little plugin for that, fakeclip!

There are different ways to install vim plugins into ~/.vim/, but these days all the cool kids are using vundle. Here's how to install vundle, then use it to install fakeclip.

Installing vundle

@shiqimei
shiqimei / install
Created October 4, 2018 17:26 — forked from stonelasley/install
Install Vim 8.1 with Python 2, Python 3, Ruby and Lua - Ubuntu 18.04
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common
sudo apt-get install -y liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev libncurses5-dev libatk1.0-dev libx11-dev libxpm-dev libxt-dev
sudo rm -rf /usr/local/share/vim /usr/bin/vim
git clone https://github.com/vim/vim ~/vimtemp
cd ~/vimtemp
git pull && git fetch
cd src
@shiqimei
shiqimei / .vimrc
Created October 4, 2018 20:54 — forked from aldente39/.vimrc
To compile & run by F5 (Vim)
"実行コマンド
command! Run call s:Run()
nmap <F5> :Run<CR>
function! s:Run()
let e = expand("%:e")
if e == "c"
:Gcc
endif
if e == "py"
:Python
@shiqimei
shiqimei / company-complete-cycle.el
Created October 5, 2018 10:08 — forked from aaronjensen/company-complete-cycle.el
Enables tab to complete and cycle completions with company-mode, similar to neocomplete in vim
;; Modify company so that tab and S-tab cycle through completions without
;; needing to hit enter.
(defvar-local company-simple-complete--previous-prefix nil)
(defvar-local company-simple-complete--before-complete-point nil)
(defun company-simple-complete-frontend (command)
(when (or (eq command 'show)
(and (eq command 'update)
(not (equal company-prefix company-simple-complete--previous-prefix))))
@shiqimei
shiqimei / nginx.conf
Created November 26, 2019 06:53 — forked from kylemcdonald/nginx.conf
nginx config for port forwarding to a Jupyter instance on localhost.
user www-data;
worker_processes auto;
pid /run/nginx.pid;
## based on https://gist.github.com/cboettig/8643341bd3c93b62b5c2
events {
worker_connections 1024;
}
@shiqimei
shiqimei / nginx.conf
Created November 26, 2019 06:53 — forked from kylemcdonald/nginx.conf
nginx config for port forwarding to a Jupyter instance on localhost.
user www-data;
worker_processes auto;
pid /run/nginx.pid;
## based on https://gist.github.com/cboettig/8643341bd3c93b62b5c2
events {
worker_connections 1024;
}