IT/Mac OS
Mac OS Command Line 환경 설정
묵회
2022. 12. 7. 09:27
~/.vim/colors/torte2.vim
" Vim color file
" Maintainer: Thorsten Maerz <info@netztorte.de>
" Last Change: 2006 Dec 07
" grey on black
" optimized for TFT panels
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
"colorscheme default
let g:colors_name = "torte2"
" hardcoded colors :
" GUI Comment : #80a0ff = Light blue
" GUI
highlight Normal guifg=Grey80 guibg=Black
highlight Search guifg=Black guibg=Red gui=bold
highlight Visual guifg=#404040 gui=bold
highlight Cursor guifg=Black guibg=Green gui=bold
highlight Special guifg=Orange
highlight Comment guifg=#80a0ff
highlight StatusLine guifg=blue guibg=white
highlight Statement guifg=Yellow gui=NONE
highlight Type gui=NONE
" Console
"highlight Normal ctermfg=LightGrey ctermbg=Black
"highlight Search ctermfg=Black ctermbg=Red cterm=NONE
"highlight Visual cterm=reverse
"highlight Cursor ctermfg=Black ctermbg=Green cterm=bold
"highlight Special ctermfg=Brown
"highlight Comment ctermfg=Blue
"highlight StatusLine ctermfg=blue ctermbg=white
"highlight Statement ctermfg=Yellow cterm=NONE
"highlight Type cterm=NONE
" only for vim 5
if has("unix")
if v:version<600
highlight Normal ctermfg=Grey ctermbg=Black cterm=NONE guifg=Grey80 guibg=Black gui=NONE
highlight Search ctermfg=Black ctermbg=Red cterm=bold guifg=Black guibg=Red gui=bold
highlight Visual ctermfg=Black ctermbg=yellow cterm=bold guifg=#404040 gui=bold
highlight Special ctermfg=LightBlue cterm=NONE guifg=LightBlue gui=NONE
highlight Comment ctermfg=Cyan cterm=NONE guifg=LightBlue gui=NONE
endif
endif
~/.gitconfig
# This is Git's per-user configuration file.
[user]
name = musonous
email = musonous@gmail.com
[alias]
co = checkout
br = branch
ci = commit
st = status
unstags = reset HEAD --
last = log -1 HEAD
l = log --oneline
lg = log --decorate --graph
visual = !gitk
~/.vimrc
set showmode
colorscheme torte2
"set hlsearch " highlight the last searched term
" Tell vim to remember certain things when we exit
" '10 : marks will be remembered for up to 10 previously edited files
" "100 : will save up to 100 lines for each register
" :20 : up to 20 lines of command-line history will be remembered
" % : saves and restores the buffer list
" n... : where to save the viminfo files
set viminfo='20,\"50,:20
set nu " display line number
set ruler
set visualbell
syntax on "syntax highlighting
set autoindent
"set cindent
" tab action
set tabstop=8
set smarttab
filetype plugin on "use the file type plugins
autocmd FileType c,cpp,java,python,sh,dosbatch set softtabstop=4|set shiftwidth=4|set expandtab
" backspace and cursor keys wrap to previous/next line
set backspace=indent,eol,start whichwrap+=<,>,[,]
nmap ^C-]> :exe "tjump ".expand("<cword>")<CR>
" tag file
set tags=tags
" cscope
if has("cscope")
set csto=0
cs add cscope.out
if $CSCOPE_DB != ""
cs add $CSCOPE_DB
else
cs add ~/ref/linux-4.18.3/cscope.out
"else
" cs add /usr/src/linux-source-2.6.22/cscope.out
endif
set cscopeverbose
" cscope/vim key mappings
" 's' symbol: find all references to the token under cursor
" 'g' global: find global definition(s) of the token under cursor
" 'c' calls: find all calls to the function name under cursor
" 't' text: find all instances of the text under cursor
" 'e' egrep: egrep search for the word under cursor
" 'f' file: open the filename under cursor
" 'i' includes: find files that include the filename under cursor
" 'd' called: find functions that function under cursor calls
nmap <C-\>s :cs find s <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>g :cs find g <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>c :cs find c <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>t :cs find t <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>e :cs find e <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>f :cs find f <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>i :cs find i <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>d :cs find d <C-R>=expand("<cword>")<CR><CR>
" CTRL-space <C-@> search and split horizonal window
nmap <C-@>s :scs find s <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>g :scs find g <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>c :scs find c <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>t :scs find t <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>e :scs find e <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>f :scs find f <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>i :scs find i <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>d :scs find d <C-R>=expand("<cword>")<CR><CR>
" CTRL-space CTRL-space vertical split
nmap <C-@><C-@>s :vert scs find s <C-R>=expand("<cword>")<CR><CR>
nmap <C-@><C-@>g :vert scs find g <C-R>=expand("<cword>")<CR><CR>
nmap <C-@><C-@>c :vert scs find c <C-R>=expand("<cword>")<CR><CR>
nmap <C-@><C-@>t :vert scs find t <C-R>=expand("<cword>")<CR><CR>
nmap <C-@><C-@>e :vert scs find e <C-R>=expand("<cword>")<CR><CR>
nmap <C-@><C-@>f :vert scs find f <C-R>=expand("<cword>")<CR><CR>
nmap <C-@><C-@>i :vert scs find i <C-R>=expand("<cword>")<CR><CR>
nmap <C-@><C-@>d :vert scs find d <C-R>=expand("<cword>")<CR><CR>
" key map timeout
"set notimeout
" Or
"set timetouteln=4000
"set ttimeout
"set ttimeoutlen=100
endif
~/.zshrc
#!/bin/zsh
PS1="%n %~$ "
PATH=".:$HOME/bin:$PATH"
EDITOR=vim
# File search functions
function f() { find . -iname "*$1*" ${@:2} }
function r() { grep "$1" ${@:2} -R . }
# Create a folder and move into it in one command
function mkcd() { mkdir -p "$@" && cd "$_"; }
alias cppcompile='c++ -std=c++11 -stdlib=libc++'
alias g='git'
alias gg='exit'
alias cs='cscope'
alias python='python3'
alias p='python3'
alias ls='ls -FG'
alias ll='ls -l'
alias la='ls -al'
alias history='history -50'
alias h=history
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
export PATH="$HOME/.poetry/bin:$PATH"