Skip to content

Instantly share code, notes, and snippets.

@mmpx12
Last active April 8, 2025 16:26
Show Gist options
  • Save mmpx12/dea49f9877d8c83f88d025c67dc6d787 to your computer and use it in GitHub Desktop.
Save mmpx12/dea49f9877d8c83f88d025c67dc6d787 to your computer and use it in GitHub Desktop.
short_pwd() {
local dir="${PWD/#$HOME/~}"
IFS='/' read -ra parts <<< "$dir"
if (( ${#parts[@]} > 4 )); then
echo ".../${parts[-3]}/${parts[-2]}/${parts[-1]}"
else
echo "$dir"
fi
}
parse_git_branch() {
local branch
branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)
if [ -n "$branch" ]; then
echo " ( $branch )"
fi
}
PS1='\[\e[38;5;178m\](\u@\h)\[\e[0m\] \[\e[38;5;220m\]\[\e[0m\]\[\e[38;5;180m\]$(short_pwd) \[\e[38;5;214m\]($(parse_git_branch)\[\e[0m\]) \$ \[\e[38;5;208m\]'
shopt -s cmdhist
shopt -s histappend
shopt -s checkwinsize
shopt -s cdspell
set -o noclobber
yelo="\033[33m"
red="\033[31m"
green="\033[32m"
blank="\033[0m"
cyan="\033[36m"
purple="\e[0;35m"
dgrey="\033[90m"
lgrey="$(tput setaf 248)"
HISTIGNORE="ls:history"
HISTCONTROL=ignoreboth
HISTSIZE=1000000000
HISTFILESIZE=10000000000
HISTTIMEFORMAT=`echo -e "${red}[${dgrey}%F${red}]=[${lgrey}%T${red}]──►${yelo} "
retab
autocmd FileType go inoremap <buffer> . .<C-x><C-o>
filetype plugin indent on
syntax on
set nocursorline
set title
set noautoindent
set ruler
set shortmess=aoOTI
set showmode
set splitbelow
set splitright
set nomodeline
set wildmenu
set wildmode=longest:full,list:full
set showcmd
set showmatch
set shiftwidth=4
set expandtab
set cinoptions=(0,m1,:1)
set formatoptions=tcqr2
set laststatus=2
set nomodeline
set clipboard=unnamed
set softtabstop=4
set showtabline=1
set smartcase
set sidescroll=5
set scrolloff=4
set hlsearch
set ttyfast
set history=10000
set hidden
set number
set backspace=indent,eol,start
set ttimeoutlen=100
set completeopt=longest,menuone,preview
set backup
set noswapfile
set undodir=~/.vim/tmp/undo//
set backupdir=~/.vim/tmp/backup//
set directory=~/.vim/tmp/swap//
set background=dark
set termguicolors
colorscheme camo2
set background=dark
if version > 580
hi clear
if exists("syntax_on")
syntax reset
endif
endif
"hi clear
set t_Co=256
let g:colors_name="camo2"
hi Cursor guifg=NONE guibg=NONE gui=NONE
"hi Normal guifg=#24ff14 guibg=NONE guisp=#172e2e gui=bold ctermfg=10 ctermbg=NONE cterm=bold
"hi CursorIM guifg=OliveDrab4 guibg=bisque
"
hi Directory guifg=OliveDrab4 guibg=NONE gui=NONE
"guibg=grey15
hi DiffAdd guifg=DarkOliveGreen1 guibg=NONE gui=NONE
"guibg=grey15
hi DiffChange guifg=PaleGreen guibg=NONE gui=NONE
"guibg=grey15
hi DiffDelete guifg=red guibg=NONE gui=NONE
"guibg=grey15
hi DiffText guifg=grey15 guibg=NONE gui=NONE
"guibg=red
hi ErrorMsg guifg=snow guibg=NONE gui=NONE
hi VertSplit guifg=bisque4 guibg=NONE gui=NONE
"guibg=DarkOliveGreen1
hi Folded guifg=DarkOliveGreen2 guibg=NONE gui=NONE
"guibg=grey30
hi FoldColumn guifg=DarkOliveGreen2 guibg=NONE gui=NONE
"guibg=grey30
hi IncSearch guifg=bisque guibg=NONE gui=NONE
hi LineNr guifg=OliveDrab4
" guibg=grey15
hi ModeMsg guifg=khaki3 guibg=NONE gui=NONE
"guibg=grey15
hi MoreMsg guifg=khaki3 guibg=NONE gui=NONE
"guibg=grey15
hi NonText guifg=DarkSalmon guibg=NONE gui=NONE
"guibg=grey10
hi Question guifg=IndianRed guibg=NONE gui=NONE
" guibg=grey10
hi Search guifg=DarkSalmon guibg=NONE gui=NONE
"guibg=grey15
hi SpecialKey guifg=yellow guibg=NONE gui=NONE
"guibg=grey15guibg=NONE gui=NONE
hi StatusLine guifg=bisque4 guibg=NONE gui=NONE
"guibg=DarkOliveGreen1
hi StatusLineNC guifg=bisque4 guibg=NONE gui=NONE
"guibg=DarkOliveGreen3
hi Title guifg=IndianRed guibg=NONE gui=NONE
"guibg=grey15
hi Visual guifg=OliveDrab4 guibg=NONE gui=NONE
"guibg=bisque1
hi WarningMsg guifg=bisque guibg=NONE gui=NONE
hi WildMenu guifg=LightBlue guibg=NONE gui=NONE
"guibg=DarkViolet
"Syntax hilight groups
hi Comment guifg=tan guibg=NONE gui=NONE
hi Constant guifg=khaki guibg=NONE gui=NONE
hi String guifg=moccasin guibg=NONE gui=NONE
hi Character guifg=chocolate
hi Number guifg=chocolate
hi Boolean guifg=OliveDrab3
hi Float guifg=chocolate
hi Identifier guifg=khaki4 guibg=NONE gui=NONE
hi Function guifg=OliveDrab4 guibg=NONE gui=NONE
hi Statement guifg=khaki guibg=NONE gui=NONE
hi Conditional guifg=khaki guibg=NONE gui=NONE
hi Repeat guifg=khaki guibg=NONE gui=NONE
hi Label guifg=khaki guibg=NONE gui=NONE
hi Operator guifg=DarkKhaki guibg=NONE gui=NONE
hi Keyword guifg=DarkKhaki guibg=NONE gui=NONE
hi Exception guifg=khaki guibg=NONE gui=NONE
hi PreProc guifg=khaki4 guibg=NONE gui=NONE
hi Include guifg=khaki4 guibg=NONE gui=NONE
hi Define guifg=khaki1 guibg=NONE gui=NONE
hi Macro guifg=khaki2 guibg=NONE gui=NONE
hi PreCondit guifg=khaki3 guibg=NONE gui=NONE
hi Type guifg=khaki3 guibg=NONE gui=NONE
hi StorageClass guifg=tan guibg=NONE gui=NONE
hi Structure guifg=DarkGoldenrod guibg=NONE gui=NONE
hi Typedef guifg=khaki3 guibg=NONE gui=NONE
hi Special guifg=IndianRed guibg=NONE gui=NONE
hi SpecialChar guifg=DarkGoldenrod guibg=NONE gui=NONE
hi Tag guifg=DarkKhaki guibg=NONE gui=NONE
hi Delimiter guifg=DarkGoldenrod guibg=NONE gui=NONE
hi SpecialComment guifg=cornsilk guibg=NONE gui=NONE
hi Debug guifg=brown guibg=NONE gui=NONE
hi Underlined guifg=IndianRed guibg=NONE gui=NONE
hi Ignore guifg=grey30 guibg=NONE gui=NONE
hi Error guifg=bisque guibg=NONE gui=NONE
"hi Todo guifg=red guibg=bisque
hi SpellRare guifg=khaki guibg=NONE guisp=NONE gui=bold cterm=bold
set cursorline
"set cursorcolumn
highlight Cursor ctermbg=NONE ctermfg=8
"autocmd InsertEnter * set cursorline
hi CursorLine guifg=NONE guibg=#222E30 guisp=#222E30 gui=NONE ctermfg=NONE ctermbg=236 cterm=NONE
hi CursorColumn guifg=NONE guibg=#222E30 guisp=#222E30 gui=NONE ctermfg=NONE ctermbg=236 cterm=NONE
hi Cursor guifg=NONE guibg=#FFFFFF gui=none
set cursorline
highlight Cursor ctermbg=15 ctermfg=8
"autocmd InsertEnter * set cursorline
"autocmd FileType go setlocal nospell
"set spellcapcheck=
"let g:go_fmt_autosave = 0
"hi PMenuSbar guifg=NONE guibg=#848688 guisp=#848688 gui=NONE ctermfg=NONE ctermbg=102 cterm=NONE
"hi PMenuSel guifg=#97d1da guibg=#BD9800 guisp=#BD9800 gui=NONE ctermfg=116 ctermbg=1 cterm=NONE
"hi PMenu guifg=#97d1da guibg=#5E6C70 guisp=#5E6C70 gui=NONE ctermfg=116 ctermbg=66 cterm=NONE
"hi PMenuThumb guifg=NONE guibg=#a4a6a8 guisp=#a4a6a8 gui=NONE ctermfg=NONE ctermbg=248 cterm=NONE
hi NonText guifg=#504945 guibg=NONE gui=NONE cterm=NONE
hi Pmenu guifg=#ebdbb2 guibg=#3c3836 gui=NONE cterm=NONE
hi PmenuSbar guifg=NONE guibg=#3c3836 gui=NONE cterm=NONE
hi PmenuSel guifg=#3c3836 guibg=#83a598 gui=bold cterm=bold
hi PmenuThumb guifg=NONE guibg=#7c6f64 gui=NONE cterm=NONE
hi PmenuKind guifg=#fb4934 guibg=#3c3836 gui=NONE cterm=NONE
hi PmenuKindSel guifg=#fb4934 guibg=#83a598 gui=NONE cterm=NONE
hi PmenuExtra guifg=#a89984 guibg=#3c3836 gui=NONE cterm=NONE
hi PmenuExtraSel guifg=#303030 guibg=#83a598 gui=NONE cterm=NONE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment