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))))

环境搭建

  • 安装 nvm (nodejs版本管理工具)
  1. 安装 devilspie 并创建配置文件
sudo apt install devilspie # 安装 devilspie
mkdir ~/.devilspie # 创建文件夹 ~/.devilspie
vim ~/.devilspie/vscode_transparent.ds # 新建文件 vscode_transparent.ds
  1. 粘贴下面的配置
( if
( contains ( window_class ) "Code" )
@shiqimei
shiqimei / Work_Product_Submission_GSoC_2019.md
Last active August 19, 2019 15:33
Rocket.Chat FRVR Games Google Summer of Code Project 2019 Submission

Project : FRVR Games

Student: Shiqi Mei (@lolimay)

The goal of this project is to integrate HTML5 games into Rocket.Chat.

@shiqimei
shiqimei / note_http_server.md
Created September 21, 2019 16:42
Start a HTTP server
  1. using python based http server
python -m SimpleHTTPServer # Serving HTTP on 0.0.0.0 port 8000 (by default)
python -m SimpleHTTPServer 3000 # Serving HTTP on 0.0.0.0 port 3000
  1. using node based http server
npm i -g http-server
http-server
@shiqimei
shiqimei / dabblet.css
Created November 4, 2019 11:29
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;