Vim Note

Use MacVim in Command line 2017年 2月16日 星期四 22时46分40秒 CST Add following in ./bash_profile: alias gvim='/Applications/MacVim.app/Contents/MacOS/Vim -g' Edit more than one file open file Out vim vim file1 file2 : open multiple files vim -o file1 file2 : open multiple files with horizontal windows vim -O file1 file2 : open multiple files with vertical windows in vim e file : open new file sp file : open new file in hroizontal window vsp file : open new file in vertical window close file :bd close current buffer...

February 10, 2017 · 2 min · Me

Make a blog with Flask

Init Fisst create a new repository which name “flask_site” on github. Then git clone to loacl. Init the env: $ cd flask_site $ mkvirtualenv -p python3 flask_site $ pip install flask $ pip install flask-login $ pip install flask-openid $ pip install flask-mail $ pip install flask-sqlalchemy $ pip install sqlalchemy-migrate $ pip install flask-whooshalchemy $ pip install flask-wtf $ pip install flask-babel $ pip install guess_language $ pip install flipflop $ pip install coverage Hello World $ mkdir blog $ cd blog $ mkdir app $ mkdir app/static $ mkdir app/templates $ mkdir tmp blog/app/__init__....

February 9, 2017 · 2 min · Me

Vim As IDE

Install Vundle Vundle is short for Vim bundle and is a Vim plugin manager. Official site: https://github.com/VundleVim/Vundle.vim Use following command to install Vundle: $ git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim Put following lines at the top of your .vimrc to use Vundle. Remove plugins you don’t need, they are for illustration purposes: set nocompatible " be iMproved, required filetype off " required " set the runtime path to include Vundle and initialize set rtp+=~/....

February 8, 2017 · 4 min · Me

Tmux Note

Official site: https://github.com/tmux/tmux cheat-sheet tmux use prefix key (default: C-b) General Key Description : interactive dialog (promt) d detach session tmux restore restore session : source -file ~/.tmux.conf reload .tmux.conf t big clock ? list bindings Pane Handling Key Description % split vertically " split horizontally o go to next pane (down- pane) q show pane number, press number to go to { move current pane left } move current pane right x kill pane <space> toggle through layouts ; last pane z resize pane M-Up resize pane up 5 row C-Up resize pane up 1 row Window Handling Key Description c new window , rename window n next window p previous window l previously selected window w list all windows [0-9] move to window number [0-9] f [window name] find window : list-windows list windows & kill window ....

February 8, 2017 · 4 min · Me

iTerm2 Note

Install You can download from official site or use brew cask like $ brew cask install iterm2. Basic Config Set always come from top with full width: Goto Preferences -> Profiles -> set Style Full-Width Top of Screen Set system hotkey: Goto Preferences -> Keys In Hotkey part, select Show/hide iTerm2 with a system-wide hotkey set Hotkey by press a key General Usage Hotkey Key Description Ctrl i Show window (set in Basic Config section above) cmd w close panel or tab or window cmd d split the current session into two panes horizontally cmd shift d split the current session into two panes Vertically Cmd+left arrow, Cmd+right arrow navigates among tabs....

February 7, 2017 · 1 min · Me