Last active
May 13, 2019 06:43
-
-
Save Val-istar-Guo/e8ecef00fbcb59aed0910909262afd87 to your computer and use it in GitHub Desktop.
dotfiles
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = your_name | |
email = your_email | |
[alias] | |
# View abbreviated SHA, description, and history graph of the latest 20 commits | |
l = log --pretty=oneline -n 20 --graph --abbrev-commit | |
# View the current working tree status using the short format | |
s = status -s | |
p = pull | |
b = branch | |
c = clone | |
ci = commit | |
# Commit all changes | |
ca = !git add -A && git commit -av | |
# Switch to a branch, create/reset it if necessary | |
go = checkout -B | |
# List both remote-tracking and local branches | |
bs = branch -a | |
# Remove branches that have already been merged with master | |
dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d" | |
# Credit an author on the latest commit | |
credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f" | |
# Show verbose output about tags, branches or remotes | |
tags = tag -l | |
# Interactive rebase with the given number of latest commits | |
reb = "!r() { git rebase -i HEAD~$1; }; r" | |
# Find branches containing commit | |
fb = "!f() { git branch -a --contains $1; }; f" | |
# Find tags containing commit | |
ft = "!f() { git describe --always --contains $1; }; f" | |
# Find commits by source code | |
fc = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short -S$1; }; f" | |
# Find commits by commit message | |
fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f" | |
# Show the diff between the latest commit and the current state | |
# d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat" | |
# `git di $number` shows the diff between the state `$number` revisions ago and the current state | |
# di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d" | |
# Pull in remote changes for the current repository and all its submodules | |
# p = !"git pull; git submodule foreach git pull origin master" | |
# Clone a repository including all submodules | |
# c = clone --recursive | |
[apply] | |
# Detect whitespace errors when applying a patch | |
whitespace = nowarn | |
[core] | |
# Use custom `.gitignore` and `.gitattributes` | |
# excludesfile = ~/.gitignore | |
# attributesfile = ~/.gitattributes | |
# Treat spaces before tabs, lines that are indented with 8 or more spaces, and | |
# all kinds of trailing whitespace as an error. | |
# [default] trailing-space: looks for spaces at the end of a line | |
# [default] space-before-tab: looks for spaces before tabs at the beginning of | |
# a line | |
whitespace = space-before-tab,indent-with-non-tab,trailing-space | |
# Make `git rebase` safer on OS X | |
# More info: <http://www.git-tower.com/blog/make-git-rebase-safe-on-osx/> | |
trustctime = false | |
[color] | |
# Use colors in Git commands that are capable of colored output when | |
# outputting to the terminal. (This is the default setting in Git ≥ 1.8.4.) | |
ui = auto | |
[color "branch"] | |
current = yellow reverse | |
local = yellow | |
remote = green | |
[color "diff"] | |
meta = yellow bold | |
frag = magenta bold | |
old = red bold | |
new = green bold | |
[color "status"] | |
added = yellow | |
changed = green | |
untracked = cyan | |
[merge] | |
# Include summaries of merged commits in newly created merge commit messages | |
log = true | |
# URL shorthands | |
# [url "[email protected]:"] | |
# insteadOf = "gh:" | |
# pushInsteadOf = "github:" | |
# pushInsteadOf = "git://github.com/" | |
# [url "git://github.com/"] | |
# insteadOf = "github:" | |
# [url "[email protected]:"] | |
# insteadOf = "gst:" | |
# pushInsteadOf = "gist:" | |
# pushInsteadOf = "git://gist.github.com/" | |
# [url "git://gist.github.com/"] | |
# insteadOf = "gist:" | |
[push] | |
default = current | |
followTags = true | |
# [pager] | |
# # insanely beautiful diffs ==> npm install -g diff-so-fancy | |
# diff = diff-so-fancy | less --tabs=4 -RFX | |
# show = diff-so-fancy | less --tabs=4 -RFX | |
[help] | |
autocorrect = 1 | |
# [filter "lfs"] | |
# clean = git-lfs clean %f | |
# smudge = git-lfs smudge %f | |
# required = true | |
[diff] | |
compactionHeuristic = true | |
[remote "origin"] | |
fetch = +refs/heads/*:refs/remotes/origin/* | |
# [fetch] | |
# prune = true | |
[pull] | |
rebase = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// default font size in pixels for all tabs | |
fontSize: 14, | |
// font family with optional fallbacks | |
fontFamily: 'Source Code Pro, Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace', | |
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk) | |
cursorColor: 'rgba(248,28,229,0.8)', | |
// `BEAM` for |, `UNDERLINE` for _, `BLOCK` for █ | |
cursorShape: 'BLOCK', | |
// set to true for blinking cursor | |
cursorBlink: false, | |
// color of the text | |
foregroundColor: '#fff', | |
// terminal background color | |
backgroundColor: '#000', | |
// border color (window, tabs) | |
borderColor: '#333', | |
// custom css to embed in the main window | |
css: '', | |
// custom css to embed in the terminal window | |
termCSS: '', | |
// set to `true` (without backticks) if you're using a Linux setup that doesn't show native menus | |
// default: `false` on Linux, `true` on Windows (ignored on macOS) | |
showHamburgerMenu: '', | |
// set to `false` if you want to hide the minimize, maximize and close buttons | |
// additionally, set to `'left'` if you want them on the left, like in Ubuntu | |
// default: `true` on windows and Linux (ignored on macOS) | |
showWindowControls: '', | |
// custom padding (css format, i.e.: `top right bottom left`) | |
padding: '12px 14px', | |
// the full list. if you're going to provide the full color palette, | |
// including the 6 x 6 color cubes and the grayscale map, just provide | |
// an array here instead of a color map object | |
colors: { | |
black: '#000000', | |
red: '#ff0000', | |
green: '#33ff00', | |
yellow: '#ffff00', | |
blue: '#0066ff', | |
magenta: '#cc00ff', | |
cyan: '#00ffff', | |
white: '#d0d0d0', | |
lightBlack: '#808080', | |
lightRed: '#ff0000', | |
lightGreen: '#33ff00', | |
lightYellow: '#ffff00', | |
lightBlue: '#0066ff', | |
lightMagenta: '#cc00ff', | |
lightCyan: '#00ffff', | |
lightWhite: '#ffffff' | |
}, | |
// the shell to run when spawning a new session (i.e. /usr/local/bin/fish) | |
// if left empty, your system's login shell will be used by default | |
// make sure to use a full path if the binary name doesn't work | |
// (e.g `C:\\Windows\\System32\\bash.exe` instead of just `bash.exe`) | |
// if you're using powershell, make sure to remove the `--login` below | |
shell: '', | |
// for setting shell arguments (i.e. for using interactive shellArgs: ['-i']) | |
// by default ['--login'] will be used | |
shellArgs: ['--login'], | |
// for environment variables | |
env: {}, | |
// set to false for no bell | |
bell: 'SOUND', | |
// if true, selected text will automatically be copied to the clipboard | |
copyOnSelect: false | |
// if true, on right click selected text will be copied or pasted if no | |
// selection is present (true by default on Windows) | |
// quickEdit: true | |
// URL to custom bell | |
// bellSoundURL: 'http://example.com/bell.mp3', | |
// for advanced config flags please refer to https://hyper.is/#cfg | |
}, | |
// a list of plugins to fetch and install from npm | |
// format: [@org/]project[#version] | |
// examples: | |
// `hyperpower` | |
// `@company/project` | |
// `project#1.0.1` | |
plugins: [ | |
// 'hyperterm-panda', | |
'hyper-snazzy', | |
// 'hyper-chesterish', | |
// 'hyper-one-light', | |
// 'verminal', | |
// 'hyper-material-theme', | |
// 'hyper-ayu-light', | |
'hyper-statusline', | |
'hyper-tabs-enhanced' | |
], | |
// in development, you can create a directory under | |
// `~/.hyper_plugins/local/` and include it here | |
// to load it and avoid it being `npm install`ed | |
localPlugins: [] | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let mapleader=";" | |
syntax on | |
filetype on | |
set nu! | |
set ai | |
set expandtab | |
set tabstop=2 | |
set softtabstop=2 | |
set shiftwidth=2 | |
set clipboard=unnamed | |
set runtimepath^=~/.vim/plugins/ | |
" au BufNewFile,BufRead *.vue set filetype=vue | |
" Auto delete space after end of each line | |
" autocmd BufWritePre *.cpp :%s/\s\+$//e | |
au BufWritePre * :%s/\s\+$//e | |
if filereadable(expand("~/.vim/.vimrc.plugins")) | |
source ~/.vim/.vimrc.plugins | |
endif | |
" Copy to clipboard on MacOS | |
nmap ya :w !pbcopy<CR><CR> | |
nmap yl :.w !pbcopy<CR><CR> | |
vmap yv :!tee >(pbcopy)<CR> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
call plug#begin('~/.vim/plugins/bundles') | |
Plug 'scrooloose/nerdtree' | |
" Plug 'vim-airline/vim-airline' | |
" Plug 'vim-airline/vim-airline-themes' | |
Plug 'tpope/vim-fugitive' | |
Plug 'Yggdroot/indentLine' | |
Plug 'mattn/emmet-vim' | |
Plug 'pangloss/vim-javascript' | |
Plug 'posva/vim-vue' | |
Plug 'scrooloose/nerdcommenter' | |
Plug 'jiangmiao/auto-pairs' | |
Plug 'SirVer/ultisnips' | |
Plug 'honza/vim-snippets' | |
Plug 'jistr/vim-nerdtree-tabs' | |
Plug 'Xuyuanp/nerdtree-git-plugin' | |
" Plug 'ryanoasis/vim-devicons' | |
call plug#end() | |
" Auto Open NERDTree when enter vim | |
autocmd VimEnter * NERDTree | |
" Auto Focus Text Editor when enter vim | |
autocmd VimEnter * wincmd w | |
" Auto Close NERDTree when last file is close | |
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif | |
" Set NERDTree On Right by default | |
let NERDTreeWinPos="right" | |
" enable airlien font & theme | |
let g:airline_powerline_fonts=1 | |
let g:airline_theme='badwolf' | |
" Indent Line | |
let g:indentLine_enabled=1 | |
let g:indentLine_loaded=1 | |
" Javascript syntax | |
let javascript_enable_domhtmlcss = 1 | |
" Set syntax for vue | |
autocmd FileType vue syntax sync fromstart | |
" Comment Settings | |
autocmd BufRead,BufNewFile *.vue setlocal filetype=vue | |
autocmd FileType vue syntax sync fromstart | |
let g:NERDSpaceDelims=1 | |
let g:NERDCustomDelimiters={ 'javascript': { 'left': '//', 'leftAlt': '/**', 'rightAlt': '*/' } } | |
let g:vue_disable_pre_processors=1 | |
" Enable NERDCommenter For Vue | |
let g:ft = '' | |
fu! NERDCommenter_before() | |
if &ft == 'vue' | |
let g:ft = 'vue' | |
let stack = synstack(line('.'), col('.')) | |
if len(stack) > 0 | |
let syn = synIDattr((stack)[0], 'name') | |
if len(syn) > 0 | |
let syn = tolower(syn) | |
exe 'setf '.syn | |
endif | |
endif | |
endif | |
endfu | |
fu! NERDCommenter_after() | |
if g:ft == 'vue' | |
setf vue | |
let g:ft = '' | |
endif | |
endfu | |
" UltiSnips Setting | |
let g:UltiSnipsExpandTrigger="<tab>" | |
let g:UltiSnipsJumpForwardTrigger="<c-b>" | |
let g:UltiSnipsJumpBackwardTrigger="<c-z>" | |
" NERDTree Tab Setting | |
let g:nerdtree_tabs_open_on_console_startup = 1 | |
" NERDTree Git Plug Setting | |
let g:NERDTreeIndicatorMapCustom = { | |
\ "Modified" : "+", | |
\ "Staged" : "∫", | |
\ "Untracked" : "*", | |
\ "Renamed" : "->", | |
\ "Unmerged" : "=", | |
\ "Deleted" : "x", | |
\ "Dirty" : "!", | |
\ "Clean" : "√", | |
\ 'Ignored' : '~', | |
\ "Unknown" : "?" | |
\ } | |
" a heavy feature may cost much more time | |
" let g:NERDTreeShowIgnoredStatus = 1 | |
let g:airline_powerline_fonts = 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment