mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
refractor: Reorganise dotfiles structures
This commit is contained in:
parent
2bd9138a5f
commit
bd5ca49c3e
131 changed files with 43 additions and 114 deletions
6
common/NuGet.Config
Normal file
6
common/NuGet.Config
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
7
common/condarc.yaml
Normal file
7
common/condarc.yaml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# $XDG_CONFIG_HOME/conda/condarc.yaml
|
||||
# ==================================================================
|
||||
# New-Item -ItemType SymbolicLink -Path $Env:XDG_CONFIG_HOME\conda\.condarc -Target $DOTFILES\.config\conda\condarc.yaml
|
||||
# ln -s $DOTFILES/.config/conda/condarc.yaml $XDG_CONFIG_HOME/conda/.condarc
|
||||
# ==================================================================
|
||||
# https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html
|
||||
auto_activate_base: false
|
||||
22
common/gitconfig
Normal file
22
common/gitconfig
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# $XDG_CONFIG_HOME/git/config
|
||||
# %USERPROFILE%\.gitconfig # No XDG support on Windows
|
||||
# ln -sf $DOTFILES/.config/git/.gitconfig $XDG_CONFIG_HOME/git/config
|
||||
# New-Item -ItemType SymbolicLink -Path "$Env:XDG_CONFIG_HOME\git\config" -Target "$DOTFILES\.config\git\.gitconfig"
|
||||
[user]
|
||||
name = js0ny
|
||||
email = json.y@outlook.com
|
||||
[core]
|
||||
editor = nvim
|
||||
pager = delta
|
||||
[interactive]
|
||||
diffFilter = delta --color-only
|
||||
[delta]
|
||||
navigate = true
|
||||
dark = true
|
||||
[filter "lfs"]
|
||||
clean = git-lfs clean -- %f
|
||||
smudge = git-lfs smudge -- %f
|
||||
process = git-lfs filter-process
|
||||
required = true
|
||||
[url "git@github.com:"]
|
||||
insteadOf = https://github.com/
|
||||
10
common/glow.yaml
Normal file
10
common/glow.yaml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# ~/.config/glow/glow.yaml
|
||||
# ln -sf $DOTFILES/glow/glow.yaml ~/.config/glow/glow.yaml
|
||||
# style name or JSON path (default "auto")
|
||||
style: "auto"
|
||||
# mouse support (TUI-mode only)
|
||||
mouse: true
|
||||
# use pager to display markdown
|
||||
pager: true
|
||||
# word-wrap at width
|
||||
width: 80
|
||||
1
common/haskeline
Normal file
1
common/haskeline
Normal file
|
|
@ -0,0 +1 @@
|
|||
editMode: Vi
|
||||
152
common/ideavimrc
Normal file
152
common/ideavimrc
Normal file
|
|
@ -0,0 +1,152 @@
|
|||
"$XDG_CONFIG_HOME/ideavim/ideavimrc
|
||||
" New-Item -ItemType SymbolicLink -Path ~\.ideavimrc -Target $DOTFILES\.config\ideavim\ideavimrc.vimrc
|
||||
" ln -sf $DOTFILES/.config/ideavim/ideavimrc.vimrc $XDG_CONFIG_HOME/ideavim/ideavimrc
|
||||
""" Basic Configs """
|
||||
let mapleader = " " " set <leader> to <space>
|
||||
|
||||
""" Colemak """
|
||||
" Word wrap
|
||||
noremap n gj
|
||||
noremap e gk
|
||||
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
|
||||
|
||||
" 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 """
|
||||
|
||||
"" 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)
|
||||
|
||||
"" Miscs ""
|
||||
nnoremap <leader>: :action GotoAction<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>ai :action copilot.openCopilot<CR>
|
||||
|
||||
"" Codes Action <leader>c + ""
|
||||
nnoremap <leader>cf :action ReformatCode<CR>
|
||||
nnoremap <leader>cs :action GotoSymbol<CR>
|
||||
nnoremap <leader>c/ :action CommentByLineComment<CR>
|
||||
|
||||
"" Project Action <leader>p + ""
|
||||
nnoremap <leader>pr :action Run<CR>
|
||||
nnoremap <leader>pd :action Debug<CR>
|
||||
nnoremap <leader>pb :action Build<CR>
|
||||
|
||||
"" Files Action <leader>f + ""
|
||||
nnoremap <leader>fe :NERDTreeToggle<CR>
|
||||
nnoremap <leader>ft :action ActivateTerminalToolWindow<CR>
|
||||
|
||||
"" Tab Actions <leader><tab> + ""
|
||||
nnoremap <leader><tab><tab> :action Switcher<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>
|
||||
|
||||
"" don't lose selection when indenting ""
|
||||
vnoremap < <gv
|
||||
vnoremap > >gv
|
||||
vnoremap = =gv
|
||||
|
||||
|
||||
nnoremap <leader>a :action FindInPath<CR>
|
||||
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
|
||||
nnoremap gq :action ShowIntentionActions<CR>
|
||||
nnoremap ge :action GotoNextError<CR>
|
||||
|
||||
nnoremap <C-p> :action ParameterInfo<CR>
|
||||
inoremap <C-p> <C-o>:action ParameterInfo<CR>
|
||||
|
||||
"" Refractor <leader>r + ""
|
||||
|
||||
nnoremap <leader>ri :action Inline<CR>
|
||||
nnoremap <leader>rr :action RenameElement<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>
|
||||
|
||||
""" Handling Ctrls """
|
||||
|
||||
sethandler <C-V> n-v:vim i:ide
|
||||
sethandler <C-.> a:ide
|
||||
sethandler <A-<CR>> a:ide
|
||||
19
common/inputrc
Normal file
19
common/inputrc
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# $XDG_CONFIG_HOME/readline/inputrc
|
||||
|
||||
# Colemak Key Remaps
|
||||
set editing-mode vi
|
||||
set keymap vi
|
||||
set show-mode-in-prompt on
|
||||
|
||||
set mark-directories on
|
||||
set completion-ignore-case on
|
||||
set show-all-if-ambiguous on
|
||||
set bell-style none
|
||||
|
||||
$if mode=vi
|
||||
"n": next-history
|
||||
"e": previous-history
|
||||
"l": vi-insertion-mode
|
||||
"L": vi-insert-beg
|
||||
"i": forward-char
|
||||
$endif
|
||||
13
common/lesskey
Normal file
13
common/lesskey
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# $XDG_CONFIG_HOME/lesskey -- less options
|
||||
# ln -sf $DOTFILES/.config/lesskey $XDG_CONFIG_HOME/lesskey
|
||||
# work for less -V > 582, for mac, use brew install less to override the system less
|
||||
|
||||
# Format: key action
|
||||
|
||||
# Arrow Remap (hnei -> hjkl)
|
||||
n forw-line
|
||||
e back-line
|
||||
|
||||
# search with k : ne[k]st
|
||||
k repeat-search
|
||||
K reverse-search
|
||||
6
common/npmrc
Normal file
6
common/npmrc
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc
|
||||
# ===========================================================
|
||||
# $XDG_CONFIG_HOME/npm/npmrc
|
||||
# ln -s $DOTFILES/.config/npm/npmrc $NPM_CONFIG_USERCONFIG
|
||||
# New-Item -ItemType SymbolicLink -Path $env:NPM_CONFIG_USERCONFIG -Value $env:DOTFILES/.config/npm/npmrc
|
||||
# registry=https://registry.npmmirror.com
|
||||
59
common/obsidian.vimrc
Normal file
59
common/obsidian.vimrc
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
" Put this in OBSIDIAN_VAULT/.obsidian.vimrc
|
||||
set clipboard=unnamed " Sync with System Clipboard
|
||||
|
||||
" Word wrap
|
||||
noremap n gj
|
||||
noremap e gk
|
||||
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
|
||||
|
||||
" Y to yank to end of line
|
||||
noremap Y y$
|
||||
|
||||
""" Visual mode surrounding
|
||||
exmap addbold obcommand editor:toogle-bold
|
||||
exmap additalic obcommand editor:toogle-italic
|
||||
exmap addhighlight obcommand editor:toogle-highlight
|
||||
exmap addcode obcommand editor:toogle-code
|
||||
exmap adddel obcommand editor:toogle-strikethrough
|
||||
vnoremap ~ :adddel<CR> " Add delete to selection
|
||||
vnoremap ` c`<C-r>"`<Esc> " editor:toogle-code is buggy
|
||||
vnoremap * :addbold<CR> " Add bold to selection
|
||||
vnoremap _ :additalic<CR> " Add italic to selection
|
||||
vnoremap = :addhighlight " Add highlight to selection
|
||||
|
||||
exmap prevtab obcommand workspace:previous-tab
|
||||
exmap nexttab obcommand workspace:next-tab
|
||||
nnoremap H :prevtab<CR>
|
||||
nnoremap I :nexttab<CR>
|
||||
|
||||
exmap reload :source .obsidian.vimrc<CR>
|
||||
|
||||
unmap <Space>
|
||||
exmap vsplit obcommand workspace:split-vertical
|
||||
exmap hsplit obcommand workspace:split-horizontal
|
||||
map <Space>| :vsplit<CR>
|
||||
map <Space>- :hsplit<CR>
|
||||
" map <Space>bd
|
||||
|
||||
exmap chat obcommand obsidian-custom-frames:open-custom-frames-chatgpt
|
||||
map <Space>ai :chat<CR>
|
||||
|
||||
exmap omnisearch obcommand omnisearch:show-modal
|
||||
map <Space><Space> :omnisearch<CR>
|
||||
|
||||
exmap command-palette obcommand command-palette:open
|
||||
map <Space>: :command-palette<CR>
|
||||
|
||||
""" g-commands
|
||||
exmap tsource obcommand editor:toggle-source
|
||||
nnoremap gs :tsource<CR>
|
||||
5
common/pip.conf
Normal file
5
common/pip.conf
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# $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
|
||||
[global]
|
||||
# index-url = https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
161
common/remote.bashrc
Normal file
161
common/remote.bashrc
Normal file
|
|
@ -0,0 +1,161 @@
|
|||
# ~/.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 sv="sudo vim"
|
||||
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"
|
||||
aptr() {
|
||||
sudo apt remove $1 || sudo apt autoremove
|
||||
}
|
||||
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
|
||||
61
common/tmux.conf
Normal file
61
common/tmux.conf
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
# $XDG_CONFIG_HOME/tmux/tmux.conf
|
||||
# ln -sf $DOTFILES/.config/tmux/tmux.conf $XDG_CONFIG_HOME/tmux/tmux.conf
|
||||
|
||||
# Prefix
|
||||
# -----------------
|
||||
set-option -g prefix C-a
|
||||
unbind C-b
|
||||
bind C-a send-prefix
|
||||
|
||||
# Options
|
||||
set-option -g mouse on
|
||||
set-option -g default-terminal "screen-256color"
|
||||
set-option -g allow-rename on
|
||||
set-option -g alternate-screen on
|
||||
set-option -g visual-activity on
|
||||
set-option -g pane-border-style fg=colour244
|
||||
set-option -g pane-activity-border-style fg=colour239
|
||||
|
||||
# Index
|
||||
# -----------------
|
||||
set -g base-index 1
|
||||
set -g pane-base-index 1
|
||||
|
||||
# History
|
||||
# -----------------
|
||||
set -g history-limit 4096
|
||||
|
||||
# Reload Config
|
||||
# -----------------
|
||||
bind r source-file ~/.config/tmux/tmux.conf \; display "Reloaded Config"
|
||||
|
||||
# Vi Mode
|
||||
# -----------------
|
||||
set -g status-keys vi
|
||||
set-window-option -g mode-keys vi
|
||||
|
||||
# Windows Management
|
||||
# -----------------
|
||||
bind | split-window -h
|
||||
unbind '"'
|
||||
bind - split-window -v
|
||||
unbind %
|
||||
bind h select-pane -L
|
||||
bind n select-pane -D
|
||||
bind e select-pane -U
|
||||
bind i select-pane -R
|
||||
bind -r H resize-pane -L 5
|
||||
bind -r N resize-pane -D 5
|
||||
bind -r E resize-pane -U 5
|
||||
bind -r I resize-pane -R 5
|
||||
bind C-h select-window -t :-
|
||||
bind C-i select-window -t :+
|
||||
bind ` resize-pane -Z
|
||||
|
||||
# Status Bar
|
||||
# -----------------
|
||||
set -g status-position top
|
||||
set-option -g status-bg black
|
||||
set-option -g status-fg white
|
||||
set-option -g status-left '#[fg=green][#S] '
|
||||
setw -g window-status-current-format '#[fg=colour236,bg=colour39] #I #W '
|
||||
106
common/vim.noxdg.vimrc
Normal file
106
common/vim.noxdg.vimrc
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
" $VIMRUNTIME refers to the versioned system directory where Vim stores its
|
||||
" system runtime files -- /usr/share/vim/vim<version>.
|
||||
"
|
||||
" Vim will load $VIMRUNTIME/defaults.vim if the user does not have a vimrc.
|
||||
" This happens after /etc/vim/vimrc(.local) are loaded, so it will override
|
||||
" any settings in these files.
|
||||
"
|
||||
" If you don't want that to happen, uncomment the below line to prevent
|
||||
" defaults.vim from being loaded.
|
||||
" let g:skip_defaults_vim = 1
|
||||
"
|
||||
" If you would rather _use_ default.vim's settings, but have the system or
|
||||
" user vimrc override its settings, then uncomment the line below.
|
||||
" source $VIMRUNTIME/defaults.vim
|
||||
|
||||
" All Debian-specific settings are defined in $VIMRUNTIME/debian.vim and
|
||||
" sourced by the call to :runtime you can find below. If you wish to change
|
||||
" any of those settings, you should do it in this file or
|
||||
" /etc/vim/vimrc.local, since debian.vim will be overwritten everytime an
|
||||
" upgrade of the vim packages is performed. It is recommended to make changes
|
||||
" after sourcing debian.vim so your settings take precedence.
|
||||
|
||||
runtime! debian.vim
|
||||
|
||||
" Uncomment the next line to make Vim more Vi-compatible
|
||||
" NOTE: debian.vim sets 'nocompatible'. Setting 'compatible' changes
|
||||
" numerous options, so any other options should be set AFTER changing
|
||||
" 'compatible'.
|
||||
"set compatible
|
||||
|
||||
" Vim5 and later versions support syntax highlighting. Uncommenting the next
|
||||
" line enables syntax highlighting by default.
|
||||
syntax on
|
||||
|
||||
" If using a dark background within the editing area and syntax highlighting
|
||||
" turn on this option as well
|
||||
"set background=dark
|
||||
|
||||
" Uncomment the following to have Vim jump to the last position when
|
||||
" reopening a file
|
||||
"au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
|
||||
|
||||
" Uncomment the following to have Vim load indentation rules and plugins
|
||||
" according to the detected filetype.
|
||||
"filetype plugin indent on
|
||||
|
||||
" The following are commented out as they cause vim to behave a lot
|
||||
" differently from regular Vi. They are highly recommended though.
|
||||
set showcmd " Show (partial) command in status line.
|
||||
set showmatch " Show matching brackets.
|
||||
set ignorecase " Do case insensitive matching
|
||||
set smartcase " Do smart case matching
|
||||
set incsearch " Incremental search
|
||||
"set autowrite " Automatically save before commands like :next and :make
|
||||
" set hidden " Hide buffers when they are abandoned
|
||||
"set mouse=a " Enable mouse usage (all modes)
|
||||
|
||||
" 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
|
||||
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
|
||||
|
||||
" 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 number
|
||||
set relativenumber
|
||||
|
||||
set laststatus=2
|
||||
set showcmd
|
||||
set statusline=%<%f\ %h%m%r\ %=\ [%l,%v]\ [%p%%]\ [\ %Y]\ [\ %{strftime('%H:%M:%S')}]
|
||||
63
common/vimrc
Normal file
63
common/vimrc
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
" $XDG_CONFIG_HOME/vim/vimrc
|
||||
" 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
|
||||
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
|
||||
|
||||
" 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 number
|
||||
set relativenumber
|
||||
|
||||
set laststatus=2
|
||||
set showcmd
|
||||
set statusline=%<%f\ %h%m%r\ %=\ [%l,%v]\ [%p%%]\ [\ %Y]\ [\ %{strftime('%H:%M:%S')}]
|
||||
|
||||
|
||||
" XDG Directory Specifications
|
||||
" Reference to https://jorenar.com/blog/vim-xdg
|
||||
|
||||
if empty($XDG_CACHE_HOME) | let $XDG_CACHE_HOME = $HOME."/.cache" | endif
|
||||
if empty($XDG_CONFIG_HOME) | let $XDG_CONFIG_HOME = $HOME."/.config" | endif
|
||||
if empty($XDG_DATA_HOME) | let $XDG_DATA_HOME = $HOME."/.local/share" | endif
|
||||
if empty($XDG_STATE_HOME) | let $XDG_STATE_HOME = $HOME."/.local/state" | endif
|
||||
|
||||
set viminfo+=n$XDG_STATE_HOME/vim/viminfo
|
||||
set packpath^=$XDG_DATA_HOME/vim
|
||||
set packpath+=$XDG_DATA_HOME/vim/after
|
||||
set backupdir=$XDG_STATE_HOME/vim/backup
|
||||
set directory=$XDG_STATE_HOME/vim/swap
|
||||
set undodir=$XDG_STATE_HOME/vim/undo
|
||||
set viewdir=$XDG_STATE_HOME/vim/view
|
||||
" set shada+=n$XDG_STATE_HOME/vim/shada
|
||||
24
common/zellij.config.kdl
Normal file
24
common/zellij.config.kdl
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
// ~/.config/zellij/config.kdl
|
||||
// ln -sf $DOTFILES/.config/zellij/config.kdl ~.config/zellij/config.kdl
|
||||
// https://zellij.dev/documentation/configuration
|
||||
keybinds {
|
||||
// keybinds are divided into modes
|
||||
normal {
|
||||
// bind instructions can include one or more keys (both keys will be bound separately)
|
||||
// bind keys can include one or more actions (all actions will be performed with no sequential guarantees)
|
||||
bind "Ctrl g" { SwitchToMode "locked"; }
|
||||
bind "Ctrl p" { SwitchToMode "pane"; }
|
||||
bind "Alt n" { NewPane; }
|
||||
bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; }
|
||||
}
|
||||
pane {
|
||||
bind "h" "Left" { MoveFocus "Left"; }
|
||||
bind "i" "Right" { MoveFocus "Right"; }
|
||||
bind "n" "Down" { MoveFocus "Down"; }
|
||||
bind "e" "Up" { MoveFocus "Up"; }
|
||||
bind "p" { SwitchFocus; }
|
||||
}
|
||||
locked {
|
||||
bind "Ctrl g" { SwitchToMode "normal"; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue