add macos dotfiles
This commit is contained in:
33
macOS/.bash_profile
Normal file
33
macOS/.bash_profile
Normal file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env bash
|
||||
# export PROMPT_COMMAND='echo -n "]1;$PWD"'
|
||||
export PROMPT_COMMAND='echo -ne "\x1b]0;$PWD\x07"'
|
||||
|
||||
[ -r "$HOME"/.bashrc ] && . "$HOME/.bashrc"
|
||||
|
||||
# export PS1="\u@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ "
|
||||
# export PS1="\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ "
|
||||
# PS1='$ '
|
||||
|
||||
# source ~/.git-prompt.sh
|
||||
|
||||
# Ubuntu 18 PS1='\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u\[\033[01;33m\]@\[\033[01;36m\]\h \[\033[01;33m\]\w \[\033[01;35m\]\$ \[\033[00m\]'
|
||||
# PS1='\[\033[38;5;29m\]$(__git_ps1 "(%s)")\[\033[00m\]\[\e]0;\u@\h: \w\a\]\[\033[38;5;88m\]\u\[\033[38;5;138m\]@\[\033[38;5;28m\]\h:\[\033[38;5;26m\]\W \[\033[01;35m\]\$ \[\033[00m\]'
|
||||
|
||||
# Debian 10
|
||||
# PS1='${debian_chroot:+($debian_chroot)}\[\e[1;31m\]\u\[\e[1;33m\]@\[\e[1;36m\]\h \[\e[1;33m\]\w \[\e[1;35m\]\$ \[\e[0m\]'
|
||||
|
||||
# export TMPDIR=/var/tmp/
|
||||
# if [ -f /usr/local/share/bash-completion/bash_completion ]; then
|
||||
# . /usr/local/share/bash-completion/bash_completion
|
||||
# fi
|
||||
|
||||
|
||||
# this is the supposed way to go for @2 - dunno why my version above works for me
|
||||
# export BASH_COMPLETION_COMPAT_DIR="/usr/local/etc/bash_completion.d"
|
||||
# [[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh"
|
||||
|
||||
# Save and reload the history after each command finishes
|
||||
# export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
|
||||
|
||||
# # source /Users/mark/.config/broot/launcher/bash/br
|
||||
. "$HOME/.cargo/env"
|
||||
153
macOS/.bashrc
Normal file
153
macOS/.bashrc
Normal file
@@ -0,0 +1,153 @@
|
||||
#!/usr/bin/env bash
|
||||
export BASH_COMPLETION_COMPAT_DIR="/usr/local/etc/bash_completion.d"
|
||||
[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh"
|
||||
|
||||
# this nees to run after bash-completion as __git functions are defined in there
|
||||
if [[ $(type -t __git_ps1) == "function" ]] ; then
|
||||
PS1='\[\033[32m\]$(__git_ps1 "(%s)")\[\033[00m\]\w \\$ '
|
||||
else
|
||||
PS1='\w \\$ '
|
||||
fi
|
||||
|
||||
# homebrew
|
||||
export HOMEBREW_AUTO_UPDATE_SECS=86400
|
||||
export HOMEBREW_NO_ANALYTICS=1
|
||||
export HOMEBREW_NO_GITHUB_API=1
|
||||
export HOMEBREW_DISPLAY_INSTALL_TIMES=1
|
||||
|
||||
# hstr
|
||||
export HSTR_CONFIG=hicolor,raw-history-view # get more colors
|
||||
|
||||
# history
|
||||
shopt -s histappend # append new history items to .bash_history
|
||||
export HISTCONTROL=ignoredups:erasedups # no duplicate entries
|
||||
export CLICOLOR=YES
|
||||
export HISTFILESIZE=2500000
|
||||
export HISTSIZE=250000
|
||||
|
||||
export LC_ALL=en_US.UTF-8
|
||||
export LANG=en_US.UTF-8
|
||||
|
||||
export EDITOR=vim
|
||||
|
||||
# ensure synchronization between Bash memory and history file
|
||||
# export PROMPT_COMMAND="history -a; history -n; ${PROMPT_COMMAND}"
|
||||
# see: https://github.com/dvorka/hstr/issues/277
|
||||
export PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'history -a; history -n'
|
||||
# export PROMPT_COMMAND='history -a; history -c; history -r;'"${PROMPT_COMMAND:+$PROMPT_COMMAND; }" # laut c't 20/2020
|
||||
|
||||
# if this is interactive shell, then bind hstr to Ctrl-r (for Vi mode check doc)
|
||||
if [[ $- =~ .*i.* ]]; then bind '"\C-r": "\C-a hstr -- \C-j"'; fi
|
||||
# if this is interactive shell, then bind 'kill last command' to Ctrl-x k
|
||||
if [[ $- =~ .*i.* ]]; then bind '"\C-xk": "\C-a hstr -k \C-j"'; fi
|
||||
|
||||
# aliases and functions
|
||||
alias ll='ls -kahlFG'
|
||||
alias la='ls -CAF'
|
||||
alias l='ls -CF'
|
||||
alias cd..='cd ..'
|
||||
alias mkdir='mkdir -pv'
|
||||
alias bashrc="vim ~/.bashrc && source ~/.bashrc"
|
||||
alias git-root='cd "$(git rev-parse --show-toplevel)"'
|
||||
alias pcat='pygmentize -f terminal256 -O style=tango -g'
|
||||
alias tcat='tree-sitter highlight'
|
||||
|
||||
qst() { xsv stats "$@" | gawk -v fmt="%.4g" -f ~/printf_g.awk | xsv table; }
|
||||
|
||||
dcleanup(){
|
||||
docker rm -v "$(docker ps --filter status=exited -q 2>/dev/null)" 2>/dev/null
|
||||
docker rmi "$(docker images --filter dangling=true -q 2>/dev/null)" 2>/dev/null
|
||||
}
|
||||
|
||||
append_path() {
|
||||
for chkpth ; do
|
||||
if [[ ! $PATH = *"$chkpth"* && -d "$chkpth" ]] ; then
|
||||
PATH="$PATH":"$chkpth"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
prepend_path() {
|
||||
for chkpth ; do
|
||||
if [[ ! $PATH = *"$chkpth"* && -d "$chkpth" ]] ; then
|
||||
PATH="$chkpth":"$PATH"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
export MANPATH="/usr/local/opt/coreutils/libexec/gnuman:$MANPATH"
|
||||
|
||||
export LDFLAGS="-L/usr/local/opt/ruby/lib"
|
||||
export CPPFLAGS="-I/usr/local/opt/ruby/include"
|
||||
export PKG_CONFIG_PATH="/usr/local/opt/ruby/lib/pkgconfig"
|
||||
|
||||
export BAT_THEME="OneHalfLight"
|
||||
|
||||
export INPUTRC=~/.inputr
|
||||
|
||||
gems=$(find "$HOME"/.gem/ruby -maxdepth 2 -type d -name bin);
|
||||
|
||||
prepend_path "/usr/local/bin" "$HOME/.cargo/bin" "/usr/local/opt/ruby/bin" "$gems" "$HOME/go/bin" "$HOME/bin"
|
||||
|
||||
append_path "/usr/local/texlive/2018/bin/x86_64-darwin/"
|
||||
|
||||
[[ -r "$HOME/.cargo/env" ]] && . "$HOME/.cargo/env"
|
||||
|
||||
# if [[ ! $PATH = *usr/local* && -d /usr/local/bin ]] ; then
|
||||
# # export PATH=/usr/local/sbin:$PATH
|
||||
# export PATH=/usr/local/bin:$PATH
|
||||
# fi
|
||||
|
||||
# if [[ ! $PATH = *cargo/bin* && -d $HOME/.cargo/bin ]] ; then
|
||||
# export PATH="$HOME/.cargo/bin:$PATH"
|
||||
# fi
|
||||
|
||||
# if [[ ! $PATH = *openjdk/bin* && -d /usr/local/opt/openjdk/bin ]] ; then
|
||||
# export PATH="/usr/local/opt/openjdk/bin:$PATH"
|
||||
# export CPPFLAGS="-I/usr/local/opt/openjdk/include"
|
||||
# fi
|
||||
|
||||
# if [[ ! $PATH = *texlive/2018* && -d /usr/local/texlive/2018/bin/x86_64-darwin/ ]] ; then
|
||||
# export PATH=$PATH:/usr/local/texlive/2018/bin/x86_64-darwin/
|
||||
# fi
|
||||
|
||||
# if [[ -d /usr/local/opt/ruby/bin ]]; then
|
||||
# if [[ ! $PATH = *opt/ruby/bin* ]] ; then
|
||||
# export PATH="/usr/local/opt/ruby/bin:$PATH"
|
||||
# else
|
||||
# export PATH=/usr/local/opt/ruby/bin:"${PATH/':/usr/local/opt/ruby/bin'/}";
|
||||
# fi
|
||||
# fi
|
||||
|
||||
# gems=$(find "$HOME"/.gem/ruby -maxdepth 2 -type d -name bin);
|
||||
# if [[ -n $gems ]]; then
|
||||
# if [[ ! $PATH = */.gem/ruby/* ]] ; then
|
||||
# export PATH="$gems:$PATH";
|
||||
# fi
|
||||
# fi
|
||||
|
||||
ramdisk(){
|
||||
if [[ ! -d /Volumes/ramdisk ]]; then
|
||||
local default=${1:-24} # 24 GB default
|
||||
local size=$((1024*1024*2*default)) # a sector is 512 bytes, default in GB
|
||||
set -x
|
||||
diskutil erasevolume HFS+ "ramdisk" $(hdiutil attach -nomount ram://$size) # do not quote $(hdutil…) as it contains unwanted white-space; good work Apple
|
||||
if [[ -d /Volumes/ramdisk/ ]]; then
|
||||
rm -rfv /Volumes/ramdisk/.{,_.}{fseventsd,Spotlight-V*,Trashes}
|
||||
mkdir -v /Volumes/ramdisk/.fseventsd
|
||||
touch /Volumes/ramdisk/.fseventsd/no_log /Volumes/ramdisk/.metadata_never_index /Volumes/ramdisk/.Trashes
|
||||
mdutil -i off /Volumes/ramdisk
|
||||
echo -e "\n\tcd /Volumes/ramdisk/\n"
|
||||
cd /Volumes/ramdisk/ || exit
|
||||
fi
|
||||
set +x
|
||||
else
|
||||
cd /Volumes/ramdisk/ || exit
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ -f ~/.config/broot/launcher/bash/br ]]; then
|
||||
. ~/.config/broot/launcher/bash/br
|
||||
fi
|
||||
|
||||
export PATH
|
||||
23
macOS/.gitconfig
Normal file
23
macOS/.gitconfig
Normal file
@@ -0,0 +1,23 @@
|
||||
[merge]
|
||||
tool = kdiff3
|
||||
[user]
|
||||
name = Mark Schmitz
|
||||
email = mark.schmitz@mailbox.org
|
||||
[alias]
|
||||
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
|
||||
[filter "lfs"]
|
||||
process = git-lfs filter-process
|
||||
required = true
|
||||
clean = git-lfs clean -- %f
|
||||
smudge = git-lfs smudge -- %f
|
||||
[difftool "Kaleidoscope"]
|
||||
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
|
||||
[mergetool "Kaleidoscope"]
|
||||
cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot
|
||||
trustexitcode = true
|
||||
[core]
|
||||
excludesfile = /Users/mark/.config/git/ignore
|
||||
[pull]
|
||||
rebase = false
|
||||
[init]
|
||||
defaultBranch = main
|
||||
1
macOS/.profile
Normal file
1
macOS/.profile
Normal file
@@ -0,0 +1 @@
|
||||
. "$HOME/.cargo/env"
|
||||
2
macOS/.ssh/authorized_keys
Normal file
2
macOS/.ssh/authorized_keys
Normal file
@@ -0,0 +1,2 @@
|
||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCowOZg4u+Pyum9sT2m5ClIPqfFcVssRDLfkKFk3lFAqKQVk0JK/l9mtNn2Z0kc32n8fbaJKeZwoPf1Si0L5oBM6AWf7UY67RFL/0iASm4xv1bkdK63EDo8VKaEvTT69EP4fUoMyqVdS97EFDKle+fvXA1+GU1g6q2zNwAZNUkMiDgdYbHbWeujat6mRPe+O/8MBLzsDLJ8a0SGRTtf66LQjZbrcJyjrSCUmY4+n8+pt1VGcsaJdz2OwVup6t3Q3VOWWJ6SLzmRQviLQqtg4KmCftkOU57MYEvANLlT95B84KmeCTYY1BdZbP04R6YUqXMK0K4mlCo+dxeE47kd+lp7
|
||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDcc4MOm59iaWMk+fGXMH2x1xZ4qePNMK3lnrwELT0UVK1in/Bg2PFPs5aJ+fcL8JZc+IQ+SsnfwRUA3ZmVBgUkzJlDPJLgUpNP5Ljkv63CteZ3mEDb7J0/nLjuoSH9G4Flgf/v10ZJIRzR6QOW66N4RtejSQy95Xof/3eIAb27Jwf0IjIU4lZYwfl3oq0TsZost26Y2S/0F2KKox7P/Xwx7wbbaw3ioYpyFabNshomJUxqoevz4ZjGDcr7pAnjdSr1IPjGJyQRyx5wkpZRPgLLSyAoaAKd2mbNjYtpJ5dsU1ZnKZQFl7TyCZ2JftAJrUJGM29D24qe1mnCbTnF1gYj
|
||||
67
macOS/.ssh/config
Normal file
67
macOS/.ssh/config
Normal file
@@ -0,0 +1,67 @@
|
||||
Host *
|
||||
ServerAliveInterval 30
|
||||
ServerAliveCountMax 4
|
||||
UseKeychain yes
|
||||
AddKeysToAgent yes
|
||||
XAuthLocation /opt/X11/bin/xauth
|
||||
|
||||
Host turris
|
||||
Hostname 192.168.21.1
|
||||
User root
|
||||
|
||||
Host pi
|
||||
HostName pi3b.local
|
||||
User pi
|
||||
|
||||
Host dosmo.de
|
||||
# Hostname 159.69.158.49
|
||||
HostName 195.201.254.40
|
||||
Port 65522
|
||||
User mark
|
||||
|
||||
Host deb-3vcpu-4gb-80gb-nbg-CPX21
|
||||
HostName 157.90.25.58
|
||||
Port 65522
|
||||
User mark
|
||||
|
||||
Host gitea.dosmo.de
|
||||
HostName 195.201.254.40
|
||||
Port 6522
|
||||
User git
|
||||
|
||||
Host toxo14
|
||||
HostName samesi.de
|
||||
User sub10140_62
|
||||
|
||||
Host samesi
|
||||
HostName samesi.de
|
||||
User sub10140_62
|
||||
|
||||
Host mausbox
|
||||
HostName mausbox.de
|
||||
User web120
|
||||
|
||||
Host ax61-nvme-hel
|
||||
HostName 95.217.201.19
|
||||
User root
|
||||
Port 65522
|
||||
|
||||
Host storage100GB
|
||||
Hostname u275981.your-storagebox.de
|
||||
User u275981
|
||||
Port 23
|
||||
|
||||
Host evoldyn
|
||||
HostName evoldyn.science
|
||||
Port 2222
|
||||
User root
|
||||
|
||||
Host sony_KE55XH90
|
||||
HostName 192.168.178.240
|
||||
Port 8022
|
||||
|
||||
Host iproxy_root
|
||||
HostName 127.0.0.1
|
||||
Port 2222
|
||||
User root
|
||||
|
||||
1
macOS/.ssh/id_ed25519_dosmo-desig.pub
Normal file
1
macOS/.ssh/id_ed25519_dosmo-desig.pub
Normal file
@@ -0,0 +1 @@
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFaXXB7jmM1RlKMo82Xu1jCs1Uyk+W5SyYj319StmJRv dosmo-design@mailbox.org
|
||||
1
macOS/.ssh/id_rsa.pub
Normal file
1
macOS/.ssh/id_rsa.pub
Normal file
@@ -0,0 +1 @@
|
||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC7gBTAl2PB3zDzHp9Hz9P/WGHBNU3+sVYUBPj3WfOc0Dfo0O4+6F2dF697tl57YWwP6SePQQLiIRQJIpU7gYEf97XR9Y+ArrIn3BiZ2wgEbbTO/KQNZnpcGFYKU9oS5QQasp9ziKtpjItu9b9l6Wk4t3HGsM9j18F9AW/XwYBkdpZn41ZokqLWMcvZ/LwDgqkOL3k1YsBLBYnT0QTYTdvPwMO3sDEfYgeaOR5SnKKjeKLFZZIukrjUfrZ86MyyygBEBcak5P+x/6OYc+1Q3IyevG7+wRCIV44Ja92g6x3w8A5N1+LDa/jCrzMt6P3gz31IejwmT+hIbCebM3wcdihBT95hu+pNABBpXSvXZIPbz1F93bs/pScresfCnAMjzfPLxA2O8QOnWIVXDZBXe67wxPJtqA8eL1rRzy3GF01fKHjSVB+sX2YnHAcS+N335z6srQHbg9fZLcmsUXZ26FQNEiYWw/92jiYq4eefv/gFOUpzukWyB0rI5KfAsaZ/ZvGb+ugFqBiO0Jixlyd12qi+ekbLTx4f8oc4P2mtv761F6LFPEU1HDnagfgjf9kwo4sZ6gEYPKDaZVwlQqiTsO/7C8QMFDrKG0mzDqqKf0i7S/NjgYvJIA/o4j5Q3Med3txA8Jq32eN/zOzNIXkJh76Im6Exhfqv0U2MIKnz7XRh4Q== mark@MB12Mark.local
|
||||
25
macOS/.tmux.conf
Normal file
25
macOS/.tmux.conf
Normal file
@@ -0,0 +1,25 @@
|
||||
# set -g default-terminal "tmux-256color"
|
||||
# Start numbering windows at 1
|
||||
set -g base-index 1
|
||||
set-option -g history-limit 125000
|
||||
|
||||
set-option -g status-style fg="#cccccc",bg="#444444"
|
||||
|
||||
set-option -g message-style fg="#000000",bg="#bfbf40"
|
||||
set-option -g pane-border-style fg="#777777"
|
||||
set-option -g pane-active-border-style fg="#bfbf40"
|
||||
|
||||
set -g status-interval 1
|
||||
|
||||
set -g status-justify centre # center align window list
|
||||
set -g status-left-length 20
|
||||
set -g status-right-length 140
|
||||
set -g status-left '#H • #[default]'
|
||||
set -g status-right '#(tmux-mem-cpu-load --interval 1) • #(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") • %a %H:%M:%S #[default] %Y-%m-%d'
|
||||
|
||||
# Try screen256-color (https://github.com/tmux/tmux/issues/622):
|
||||
if-shell "test '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -ge 6 \)'" 'set -g default-terminal "screen-256color"'
|
||||
if-shell "test '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -ge 6 \)'" 'set -ga terminal-overrides ",screen-256color:Tc"'
|
||||
|
||||
if-shell '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -lt 6\) -o #{$TMUX_VERSION_MAJOR} -le 1' 'set -g default-terminal "screen-256color"'
|
||||
|
||||
131
macOS/.vimrc
Normal file
131
macOS/.vimrc
Normal file
@@ -0,0 +1,131 @@
|
||||
syntax enable " Turn on syntax highlighting
|
||||
set hidden " Leave hidden buffers open
|
||||
set history=100 "by default Vim saves your last 8 commands. We can handle more
|
||||
|
||||
" Enable filetype plugins
|
||||
filetype plugin on
|
||||
filetype indent on
|
||||
|
||||
"Always show current position
|
||||
set ruler
|
||||
|
||||
" Height of the command bar
|
||||
set cmdheight=1
|
||||
|
||||
""""""""""""""""""""""""""""""
|
||||
" => Status line
|
||||
""""""""""""""""""""""""""""""
|
||||
" Always show the status line
|
||||
set laststatus=2
|
||||
|
||||
" Format the status line
|
||||
" set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l\ \ Column:\ %c
|
||||
set statusline=%t "tail of the filename
|
||||
set statusline+=[%{strlen(&fenc)?&fenc:'none'}, "file encoding
|
||||
set statusline+=%{&ff}] "file format
|
||||
set statusline+=%h "help file flag
|
||||
set statusline+=%m "modified flag
|
||||
set statusline+=%r "read only flag
|
||||
set statusline+=%y "filetype
|
||||
set statusline+=%= "left/right separator
|
||||
set statusline+=%c, "cursor column
|
||||
set statusline+=%l/%L "cursor line/total lines
|
||||
set statusline+=\ %P "percent through file
|
||||
|
||||
" https://stackoverflow.com/a/10416234
|
||||
set statusline=
|
||||
set statusline+=%7*\[%n] "buffernr
|
||||
set statusline+=%1*\ %<%F\ "File+path
|
||||
set statusline+=%2*\ %y\ "FileType
|
||||
set statusline+=%3*\ %{''.(&fenc!=''?&fenc:&enc).''} "Encoding
|
||||
set statusline+=%3*\ %{(&bomb?\",BOM\":\"\")}\ "Encoding2
|
||||
set statusline+=%4*\ %{&ff}\ "FileFormat (dos/unix..)
|
||||
set statusline+=%5*\ %{&spelllang}\%{HighlightSearch()}\ "Spellanguage & Highlight on?
|
||||
set statusline+=%8*\ %=\ row:%l/%L\ (%03p%%)\ "Rownumber/total (%)
|
||||
set statusline+=%9*\ col:%03c\ "Colnr
|
||||
set statusline+=%0*\ \ %m%r%w\ %P\ \ "Modified? Readonly? Top/bot.
|
||||
|
||||
hi User1 ctermfg=15 ctermbg=88 guifg=#ffdad8 guibg=#880c0e "File+path
|
||||
hi User2 ctermfg=0 ctermbg=173 guifg=#000000 guibg=#F4905C "FileType
|
||||
hi User3 ctermfg=0 ctermbg=186 guifg=#292b00 guibg=#f4f597 "Encoding
|
||||
hi User4 ctermfg=0 ctermbg=150 guifg=#112605 guibg=#aefe7B "FileFormat (dos/unix..)
|
||||
hi User5 ctermfg=0 ctermbg=114 guifg=#051d00 guibg=#7dcc7d "Spellanguage & Highlight on?
|
||||
hi User7 ctermfg=15 ctermbg=88 guifg=#ffffff guibg=#880c0e gui=bold cterm=bold "buffernr
|
||||
hi User8 ctermfg=15 ctermbg=62 guifg=#ffffff guibg=#5b7fbb "Rownumber/total (%)
|
||||
hi User9 ctermfg=15 ctermbg=90 guifg=#ffffff guibg=#810085 "Colnr
|
||||
hi User0 ctermfg=7 ctermbg=8 guifg=#ffffff guibg=#094afe "Modified? Readonly? Top/bot.
|
||||
hi StatusLine ctermfg=237 ctermbg=255
|
||||
|
||||
function! HighlightSearch()
|
||||
if &hls
|
||||
return 'H'
|
||||
else
|
||||
return ''
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Configure backspace so it acts as it should act
|
||||
set backspace=eol,start,indent
|
||||
set whichwrap+=<,>,h,l
|
||||
|
||||
" Ignore case when searching
|
||||
set ignorecase
|
||||
|
||||
" When searching try to be smart about cases
|
||||
set smartcase
|
||||
|
||||
" Highlight search results
|
||||
set hlsearch
|
||||
|
||||
" Makes search act like search in modern browsers
|
||||
set incsearch
|
||||
|
||||
" 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=2
|
||||
|
||||
" No annoying sound on errors
|
||||
set noerrorbells
|
||||
set novisualbell
|
||||
set t_vb=
|
||||
set tm=500
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Text, tab and indent related
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Use spaces instead of tabs
|
||||
set expandtab
|
||||
|
||||
" Be smart when using tabs ;)
|
||||
set smarttab
|
||||
|
||||
" 1 tab == 2 spaces
|
||||
set shiftwidth=2
|
||||
set tabstop=2
|
||||
|
||||
" Linebreak on 500 characters
|
||||
set lbr
|
||||
set tw=500
|
||||
|
||||
set ai "Auto indent
|
||||
set si "Smart indent
|
||||
set wrap "Wrap lines
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Helper functions
|
||||
" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" " Returns true if paste mode is enabled
|
||||
|
||||
function! HasPaste()
|
||||
if &paste
|
||||
return 'PASTE MODE '
|
||||
endif
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
Reference in New Issue
Block a user