mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 00:33:00 +00:00
chezmoi: common
This commit is contained in:
parent
f3f92431b2
commit
95fbc079ba
10 changed files with 23 additions and 574 deletions
|
|
@ -1,73 +0,0 @@
|
||||||
# $DOTFILES/common/gitconfig.example
|
|
||||||
# Date: 2024-12-22
|
|
||||||
# Author: js0ny
|
|
||||||
|
|
||||||
# Location:
|
|
||||||
# Windows: %USERPROFILE%\.gitconfig
|
|
||||||
# *nix: ~/.config/git/config
|
|
||||||
# Linking: (Note that this file is an example, only copy this then edit)
|
|
||||||
# cp $DOTFILES/common/gitconfig.example ~/.config/git/config
|
|
||||||
[user] # Modify the name and email
|
|
||||||
name = whoami
|
|
||||||
email = whoami@example.com
|
|
||||||
[alias]
|
|
||||||
cl = clone
|
|
||||||
clnh = clone --depth 1 # Clone with no history
|
|
||||||
cma = commit -am # Add and commit
|
|
||||||
logs = log --oneline --graph --decorate --all # Show logs
|
|
||||||
last = log -1 HEAD # Show last commit
|
|
||||||
undo = reset --hard HEAD # Undo the last commit
|
|
||||||
[core]
|
|
||||||
editor = nvim
|
|
||||||
pager = delta
|
|
||||||
# autocrlf:
|
|
||||||
# true: Keep crlf in Windows, lf in *nix
|
|
||||||
# input: Keep lf in all platforms
|
|
||||||
autocrlf = input
|
|
||||||
safecrlf = true
|
|
||||||
excludesfile = $XDG_CONFIG_HOME/git/ignore
|
|
||||||
quotePath = false # zh-CN: 解决中文路径问题
|
|
||||||
eol = lf
|
|
||||||
[include]
|
|
||||||
path = ~/.config/git/catppuccin-delta.gitconfig
|
|
||||||
[core]
|
|
||||||
editor = nvim
|
|
||||||
pager = delta
|
|
||||||
autocrlf = input # Force End of Line in different platforms
|
|
||||||
[interactive]
|
|
||||||
diffFilter = delta --color-only
|
|
||||||
[delta]
|
|
||||||
navigate = true
|
|
||||||
dark = true
|
|
||||||
features = catppuccin-mocha # Colorscheme
|
|
||||||
[diff]
|
|
||||||
tool = nvimdiff
|
|
||||||
[difftool]
|
|
||||||
prompt = false
|
|
||||||
[difftool "nvimdiff"]
|
|
||||||
cmd = "nvim -d \"$LOCAL\" \"$REMOTE\""
|
|
||||||
[merge]
|
|
||||||
tool = nvimdiff
|
|
||||||
[mergetool]
|
|
||||||
prompt = false
|
|
||||||
[mergetool "nvimdiff"]
|
|
||||||
cmd = "nvim -d \"$LOCAL\" \"$MERGED\" \"$REMOTE\""
|
|
||||||
[color]
|
|
||||||
ui = auto
|
|
||||||
[pull]
|
|
||||||
ff = only
|
|
||||||
[init]
|
|
||||||
defaultBranch = master
|
|
||||||
[filter "lfs"]
|
|
||||||
clean = git-lfs clean -- %f
|
|
||||||
smudge = git-lfs smudge -- %f
|
|
||||||
process = git-lfs filter-process
|
|
||||||
required = true
|
|
||||||
# Force ssh
|
|
||||||
# Don't use ssh in GitHub since ssh-agent doesn't work in non-interactive environment
|
|
||||||
# While GitHub holds many plugins, it's better to use https
|
|
||||||
# This prevents from Neovide `publickey` error when installing plugins
|
|
||||||
# [url "git@github.com:"]
|
|
||||||
# insteadOf = https://github.com/
|
|
||||||
[url "git@codeberg.org:"]
|
|
||||||
insteadOf = https://codeberg.org/
|
|
||||||
239
common/ideavimrc
239
common/ideavimrc
|
|
@ -1,239 +0,0 @@
|
||||||
" $DOTFILES/common/ideavimrc
|
|
||||||
" Date: 2024-12-22
|
|
||||||
" Author: js0ny
|
|
||||||
|
|
||||||
" Location:
|
|
||||||
" $XDG_CONFIG_HOME/ideavim/ideavimrc
|
|
||||||
" Linking:
|
|
||||||
" ln -sf $DOTFILES/common/ideavimrc $XDG_CONFIG_HOME/ideavim/ideavimrc
|
|
||||||
|
|
||||||
source ~/.local/share/intellimacs/spacemacs.vim
|
|
||||||
|
|
||||||
source ~/.local/share/intellimacs/extra.vim
|
|
||||||
source ~/.local/share/intellimacs/major.vim
|
|
||||||
source ~/.local/share/intellimacs/hybrid.vim
|
|
||||||
|
|
||||||
source ~/.local/share/intellimacs/which-key.vim
|
|
||||||
|
|
||||||
|
|
||||||
" """ Basic Configs """
|
|
||||||
let mapleader = " " " set <leader> to <space>
|
|
||||||
|
|
||||||
""" Colemak """
|
|
||||||
noremap n j
|
|
||||||
noremap e k
|
|
||||||
noremap i l
|
|
||||||
|
|
||||||
" Similar position to i
|
|
||||||
noremap l i
|
|
||||||
noremap L I
|
|
||||||
" ne[k]st
|
|
||||||
noremap k n
|
|
||||||
noremap K N
|
|
||||||
" [j]ump
|
|
||||||
noremap j e
|
|
||||||
noremap J E
|
|
||||||
|
|
||||||
nnoremap H :bp<CR>
|
|
||||||
nnoremap I :bn<CR>
|
|
||||||
noremap N 5j
|
|
||||||
noremap E 5k
|
|
||||||
vnoremap H ^
|
|
||||||
xnoremap H ^
|
|
||||||
onoremap H ^
|
|
||||||
vnoremap I $
|
|
||||||
xnoremap I $
|
|
||||||
onoremap I $
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
" Y to yank to end of line
|
|
||||||
noremap Y y$
|
|
||||||
|
|
||||||
""" Options """
|
|
||||||
" search for actions: :actionlist <patter>
|
|
||||||
|
|
||||||
"" Vim Compat ""
|
|
||||||
set clipboard=unnamedplus,unnamed,ideaput " integrate with system clipboard
|
|
||||||
set gdefault " substitute all occurrences in line per default
|
|
||||||
set history=4096 " keep x lines of command line history
|
|
||||||
set hlsearch
|
|
||||||
set ignorecase
|
|
||||||
set incsearch
|
|
||||||
set keymodel=startsel,stopsel
|
|
||||||
set matchpairs+=<:>
|
|
||||||
set showcmd
|
|
||||||
set smartcase " no ignore case when pattern is uppercase
|
|
||||||
set wrapscan " searches wrap around the end of the file
|
|
||||||
|
|
||||||
"" IDE Settings ""
|
|
||||||
set scrolloff=5
|
|
||||||
set sidescrolloff=10
|
|
||||||
|
|
||||||
"" IDE Features ""
|
|
||||||
set relativenumber " Hybrid Line Number shown
|
|
||||||
|
|
||||||
"" IdeaVim Only ""
|
|
||||||
set ideajoin
|
|
||||||
set ideastatusicon=enabled
|
|
||||||
|
|
||||||
""" Plugins """
|
|
||||||
|
|
||||||
Plug 'justinmk/vim-sneak'
|
|
||||||
Plug 'preservim/nerdtree'
|
|
||||||
Plug 'tpope/vim-surround'
|
|
||||||
Plug 'tpope/vim-commentary'
|
|
||||||
Plug 'terryma/vim-multiple-cursors'
|
|
||||||
Plug 'machakann/vim-highlightedyank'
|
|
||||||
Plug 'easymotion/vim-easymotion'
|
|
||||||
|
|
||||||
""" Keybindings """
|
|
||||||
|
|
||||||
"" don't lose selection when indenting ""
|
|
||||||
vnoremap < <gv
|
|
||||||
vnoremap > >gv
|
|
||||||
vnoremap = =gv
|
|
||||||
|
|
||||||
"" edit ideavim config <leader>v + ""
|
|
||||||
nnoremap <leader>vv :e ~/.ideavimrc<CR>
|
|
||||||
nnoremap <leader>vr :source ~/.ideavimrc<CR>
|
|
||||||
|
|
||||||
"" NERDTree ""
|
|
||||||
nnoremap <leader>e :NERDTreeToggle<CR>
|
|
||||||
|
|
||||||
"" EasyMotion ""
|
|
||||||
nmap s <Plug>(easymotion-f)
|
|
||||||
nmap S <Plug>(easymotion-F)
|
|
||||||
|
|
||||||
"" Sneak ""
|
|
||||||
nmap f <Plug>(sneak-s)
|
|
||||||
nmap F <Plug>(sneak-S)
|
|
||||||
|
|
||||||
"" Language Server Protocol ""
|
|
||||||
nnoremap gd :action GotoDeclaration<CR>
|
|
||||||
nnoremap gtd :action GotoTypeDeclaration<CR>
|
|
||||||
nnoremap gtD :action QuickTypeDefinition<CR>
|
|
||||||
nnoremap gr :action ShowUsages<CR>
|
|
||||||
nnoremap gi :action GotoImplementation<CR>
|
|
||||||
nnoremap gpi :action QuickImplementations<CR>
|
|
||||||
nnoremap gs :action GotoSuperMethod<CR>
|
|
||||||
nnoremap ga :action ShowIntentionActions<CR>
|
|
||||||
nnoremap gq :action ShowIntentionActions<CR>
|
|
||||||
nnoremap ge :action GotoNextError<CR>
|
|
||||||
|
|
||||||
"" Collapse and Expand z + ""
|
|
||||||
nnoremap zi :action ExpandCollapseToggleAction<CR>
|
|
||||||
nnoremap zc :action CollapseRegion<CR>
|
|
||||||
nnoremap zC :action CollapseRegionRecursively<CR>
|
|
||||||
nnoremap zM :action CollapseAll<CR>
|
|
||||||
nnoremap zo :action ExpandRegion<CR>
|
|
||||||
nnoremap zO :action ExpandRegionRecursively<CR>
|
|
||||||
nnoremap zR :action ExpandAll<CR>
|
|
||||||
|
|
||||||
"" Miscs ""
|
|
||||||
nnoremap <leader>: :action GotoAction<CR>
|
|
||||||
nnoremap <leader><leader> :action GotoFile<CR>
|
|
||||||
nnoremap <leader>h :action PrevSplitter<CR>
|
|
||||||
nnoremap <leader>i :action NextSplitter<CR>
|
|
||||||
|
|
||||||
"" AI Related <leader>a + ""
|
|
||||||
nnoremap <leader>ac :action copilot.chat.show<CR>
|
|
||||||
nnoremap <leader>ad :action copilot.disableCopilot<CR>
|
|
||||||
nnoremap <leader>ae :action copilot.enableCopilot<CR>
|
|
||||||
nnoremap <leader>aa :action copilot.openCopilot<CR>
|
|
||||||
|
|
||||||
" <leader>b : +buffer
|
|
||||||
nnoremap <leader>bb :action Switcher<CR>
|
|
||||||
noremap <leader>bd :bdelete<CR>
|
|
||||||
noremap <leader>bh :bprevious<CR>
|
|
||||||
noremap <leader>bi :bnext<CR>
|
|
||||||
noremap <leader>bp :bprevious<CR>
|
|
||||||
noremap <leader>bn :bnext<CR>
|
|
||||||
|
|
||||||
" <leader>c : +code/compile
|
|
||||||
nnoremap <leader>cr :action Run<CR>
|
|
||||||
nnoremap <leader>cf :action ReformatCode<CR>
|
|
||||||
nnoremap <leader>cs :action GotoSymbol<CR>
|
|
||||||
nnoremap <leader>cS :action GotoSymbol<CR>
|
|
||||||
nnoremap <leader>cR :action RenameElement<CR>
|
|
||||||
""" Works for Rider only
|
|
||||||
nnoremap <leader>ce :action ReSharperGotoNextErrorInSolution<CR>
|
|
||||||
nnoremap <leader>cE :action ReSharperGotoPrevErrorInSolution<CR>
|
|
||||||
|
|
||||||
" <leader>d : +debug
|
|
||||||
|
|
||||||
" <leader>f : +file
|
|
||||||
nnoremap <leader>ff :action GotoFile<CR>
|
|
||||||
nnoremap <leader>fF :action TextSearchAction<CR>
|
|
||||||
nnoremap <leader>fc :action ShowSettings<CR>
|
|
||||||
nnoremap <leader>fC :action ShowSettings<CR>
|
|
||||||
nnoremap <leader>fe :NERDTreeToggle<CR>
|
|
||||||
nnoremap <leader>fo :OpenInAssociatedApplication<CR>
|
|
||||||
nnoremap <leader>ft :action ActivateTerminalToolWindow<CR>
|
|
||||||
nnoremap <leader>fx :action WelcomeScreen.Plugins<CR>
|
|
||||||
|
|
||||||
" <leader>g : +git
|
|
||||||
nnoremap <leader>gp :action Git.Pull<CR>
|
|
||||||
nnoremap <leader>gP :action Vcs.Push<CR>
|
|
||||||
nnoremap <leader>gb :action Git.Branches<CR>
|
|
||||||
nnoremap <leader>gR :action Git.Rebase<CR>
|
|
||||||
nnoremap <leader>gM :action Git.Merge<CR>
|
|
||||||
nnoremap <leader>gc :action CheckinProject<CR>
|
|
||||||
nnoremap <leader>gC :action Git.Clone<CR>
|
|
||||||
nnoremap <leader>gg :action ActivateVersionControlToolWindow<CR>
|
|
||||||
nnoremap <leader>gS :action Git.Stash<CR>
|
|
||||||
|
|
||||||
" <leader>h : +help
|
|
||||||
|
|
||||||
" <leader>p : +project
|
|
||||||
nnoremap <leader>pr :action Run<CR>
|
|
||||||
nnoremap <leader>pd :action Debug<CR>
|
|
||||||
nnoremap <leader>pb :action Build<CR>
|
|
||||||
|
|
||||||
" <leader>q : +quit
|
|
||||||
nnoremap <leader>qq :action Exit<CR>
|
|
||||||
nnoremap <leader>Q :action Exit<CR>
|
|
||||||
|
|
||||||
" <leader>r : +refactor
|
|
||||||
nnoremap <leader>ri :action Inline<CR>
|
|
||||||
nnoremap <leader>rr :action RenamElement<CR>
|
|
||||||
nnoremap <leader>rev :action IntroduceVariable<CR>
|
|
||||||
vnoremap <leader>rev :action IntroduceVariable<CR>
|
|
||||||
nnoremap <leader>rem :action ExtractMethod<CR>
|
|
||||||
vnoremap <leader>rem :action ExtractMethod<CR>
|
|
||||||
nnoremap <leader>rm :action Move<CR>
|
|
||||||
nnoremap <leader>ro :action OptimizeImports<CR>
|
|
||||||
nnoremap <leader>rG :action Generate<CR>
|
|
||||||
|
|
||||||
" <leader>t : +test
|
|
||||||
nnoremap <leader>tt :action RiderUnitTestRunSolutionAction<CR>
|
|
||||||
nnoremap <leader>tT :action Rider.UnitTesting.MainMenu<CR>
|
|
||||||
|
|
||||||
" <leader>u : +ui
|
|
||||||
nnoremap <leader>ui :action ChangeLaf<CR>
|
|
||||||
nnoremap <leader>uw :action EditorToggleUseSoftWraps<CR>
|
|
||||||
|
|
||||||
" <leader>w : +write/window
|
|
||||||
nnoremap <leader>ww :write<CR>
|
|
||||||
nnoremap <leader>wa :wall<CR>
|
|
||||||
nnoremap <leader>wq :wq<CR>
|
|
||||||
nnoremap <leader>W :write<CR>
|
|
||||||
nnoremap <leader>wh :action PrevSplitter<CR>
|
|
||||||
nnoremap <leader>wi :action NextSplitter<CR>
|
|
||||||
nnoremap <leader>wH :action SplitHorizontally<CR>
|
|
||||||
nnoremap <leader>wI :action SplitHorizontally<CR>
|
|
||||||
nnoremap <leader>wN :action SplitVertically<CR>
|
|
||||||
nnoremap <leader>wE :action SplitVertically<CR>
|
|
||||||
nnoremap <leader>w- :action SplitHorizontally<CR>
|
|
||||||
nnoremap <leader>w| :action SplitVertically<CR>
|
|
||||||
nnoremap <leader>w\ :action SplitVertically<CR>
|
|
||||||
|
|
||||||
nnoremap <C-p> :action ParameterInfo<CR>
|
|
||||||
inoremap <C-p> <C-o>:action ParameterInfo<CR>
|
|
||||||
|
|
||||||
""" Handling Ctrls """
|
|
||||||
|
|
||||||
sethandler <C-C> i:ide
|
|
||||||
sethandler <C-V> n-v:vim i:ide
|
|
||||||
sethandler <C-.> a:ide
|
|
||||||
sethandler <A-<CR>> a:ide
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
strict-ssl=false
|
|
||||||
|
|
@ -1,159 +0,0 @@
|
||||||
# ~/.bashrc: executed by bash(1) for non-login shells.
|
|
||||||
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
|
||||||
# for examples
|
|
||||||
|
|
||||||
# If not running interactively, don't do anything
|
|
||||||
case $- in
|
|
||||||
*i*) ;;
|
|
||||||
*) return;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# don't put duplicate lines or lines starting with space in the history.
|
|
||||||
# See bash(1) for more options
|
|
||||||
HISTCONTROL=ignoreboth
|
|
||||||
|
|
||||||
# append to the history file, don't overwrite it
|
|
||||||
shopt -s histappend
|
|
||||||
|
|
||||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
|
||||||
HISTSIZE=1000
|
|
||||||
HISTFILESIZE=2000
|
|
||||||
|
|
||||||
# check the window size after each command and, if necessary,
|
|
||||||
# update the values of LINES and COLUMNS.
|
|
||||||
shopt -s checkwinsize
|
|
||||||
|
|
||||||
# If set, the pattern "**" used in a pathname expansion context will
|
|
||||||
# match all files and zero or more directories and subdirectories.
|
|
||||||
#shopt -s globstar
|
|
||||||
|
|
||||||
# make less more friendly for non-text input files, see lesspipe(1)
|
|
||||||
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
|
||||||
|
|
||||||
# set variable identifying the chroot you work in (used in the prompt below)
|
|
||||||
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
|
||||||
debian_chroot=$(cat /etc/debian_chroot)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# set a fancy prompt (non-color, unless we know we "want" color)
|
|
||||||
case "$TERM" in
|
|
||||||
xterm-color|*-256color) color_prompt=yes;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# uncomment for a colored prompt, if the terminal has the capability; turned
|
|
||||||
# off by default to not distract the user: the focus in a terminal window
|
|
||||||
# should be on the output of commands, not on the prompt
|
|
||||||
#force_color_prompt=yes
|
|
||||||
|
|
||||||
if [ -n "$force_color_prompt" ]; then
|
|
||||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
|
||||||
# We have color support; assume it's compliant with Ecma-48
|
|
||||||
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
|
||||||
# a case would tend to support setf rather than setaf.)
|
|
||||||
color_prompt=yes
|
|
||||||
else
|
|
||||||
color_prompt=
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$color_prompt" = yes ]; then
|
|
||||||
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
|
||||||
else
|
|
||||||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
|
||||||
fi
|
|
||||||
unset color_prompt force_color_prompt
|
|
||||||
|
|
||||||
# If this is an xterm set the title to user@host:dir
|
|
||||||
case "$TERM" in
|
|
||||||
xterm*|rxvt*)
|
|
||||||
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# enable color support of ls and also add handy aliases
|
|
||||||
if [ -x /usr/bin/dircolors ]; then
|
|
||||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
|
||||||
alias ls='ls --color=auto'
|
|
||||||
#alias dir='dir --color=auto'
|
|
||||||
#alias vdir='vdir --color=auto'
|
|
||||||
|
|
||||||
#alias grep='grep --color=auto'
|
|
||||||
#alias fgrep='fgrep --color=auto'
|
|
||||||
#alias egrep='egrep --color=auto'
|
|
||||||
fi
|
|
||||||
|
|
||||||
# colored GCC warnings and errors
|
|
||||||
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
|
||||||
|
|
||||||
# some more ls aliases
|
|
||||||
alias ll='ls -l'
|
|
||||||
alias la='ls -A'
|
|
||||||
alias l='ls -CF'
|
|
||||||
|
|
||||||
# Alias definitions.
|
|
||||||
# You may want to put all your additions into a separate file like
|
|
||||||
# ~/.bash_aliases, instead of adding them here directly.
|
|
||||||
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
|
||||||
|
|
||||||
if [ -f ~/.bash_aliases ]; then
|
|
||||||
. ~/.bash_aliases
|
|
||||||
fi
|
|
||||||
|
|
||||||
# enable programmable completion features (you don't need to enable
|
|
||||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
|
||||||
# sources /etc/bash.bashrc).
|
|
||||||
if ! shopt -oq posix; then
|
|
||||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
|
||||||
. /usr/share/bash-completion/bash_completion
|
|
||||||
elif [ -f /etc/bash_completion ]; then
|
|
||||||
. /etc/bash_completion
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
export NVM_DIR="$HOME/.nvm"
|
|
||||||
[ -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
|
|
||||||
source ~/.nvm/nvm.sh
|
|
||||||
|
|
||||||
|
|
||||||
# Append to original bashrc for minimal setup
|
|
||||||
# echo $DOTFILES/wsl/.bashrc >> ~/.bashrc
|
|
||||||
bind 'set show-mode-in-prompt on'
|
|
||||||
set -o vi
|
|
||||||
|
|
||||||
alias svi="sudo vim" # Prevent conflicts with svelte-cli
|
|
||||||
alias v="vim"
|
|
||||||
|
|
||||||
alias sdocker="sudo docker"
|
|
||||||
alias scompose="sudo docker compose up -d"
|
|
||||||
alias sdockerps="sudo docker ps"
|
|
||||||
alias netl="netstat -tulnp"
|
|
||||||
|
|
||||||
alias apt="sudo apt"
|
|
||||||
alias apts="apt search"
|
|
||||||
alias apti="sudo apt install"
|
|
||||||
alias aptr="sudo apt remove"
|
|
||||||
alias aptu="sudo apt upgrade && sudo apt update"
|
|
||||||
|
|
||||||
alias l="ls -lah"
|
|
||||||
alias ll="ls -l"
|
|
||||||
alias la="ls -lA"
|
|
||||||
|
|
||||||
bind 'set vi-ins-mode-string "sh"'
|
|
||||||
bind 'set vi-cmd-mode-string "vi"'
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
PS2=" > "
|
|
||||||
update_ps1() {
|
|
||||||
local last_status=$?
|
|
||||||
if [[ $last_status -eq 0 ]]; then
|
|
||||||
PS1="\[\e[0;33m\] \[\e[0;35m\][\A] \[\e[0;32m\]\u @ \h \[\e[0;34m\]in \w \[\e[0;32m\]✔\n \$ \[\e[0m\]"
|
|
||||||
else
|
|
||||||
PS1="\[\e[0;33m\] \[\e[0;35m\][\A] \[\e[0;32m\]\u @ \h \[\e[0;34m\]in \w \[\e[0;31m\]✘\n \$ \[\e[0m\]"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
PROMPT_COMMAND=update_ps1
|
|
||||||
|
|
@ -1,60 +0,0 @@
|
||||||
|
|
||||||
" Source a global configuration file if available
|
|
||||||
if filereadable("/etc/vim/vimrc.local")
|
|
||||||
source /etc/vim/vimrc.local
|
|
||||||
endif
|
|
||||||
|
|
||||||
" This is a minimal setup of vimrc
|
|
||||||
" ln -sf $DOTFILES/.config/vim/vimrc $XDG_CONFIG_HOME/vim/vimrc
|
|
||||||
|
|
||||||
" Colemak Keys
|
|
||||||
|
|
||||||
" Arrow remap
|
|
||||||
noremap n j
|
|
||||||
noremap e k
|
|
||||||
noremap i l
|
|
||||||
nnoremap N 5j
|
|
||||||
nnoremap E 5k
|
|
||||||
vnoremap H ^
|
|
||||||
xnoremap H ^
|
|
||||||
onoremap H ^
|
|
||||||
vnoremap I $
|
|
||||||
xnoremap I $
|
|
||||||
onoremap I $
|
|
||||||
noremap I L
|
|
||||||
|
|
||||||
" Similar position to i
|
|
||||||
noremap l i
|
|
||||||
noremap L I
|
|
||||||
" ne[k]st
|
|
||||||
noremap k n
|
|
||||||
noremap K N
|
|
||||||
" [j]ump
|
|
||||||
noremap j e
|
|
||||||
noremap J E
|
|
||||||
|
|
||||||
" Normal minimal setup
|
|
||||||
|
|
||||||
noremap Y y$
|
|
||||||
set expandtab
|
|
||||||
set tabstop=4
|
|
||||||
set shiftwidth=4
|
|
||||||
set autoindent
|
|
||||||
set smartindent
|
|
||||||
set wrap
|
|
||||||
set scrolloff=3
|
|
||||||
set hlsearch
|
|
||||||
set incsearch
|
|
||||||
set ignorecase
|
|
||||||
set smartcase
|
|
||||||
set showcmd
|
|
||||||
set mouse=a " Enable mouse usage (all modes)
|
|
||||||
|
|
||||||
set number
|
|
||||||
set relativenumber
|
|
||||||
|
|
||||||
set laststatus=2
|
|
||||||
set showcmd
|
|
||||||
set statusline=%<%f\ %h%m%r\ %=\ [%l,%v]\ [%p%%]\ [\ %Y]\ [\ %{strftime('%H:%M:%S')}]
|
|
||||||
|
|
||||||
syntax on
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
|
|
||||||
[settings]
|
|
||||||
api_key = FILL_YOUR_API_KEY_HERE
|
|
||||||
exclude =
|
|
||||||
^COMMIT_EDITMSG$
|
|
||||||
^TAG_EDITMSG$
|
|
||||||
*.md
|
|
||||||
*.org
|
|
||||||
*.txt
|
|
||||||
*.log
|
|
||||||
include =
|
|
||||||
readme.md
|
|
||||||
README.md
|
|
||||||
readme.org
|
|
||||||
README.org
|
|
||||||
readme.txt
|
|
||||||
README.txt
|
|
||||||
readme
|
|
||||||
README
|
|
||||||
10
common/NuGet.Config → dot_config/NuGet/nuget.config
Executable file → Normal file
10
common/NuGet.Config → dot_config/NuGet/nuget.config
Executable file → Normal file
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<packageSources>
|
<packageSources>
|
||||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
|
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
|
||||||
</packageSources>
|
</packageSources>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
# $DOTFILES/common/condarc.yaml
|
# $DOTFILES/common/condarc.yaml
|
||||||
# Date: 2024-12-22
|
# Date: 2024-12-22
|
||||||
# Author: js0ny
|
# Author: js0ny
|
||||||
|
|
||||||
# Location:
|
# Location:
|
||||||
# $XDG_CONFIG_HOME/conda/.condarc
|
# $XDG_CONFIG_HOME/conda/.condarc
|
||||||
# Linking:
|
# Linking:
|
||||||
# ln -s $DOTFILES/.config/conda/condarc.yaml $XDG_CONFIG_HOME/conda/.condarc
|
# ln -s $DOTFILES/.config/conda/condarc.yaml $XDG_CONFIG_HOME/conda/.condarc
|
||||||
# ================================================================================
|
# ================================================================================
|
||||||
# Reference:
|
# Reference:
|
||||||
# https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html
|
# https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html
|
||||||
|
|
||||||
# Use system python by default for better script compatibility
|
# Use system python by default for better script compatibility
|
||||||
auto_activate_base: false
|
auto_activate_base: false
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
# $XDG_CONFIG_HOME/pip/pip.conf
|
# $XDG_CONFIG_HOME/pip/pip.conf
|
||||||
# ln -sf $DOTFILES/.config/pip/pip.conf $XDG_CONFIG_HOME/pip/pip.conf
|
# ln -sf $DOTFILES/.config/pip/pip.conf $XDG_CONFIG_HOME/pip/pip.conf
|
||||||
# New-Item -ItemType SymbolicLink -Path $Env:XDG_CONFIG_HOME/pip/pip.conp -Value $DOTFILES\.config\pip\pip.conf
|
# New-Item -ItemType SymbolicLink -Path $Env:XDG_CONFIG_HOME/pip/pip.conp -Value $DOTFILES\.config\pip\pip.conf
|
||||||
[global]
|
[global]
|
||||||
# index-url = https://pypi.tuna.tsinghua.edu.cn/simple
|
# index-url = https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
Loading…
Add table
Add a link
Reference in a new issue