Created
December 20, 2016 01:59
-
-
Save x7hub/810909ac824111aed493a0af5e98841b to your computer and use it in GitHub Desktop.
This file contains 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 = x7hub | |
email = x7.0@outlook.com | |
[core] | |
editor = vim | |
[push] | |
default = simple | |
[color] | |
ui = true |
This file contains 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
if [ $UID -eq 0 ] | |
then #root | |
PROMPT='%{$fg[yellow]%}%~%{$reset_color%}$(git_prompt_info)%{$fg[red]%} %# %{$reset_color%}' | |
PROMPT2='' | |
RPROMPT="%{$FG[237]%}%n@%m %l %T %{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_PREFIX="$FG[075](" | |
ZSH_THEME_GIT_PROMPT_CLEAN="" | |
ZSH_THEME_GIT_PROMPT_DIRTY="$FG[214]*%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="$FG[075])%{$reset_color%}" | |
else #els | |
PROMPT='%{$FG[032]%}%~%{$reset_color%}$(git_prompt_info)%{$FG[105]%} %# %{$reset_color%}' | |
PROMPT2='' | |
RPROMPT="%{$FG[237]%}%n@%m %l %T %{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_PREFIX="$FG[075](" | |
ZSH_THEME_GIT_PROMPT_CLEAN="" | |
ZSH_THEME_GIT_PROMPT_DIRTY="$FG[214]*%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="$FG[075])%{$reset_color%}" | |
fi |
This file contains 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
import os | |
import readline | |
import rlcompleter | |
import atexit | |
#tab completion | |
readline.parse_and_bind("tab: complete") | |
#history file | |
history_file = os.path.join(os.environ["HOME"],".pythonhistory") | |
try: | |
readline.read_history_file(history_file) | |
except IOError: | |
pass | |
atexit.register(readline.write_history_file,history_file) | |
del os,history_file,readline,rlcompleter |
This file contains 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
" An example for a vimrc file. | |
" | |
" Maintainer: Bram Moolenaar <Bram@vim.org> | |
" Last change: 2011 Apr 15 | |
" | |
" To use it, copy it to | |
" for Unix and OS/2: ~/.vimrc | |
" for Amiga: s:.vimrc | |
" for MS-DOS and Win32: $VIM\_vimrc | |
" for OpenVMS: sys$login:.vimrc | |
" When started as "evim", evim.vim will already have done these settings. | |
if v:progname =~? "evim" | |
finish | |
endif | |
" Use Vim settings, rather than Vi settings (much better!). | |
" This must be first, because it changes other options as a side effect. | |
set nocompatible | |
" allow backspacing over everything in insert mode | |
set backspace=indent,eol,start | |
if has("vms") | |
set nobackup " do not keep a backup file, use versions instead | |
else | |
set backup " keep a backup file | |
endif | |
set history=50 " keep 50 lines of command line history | |
set ruler " show the cursor position all the time | |
set showcmd " display incomplete commands | |
set incsearch " do incremental searching | |
" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries | |
" let &guioptions = substitute(&guioptions, "t", "", "g") | |
" Don't use Ex mode, use Q for formatting | |
map Q gq | |
" CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo, | |
" so that you can undo CTRL-U after inserting a line break. | |
inoremap <C-U> <C-G>u<C-U> | |
" In many terminal emulators the mouse works just fine, thus enable it. | |
"if has('mouse') | |
" set mouse=a | |
"endif | |
" Switch syntax highlighting on, when the terminal has colors | |
" Also switch on highlighting the last used search pattern. | |
if &t_Co > 2 || has("gui_running") | |
syntax on | |
set hlsearch | |
endif | |
" Only do this part when compiled with support for autocommands. | |
if has("autocmd") | |
" Enable file type detection. | |
" Use the default filetype settings, so that mail gets 'tw' set to 72, | |
" 'cindent' is on in C files, etc. | |
" Also load indent files, to automatically do language-dependent indenting. | |
filetype plugin indent on | |
" Put these in an autocmd group, so that we can delete them easily. | |
augroup vimrcEx | |
au! | |
" For all text files set 'textwidth' to 78 characters. | |
autocmd FileType text setlocal textwidth=78 | |
" When editing a file, always jump to the last known cursor position. | |
" Don't do it when the position is invalid or when inside an event handler | |
" (happens when dropping a file on gvim). | |
" Also don't do it when the mark is in the first line, that is the default | |
" position when opening a file. | |
autocmd BufReadPost * | |
\ if line("'\"") > 1 && line("'\"") <= line("$") | | |
\ exe "normal! g`\"" | | |
\ endif | |
augroup END | |
else | |
set autoindent " always set autoindenting on | |
endif " has("autocmd") | |
" Convenient command to see the difference between the current buffer and the | |
" file it was loaded from, thus the changes you made. | |
" Only define it when not defined already. | |
if !exists(":DiffOrig") | |
command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis | |
\ | wincmd p | diffthis | |
endif | |
" | |
" zzz | |
" | |
" encoding | |
set encoding=utf-8 | |
set fileencodings=utf-8,gb2312 | |
" indent | |
set autoindent | |
set tabstop=4 | |
set shiftwidth=4 | |
set softtabstop=4 | |
set expandtab | |
if has("autocmd") | |
autocmd FileType xml,html,c,m,cs,java,perl,shell,bash,cpp,python,vim,php,ruby,go set number | |
autocmd FileType c,cpp,python let Tlist_Auto_Open=1 | |
autocmd FileType c,cpp setlocal cindent | |
autocmd FileType make setlocal noexpandtab | |
endif | |
" color | |
colorscheme desert | |
" colorscheme solarized | |
" colorscheme monokai |
This file contains 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
# 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=/home/xg/.oh-my-zsh | |
# Set name of the theme to load. Optionally, if you set this to "random" | |
# it'll load a random theme each time that oh-my-zsh is loaded. | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
ZSH_THEME="robbyrussell" | |
# 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. | |
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" | |
# 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? (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) | |
source $ZSH/oh-my-zsh.sh | |
# User configuration | |
export HISTFILE=$HOME/.zsh_history | |
export HISTSIZE=65536 | |
export SAVEHIST=$HISTSIZE | |
export PATH=$HOME/bin:$PATH | |
export GOPATH=$HOME/.go | |
export PYTHONSTARTUP=$HOME/.pythonstartup | |
# 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" | |
alias ls="ls --color" | |
alias l="ls -al" | |
alias la="ls -a" | |
alias ll="ls -al" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment