This commit is contained in:
giomba 2021-10-26 15:14:28 +02:00
parent 40547e8229
commit 6677df1ae2
2 changed files with 101 additions and 8 deletions

77
vimrc Normal file
View File

@ -0,0 +1,77 @@
" giomba customized vimrc file
"
" based on an example by
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2018-09-17
"
" To use it, copy it to
" for Unix and OS/2: ~/.vimrc
" for Amiga: s:.vimrc
" for MS-DOS and Win32: $VIM\_vimrc
" for OpenVMS: sys$login:.vimrc
" When started as "evim", evim.vim will already have done these settings.
if v:progname =~? "evim"
finish
endif
" Get the defaults that most users want.
source $VIMRUNTIME/defaults.vim
if has("vms")
set nobackup " do not keep a backup file, use versions instead
else
set backup " keep a backup file (restore to previous version)
if has('persistent_undo')
set undofile " keep an undo file (undo changes after closing)
endif
endif
if &t_Co > 2 || has("gui_running")
" Switch on highlighting the last used search pattern.
set hlsearch
endif
" Only do this part when compiled with support for autocommands.
if has("autocmd")
" Put these in an autocmd group, so that we can delete them easily.
augroup vimrcEx
au!
" For all text files set 'textwidth' to 78 characters.
autocmd FileType text setlocal textwidth=78
augroup END
else
set autoindent " always set autoindenting on
endif " has("autocmd")
" Add optional packages.
"
" The matchit plugin makes the % command work better, but it is not backwards
" compatible.
" The ! means the package won't be loaded right away but when plugins are
" loaded during initialization.
if has('syntax') && has('eval')
packadd! matchit
endif
" ignore letter case when searching
set ignorecase
" always use spaces instead of tabs
set expandtab
set tabstop=4
set shiftwidth=4
" remove trailing white spaces at the end of the line when saving
autocmd BufWritePre * %s/\s\+$//e
" disable backups of files everywhere in the filesystem
set nobackup
set noundofile

32
zshrc
View File

@ -102,6 +102,11 @@
# exactly the same as @@INSERT-aliases-default@@. If you want a list of # exactly the same as @@INSERT-aliases-default@@. If you want a list of
# *all* aliases, for example, use @@INSERT-aliases-all@@. # *all* aliases, for example, use @@INSERT-aliases-all@@.
# Local installation of Nix package manager
if [ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]; then
. $HOME/.nix-profile/etc/profile.d/nix.sh;
fi # added by Nix installer
# zsh profiling # zsh profiling
# just execute 'ZSH_PROFILE_RC=1 zsh' and run 'zprof' to get the details # just execute 'ZSH_PROFILE_RC=1 zsh' and run 'zprof' to get the details
if [[ $ZSH_PROFILE_RC -gt 0 ]] ; then if [[ $ZSH_PROFILE_RC -gt 0 ]] ; then
@ -3786,17 +3791,28 @@ zrclocal
### example: split functions-search 8,16,24,32 ### example: split functions-search 8,16,24,32
#@# split functions-search 8 #@# split functions-search 8
# modern, colourful and backward compatible version of cat
if command -v bat &> /dev/null ; then
alias cat=bat
fi
# automatically load env variables from .envrc, when entering a directory
if command -v direnv &> /dev/null ; then
eval "$(direnv hook zsh)"
fi
# add local binaries
if [[ -r ~/bin ]]; then
PATH=$PATH:~/bin
fi
alias diff='diff -u --color'
alias xopen='xdg-open'
## END OF FILE ################################################################# ## END OF FILE #################################################################
# vim:filetype=zsh foldmethod=marker autoindent expandtab shiftwidth=4 # vim:filetype=zsh foldmethod=marker autoindent expandtab shiftwidth=4
# Local variables: # Local variables:
# mode: sh # mode: sh
# End: # End:
if [ -e /home/giomba/.nix-profile/etc/profile.d/nix.sh ]; then . /home/giomba/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer
. /home/giomba/.nix-profile/etc/profile.d/nix.sh
alias cat=bat
eval "$(direnv hook zsh)"
PATH=$PATH:~/bin