+ Tweaked Zsh and vim, separated viminfo from nvim (now located on nvim/nviminfo

This commit is contained in:
ziro 2020-04-16 11:24:40 +07:00
parent a15b74eaf2
commit 3e8da79f5f
5 changed files with 39 additions and 19 deletions

View file

@ -3,7 +3,11 @@ set undodir=$XDG_DATA_HOME/vim/undo
set directory=$XDG_DATA_HOME/vim/swap
set backupdir=$XDG_DATA_HOME/vim/backup
set viewdir=$XDG_DATA_HOME/vim/view
set viminfo+='1000,n$XDG_DATA_HOME/vim/viminfo
if !has('nvim')
set viminfo+='1000,n$XDG_DATA_HOME/vim/viminfo
else
set viminfo+='1000,n$XDG_DATA_HOME/nvim/nviminfo
endif
set runtimepath=$XDG_CONFIG_HOME/vim,$VIMRUNTIME,$XDG_CONFIG_HOME/vim/after
let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc"

View file

@ -4,9 +4,9 @@
alias sudo='sudo '
#vim
alias nano='nvim'
alias vim='nvim'
alias vi='nvim'
alias nano=nvim
alias vim=nvim
alias vi=nvim
#curl
alias weather='curl wttr.in'
@ -56,6 +56,9 @@ alias cfbsp='vim $XDG_CONFIG_HOME/bspwm/bspwmrc'
alias cfpoly='vim $XDG_CONFIG_HOME/polybar/config'
alias cfkeys='vim $XDG_CONFIG_HOME/sxhkd/sxhkdrc'
alias cfalias='vim $XDG_CONFIG_HOME/zsh/aliases'
alias cfbind='vim $XDG_CONFIG_HOME/zsh/keybinds'
alias cfprofile='vim $XDG_CONFIG_HOME/zsh/profile'
#more shortcuts
alias htop='htop -t'
alias rm='rm -i'

2
.config/zsh/keybinds Normal file
View file

@ -0,0 +1,2 @@
#!/bin/env zsh
#bindkey '^ ' autosuggest-accept

15
.config/zsh/profile Normal file
View file

@ -0,0 +1,15 @@
#!/bin/zsh
# Path to your oh-my-zsh installation.
export ZSH="$XDG_DATA_HOME/oh-my-zsh"
export ZSH_CUSTOM="$ZSH/custom"
export PLUGINS="$XDG_DATA_HOME/zsh/plugins"
# SUDO
export SUDO_ASKPASS=/bin/rofi-askpass
# XDG
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CONFIG_HOME="$HOME/.config"

26
.zshrc
View file

@ -1,24 +1,20 @@
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# colors
autoload -U colors && colors
#autoload -U colors && colors
# XDG
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CONFIG_HOME="$HOME/.config"
# Alias/Binds/Profiles
[ -f ~/.config/zsh/profile/ ] && source ~/.config/zsh/profile
[ -f ~/.config/zsh/aliases ] && source ~/.config/zsh/aliases
[ -f ~/.config/zsh/keybinds ] && source ~/.config/zsh/keybinds
# MOTDs
pfetch
#sh ~/.scripts/motd.sh
# Path
PATH="$HOME/.local/bin${PATH:+:${PATH}}"
# Path to your oh-my-zsh installation.
export ZSH="$XDG_DATA_HOME/oh-my-zsh"
export ZSH_CUSTOM="$ZSH/custom"
export PLUGINS="$XDG_DATA_HOME/zsh/plugins"
# History in cache directory
HISTFILE=~/.cache/zsh/zsh_history
HISTSIZE=1000
@ -59,7 +55,10 @@ fi
export BROWSER='firefox'
export TERMINAL='urxvt'
#vim
# vim as manpager
export MANPAGER="/bin/sh -c \"col -b | vim --not-a-term -c 'set ft=man ts=8 nomod nolist noma' -\""
# vimrc
export VIMINIT='let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc" | source $MYVIMRC'
# vi mode
@ -76,7 +75,4 @@ zsh-autosuggestions
source $ZSH/oh-my-zsh.sh
#source $ZSH_CUSTOM/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null
#source $ZSH_CUSTOM/plugins/fsh/fast-syntax-highlighting.plugin.zsh
#binding/alias
[ -f ~/.config/zsh/aliases ] && source ~/.config/zsh/aliases
[ -f ~/.config/zsh/keybinds ] && source ~/.config/zsh/keybinds
source $HOME/.zprofile