Skip to content

Instantly share code, notes, and snippets.

@jaeyson
Last active December 14, 2020 02:12
Show Gist options
  • Save jaeyson/9521b9169c2ac46e7d2576787d1f743b to your computer and use it in GitHub Desktop.
Save jaeyson/9521b9169c2ac46e7d2576787d1f743b to your computer and use it in GitHub Desktop.
ubuntu settings
" automatically leave insert mode after 'updatetime' milliseconds of inaction
" au CursorHoldI * stopinsert
" set 'updatetime' to 15 seconds when in insert mode
" au InsertEnter * let updaterestore=&updatetime | set updatetime=5000
" au InsertLeave * let &updatetime=updaterestore
" when you have error about dos line ending (clue here is ^M)
" most likely your file has line ending with dos
" to check the file type :set ff?
set ff=unix "set fileformat=unix
" Config for Vundle.vim
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins" call vundle#begin('~/some/path/here')
" let VUndle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
Plugin 'slashmili/alchemist.vim'
Plugin 'elixir-editors/vim-elixir'
Plugin 'itchyny/lightline.vim'
Plugin 'elmcast/elm-vim'
Plugin 'mattn/emmet-vim'
Plugin 'jamshedvesuna/vim-markdown-preview'
Plugin 'pangloss/vim-javascript'
Plugin 'jiangmiao/auto-pairs'
" Plugin 'OmniSharp/omnisharp-vim'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
" End Config
if !exists("g:syntax_on")
syntax enable
endif
" Enable 256 colors palette
" in Gnome Terminal
if $COLORTERM == 'gnome-terminal'
set t_Co=256
endif
try
colorscheme desert
catch
endtry
" set background=dark
" Set extra options when
" running in GUI mode
if has("gui_running")
set guioptions-=T
set guioptions-=e
set t_Co=256
set guitablabel=%M\ %t
endif
set encoding=utf-8
" Always show current position
set ruler
" Height of the command bar
set cmdheight=1
" Ignore case when searching
set ignorecase
" When searching try to be smart about cases
set smartcase
" Don't redraw while executing macros
" (good performance config)
set lazyredraw
" For regular expressions turn magic on
set magic
" Show matching brackets when
" text indicator is over them
set showmatch
" How many tenths of a second to blink
" when matching brackets
set mat=5
" Show all whitespaces
" set listchars=tab:→\ ,space:·,trail:·,precedes:«,extends:»,eol:↲
set listchars=tab:→\ ,trail:·
set list
" set list!
set history=500
set expandtab
set smarttab
set shiftwidth=2
set softtabstop=2
set path+=**
set wildmenu
set so=7
set laststatus=2
set hlsearch
set incsearch
set showcmd
" set number relativenumber
set number
set autoindent
set smartindent
set wrap
set noswapfile " disable swap file
let g:lightline = {
\ 'active': {
\ },
\ 'component': {
\ 'lineinfo': "%{line('.') . '/' . line('$')}",
\ },
\ 'component_function': {
\ 'gitbranch': 'fugitive#head',
\ },
\ 'separator': { 'left': '', 'right': '' },
\ 'subseparator': { 'left': '', 'right': '' },
\ }
let g:lightline.active = {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'gitbranch', 'readonly', 'relativepath', 'modified' ],
\ [ 'lineinfo', 'percent' ] ],
\ 'right': [ [ ] ]
\}
let g:lightline.inactive = {
\ 'right': [ ]
\}
" Plugin jamshedvesuna/vim-markdown-preview
let vim_markdown_preview_github=1
" Remember code folding
augroup remember_folds
autocmd!
autocmd BufWinLeave * mkview
autocmd BufWinEnter * silent! loadview
augroup END
" select and copy manually with mouse.
set mouse=a
" cursor switcher insert/normal mode:
" :autocmd InsertEnter,InsertLeave * set cul!
let &t_SI = "\e[6 q"
let &t_EI = "\e[2 q"
" Ps = 0 -> blinking block.
" Ps = 1 -> blinking block (default).
" Ps = 2 -> steady block.
" Ps = 3 -> blinking underline.
" Ps = 4 -> steady underline.
" Ps = 5 -> blinking bar (xterm).
" Ps = 6 -> steady bar (xterm).
" copy to clipboard
" set clipboard=unnamed
" execute a shell command:
" :! ls -la
" Redefine trigger key for emmet
" that means it will trigger
" when you press comma (twice)
" Default state is <C-y> with comma
" let g:user_emmet_leader_key='<,>'
" copy cut paste from system clipboard
" ----> "+y
" ----> "+p
# 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/soy/.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="agnoster"
# Set list of themes to load
# Setting this variable when ZSH_THEME=random
# cause zsh load theme from this variable instead of
# looking in ~/.oh-my-zsh/themes/
# An empty array 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.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
HIST_STAMPS="dd/mm/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
colored-man-pages
zsh-autosuggestions
zsh-completions
)
autoload -U compinit && compinit
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
# Dir: current working directory
#prompt_dir() {
#prompt_segment blue black '%2~'
#}
# Dir version 2
#prompt_dir() {
#prompt_segment blue black "%$(( $COLUMNS - 53 ))<...<%~%<<"
#}
# Dir version 3
prompt_dir() {
prompt_segment blue black "%-53<...<%~%<<"
}
HISTFILE="$HOME/.zsh_history"
HISTSIZE=1000
SAVEHIST=1000
setopt BANG_HIST # Treat the '!' character specially during expansion.
setopt EXTENDED_HISTORY # Write the history file in the ":start:elapsed;command" format.
setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits.
setopt SHARE_HISTORY # Share history between all sessions.
setopt HIST_EXPIRE_DUPS_FIRST # Expire duplicate entries first when trimming history.
setopt HIST_IGNORE_DUPS # Don't record an entry that was just recorded again.
setopt HIST_IGNORE_ALL_DUPS # Delete old recorded entry if new entry is a duplicate.
setopt HIST_FIND_NO_DUPS # Do not display a line previously found.
setopt HIST_IGNORE_SPACE # Don't record an entry starting with a space.
setopt HIST_SAVE_NO_DUPS # Don't write duplicate entries in the history file.
setopt HIST_REDUCE_BLANKS # Remove superfluous blanks before recording entry.
setopt HIST_VERIFY # Don't execute immediately upon history expansion.
setopt HIST_BEEP
# 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"
# Elixir - enable shell history
export ERL_AFLAGS="-kernel shell_history enabled"
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
# !!IMPORTANT!!
# Note: the 'source' command below MUST BE at the end of this file!!
source /home/soy/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
. $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash
# Opt out .NET telemetry
export DOTNET_CLI_TELEMETRY_OPTOUT=1
# node version manager (nvm)
export NVM_DIR="$HOME/.nvm"
export NVM_NODEJS_ORG_MIRROR="http://nodejs.org/dist/"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
export PATH="$PATH:$HOME/Documents/Github/neovim-gtk/bin"
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
# replace the url
url = https://your.git.repo.here
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[user]
# replace email and name
email = [email protected]
name = yourNAME
[color "branch"]
current = brown bold
local = green bold
remote = cyan bold
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
whitespace = red reverse
[color "status"]
added = green bold
changed = yellow bold
untracked = red bold
[diff]
compactionHeuristic = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment