Memo - Applications

This is one of my memos about using various of applications.

Memos are used for recording the problems I encountered during programming and its solutions. I also write down something that is hard to remember for myself.

Jekyll

Reset magic keyboard

  1. Button at right. (Keyboard on)
  2. Hold down the button for 6 seconds.
  3. Repair the keyboard.

Vim

Config

# Install spf13-vim
curl http://j.mp/spf13-vim3 -L -o - | sh
set relativenumber
" https://unix.stackexchange.com/questions/149209/refresh-changed-content-of-file-opened-in-vim
set autoread

Basic

Vim Cheat Sheet

  • :4 - Go to line 4
  • :set relativenumber - Show relative line number
  • /keyword + Enter - Search
    • n - next position
    • N - previous position
  • u - Undo
  • ctrl + r - Redo

Move

  • Searching is fast.
  • f H - go to next H in this line
  • w - go to next word
  • 10j - Move down 10 lines
  • G - end of file
    • gg - start of file
  • $ - end of line
    • 0 - start of line
    • ^ - start of line, not empty position
  • A - insert at the end of line

Edit

Search and replace

  • :%s/old/new/g - Replace all
    • c - with confirmation
    • i - case sensitive
  • caw
    • w - word
    • a - all, delte space
    • i - in, delte just word
  • ci' - detele all CONTENT 'CONTENT'

Plugin

  • NERD Commenter
    • Docs
    • <leader> = ,
    • <leader> + c + space - toggle comment
    • <leader> + c + a - change to alternative delimiter
    • <leader> + c + m - comment use only one set of multipart delimiters
    • <leader> + c + s - pretty block comment
    • <C-c> - NERDComInsertComment, disable by default
      • add imap <C-c> <plug>NERDCommenterInsert to ~/.vimrc
  • emmet-vim

Tmux

Plugins

Mac

Keyboard shortcuts

Official shortcuts document

  • control + shift + power / eject - Put your displays to sleep
  • command + control + f - Full screen

Drawing

Slides

Shadowsocks

apt-get install python
wget https://bootstrap.pypa.io/get-pip.py
pip install shadowsocks
vim shadowsocks.json

{
    "server":"my_server_ip",
    "server_port":8388,
    "password":"mypassword",
    "timeout":300,
    "method":"aes-256-cfb",
    "fast_open": false
}

ssserver -c shadowsocks.json -d start

RStudio

Change document to english:

defaults write org.R-project.Rforce.LANG en_US.UTF-8

Change R console to english, add Enviroment:

export LANGUAGE=en

Leave a Comment

Your email address will not be published. Required fields are marked *

Loading...