Skip to content

Instantly share code, notes, and snippets.

@datalater
Last active July 19, 2019 07:09
Show Gist options
  • Save datalater/d442a4bf91d85a0382290f5de453dcaf to your computer and use it in GitHub Desktop.
Save datalater/d442a4bf91d85a0382290f5de453dcaf to your computer and use it in GitHub Desktop.
dot files @ 2013-late-MacPro
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
. ~/git-completion.bash
. ~/git-prompt.sh
# colors
CYAN='\e[0;36m\]'
L_CYAN='\e[38;5;38m'
L_GREEN='\e[38;5;48m'
MAGENTA='\e[38;5;213m'
COLOR_END='\[\033[0m\]'
WORKING_DIRECTORY_PATH='\w'
GIT_BRANCH='$(__git_ps1 " (%s)")'
export GIT_PS1_SHOWDIRTYSTATE=1
export PS1="\n${L_CYAN}${WORKING_DIRECTORY_PATH}${L_GREEN}${GIT_BRANCH}\n${MAGENTA}❯${COLOR_END} "
# ls to colorize
export LSCOLORS=gxFxBxDxCxegedabagacad
alias ls='ls -GF'
[user]
name = datalater
email = the7mincheol@gmail.com
[core]
precomposeunicode = true
quotepath = false
[alias]
l = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(cyan)<%an>%Creset' --abbrev-commit
s = status -s
alias-list = ! git config --list | grep alias | cut -c 7-
" vi 편집기록 기억갯수 .viminfo에 기록
set history=1000
set encoding=utf-8
" 메뉴 표시 언어: 영어
lang mes en_US
" enable mouse scrolling
set mouse=a
""
" APPEARANCE
""
"colorscheme desert
if has("syntax")
syntax on
endif
set background=dark
colorscheme jellybeans
" Show line number
set nu
" Show current cursor position
set ruler
" 상태바를 언제나 표시할 것
set laststatus=2
""
" CODE STYLE
""
set autoindent
set smartindent
" shift를 4칸으로 ( >, >>, <, << 등의 명령어)
set shiftwidth=4
" tab을 4칸으로
set tabstop=4
""
" SEARCH
""
" Try to be smart about cases when searching
set smartcase
" Ignore case when searching
set ignorecase
" Highlight search results
set hlsearch
" 검색 키워드 입력시 한 글자 입력할 때마다 점진 검색
set incsearch
""
" ERROR SOUND
""
set noerrorbells
set novisualbell
""
" BACKUP
""
set nobackup
set nowb
set noswapfile
" 마지막으로 수정된 곳에 커서를 위치함
au BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "norm g`\"" |
\ endif
" 명령행 한글 입력 오류 처리
ca ㅈ w
set nocompatible
filetype off
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" Status bar
Plugin 'vim-airline/vim-airline'
" File tree
Plugin 'scrooloose/nerdtree'
" Git diff
Plugin 'airblade/vim-gitgutter'
" Git branch
Plugin 'tpope/vim-fugitive'
" Lint
Plugin 'scrooloose/syntastic'
" Jellybeans color scheme
Plugin 'nanotech/jellybeans.vim'
" Find files
Plugin 'ctrlpvim/ctrlp.vim'
call vundle#end() " required
filetype plugin indent on " required
"""
" SHORTCUT
"""
nnoremap <F12>n :NERDTreeToggle<ENTER>
"map <Leader>nt <ESC>:NERDTree<CR>
"""updated at 2019.07.19
colorscheme jellybeans
syntax enable
filetype plugin indent on
set nocompatible " vi 기능을 사용하지 않고, vim만의 기능을 사용
set mouse=a " 마우스 클릭을 사용할 수 있음
set nu " 라인 넘버 출력
set ruler " 현재 커서 위치 (row, col) 좌표 출력
nnoremap Y y$
set laststatus=2 " 상태바를 언제나 표시할 것
set background=dark " 검정배경을 사용할 때, (이 색상에 맞춰 문법 하이라이트 색상이 달라짐)
"""
" Indentation
set smartindent
set tabstop=4
set expandtab
set shiftwidth=4
" Do not keep vim backup files
set nobackup
set nowritebackup
set noswapfile
" Search
set smartcase " 대문자가 검색어 문자열에 포함될 때에는 noignorecase
set ignorecase " 검색시 대소문자 무시
set hlsearch " 검색시 하이라이트(색상 강조)
set incsearch " 검색 키워드 입력시 한 글자 입력할 때마다 점진 검색
" Syntax
if has("syntax")
syntax on
endif
" Encoding
set encoding=utf-8
" 마지막으로 수정된 곳에 커서를 위치함
au BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "norm g`\"" |
\ endif
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/admin/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="agnoster"
# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load?
# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
git
zsh-syntax-highlighting
zsh-autosuggestions
)
source $ZSH/oh-my-zsh.sh
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# ssh
# export SSH_KEY_PATH="~/.ssh/rsa_id"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
# prompt
autoload -U promptinit; promptinit
prompt pure
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# This speeds up pasting w/ autosuggest
# https://github.com/zsh-users/zsh-autosuggestions/issues/238
pasteinit() {
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`?
}
pastefinish() {
zle -N self-insert $OLD_SELF_INSERT
}
zstyle :bracketed-paste-magic paste-init pasteinit
zstyle :bracketed-paste-magic paste-finish pastefinish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment