NNN, jump and other funky new stuff. Giving it a try...

main
Steffen Rademacker 3 years ago
parent 95d1571e1b
commit 6a4a145c04

@ -9,13 +9,17 @@ brew install homebrew-ffmpeg/ffmpeg/ffmpeg --with-fdk-aac
brew install htop
brew install httpd
brew install imagemagick
brew install jump
brew install mariadb
brew install mkcert
brew install nnn
brew install nss
brew install openssl
brew install php@7.4
brew install ripgrep
brew install switchaudio-osx
brew install trash-cli
brew install tree
# dnsmasq
echo 'address=/.localhost/127.0.0.1' > /usr/local/etc/dnsmasq.conf

@ -9,5 +9,4 @@ npm install -g fkill-cli
npm install -g neovim
npm install -g npm-check
npm install -g pure-prompt
npm install -g trash-cli
npm install -g yarn

@ -9,6 +9,7 @@ if dein#load_state('~/.cache/dein')
call dein#add('junegunn/fzf', { 'merged': 0 })
call dein#add('junegunn/fzf.vim', { 'depends': 'fzf' })
call dein#add('junegunn/gv.vim')
call dein#add('mcchrish/nnn.vim')
call dein#add('neoclide/coc.nvim', { 'merged': 0, 'rev': 'release' })
call dein#add('sheerun/vim-polyglot')
call dein#add('tpope/vim-apathy')
@ -20,7 +21,6 @@ if dein#load_state('~/.cache/dein')
call dein#add('tpope/vim-repeat')
call dein#add('tpope/vim-surround')
call dein#add('tpope/vim-unimpaired')
call dein#add('tpope/vim-vinegar')
call dein#add('w0ng/vim-hybrid')
call dein#add('wellle/targets.vim')
call dein#add('wellle/tmux-complete.vim')

@ -12,6 +12,11 @@ nnoremap <silent> <space>l :Lines<cr>
nnoremap <silent> <space>a :Rg<cr>
nnoremap <silent> <space>h :History:<cr>
" nnn integration
let g:nnn#set_default_mappings = 0
let g:nnn#command = 'nnn -deH'
nnoremap <silent> - :NnnPicker %:p:h<CR>
" EasyMotion
let g:EasyMotion_do_mapping=0
let g:EasyMotion_smartcase=1
@ -68,7 +73,6 @@ nmap <silent> <C-s> <Plug>(coc-range-select)
xmap <silent> <C-s> <Plug>(coc-range-select)
" Map function and class text objects
" NOTE: Requires 'textDocument.documentSymbol' support from the language server.
xmap if <Plug>(coc-funcobj-i)
omap if <Plug>(coc-funcobj-i)
xmap af <Plug>(coc-funcobj-a)

@ -1,20 +1,13 @@
# make aliases and other stuff work in sudo
# Make aliases and other stuff work in sudo
alias sudo='sudo '
# always use nvim, see exports
alias vim=$EDITOR
alias vi=$EDITOR
alias v=$EDITOR
alias vimdiff='$EDITOR -d'
alias vdiff='$EDITOR -d'
alias vd='$EDITOR -d'
# Easier navigation: .., ..., ~ and -
alias ~="cd ~"
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias q='exit'
# suffix-aliases for file-types (zsh only)
@ -28,12 +21,9 @@ alias -s scss=$EDITOR
alias -s txt=$EDITOR
alias -s yaml=$EDITOR
# better ls / l command
alias l='ls -alGp'
# mutt
alias mutt='neomutt'
alias m='neomutt'
# alias for syncing everything
alias O="cd ~ && mbsync -a && mu index && vdirsyncer sync"
# Gitty gitgit
@ -68,11 +58,6 @@ alias ys='yarn develop'
alias yp='yarn lint && yarn production'
alias yre='rm -f yarn.lock && rm -rf node_modules && yarn'
# often used folder shortcuts
alias web='cd ~/Sites && l'
alias rep='cd ~/Repositories && l'
alias dot='cd ~/Dotfiles && l'
# random usefull stuff
alias dnsflush='sudo dscacheutil -flushcache'
alias lock="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend"

@ -47,3 +47,13 @@ export RIPGREP_CONFIG_PATH="$HOME/dotfiles/ripgreprc"
export PAGER="less"
export LESS="-R"
export LC_CTYPE=$LANG
# nnn
export NNN_BMS='d:~/Dotfiles;s:~/Sites;l:~/Downloads;h:~/'
export NNN_FIFO='/tmp/nnn.fifo'
export NNN_TRASH=1
export NNN_PLUG='o:fzcd;j:autojump;p:preview-tui'
export NNN_ARCHIVE="\\.(7z|a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|rar|rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)$"
# n node version management
export N_PREFIX="$HOME/n"; [[ :$PATH: == *":$N_PREFIX/bin:"* ]] || PATH+=":$N_PREFIX/bin" # Added by n-install (see http://git.io/n-install-repo).

@ -26,6 +26,22 @@ webvideoposter () {
ffmpeg -ss 00:00:02 -i $1 -frames:v 1 $1.jpg
}
l () {
if [ -n $NNNLVL ] && [ "${NNNLVL:-0}" -ge 1 ]; then
echo "nnn is already running"
return
fi
export NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
nnn -deH "$@"
if [ -f "$NNN_TMPFILE" ]; then
. "$NNN_TMPFILE"
rm -f "$NNN_TMPFILE" > /dev/null
fi
}
# create and change to directory/folder
take () {
mkdir -p $1
@ -50,34 +66,6 @@ fancy-ctrl-z () {
fi
}
# creates an archive from given directory
mktar () { tar cvf "${1%%/}.tar" "${1%%/}"; }
mktgz () { tar cvzf "${1%%/}.tgz" "${1%%/}"; }
mkzip () { zip -r "${1%%/}" "${1%%/}"; }
# easy extract
extract () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xvjf $1 ;;
*.tar.gz) tar xvzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) rar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xvf $1 ;;
*.tgz) tar xvzf $1 ;;
*.tbz2) tar xvjf $1 ;;
*.tbz) tar xvjf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo "don't know how to extract '$1'..." ;;
esac
else
echo "'$1' is not a valid file!"
fi
}
wttr () {
if [[ -n "$1" ]]
then

@ -46,14 +46,12 @@ setopt hist_ignore_space
setopt hist_verify
setopt inc_append_history
setopt share_history
setopt long_list_jobs
# smart urls
autoload -U url-quote-magic
zle -N self-insert url-quote-magic
# jobs
setopt long_list_jobs
# source some zsh plugins
source $HOME/dotfiles/zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source $HOME/dotfiles/zsh/zsh-completions/zsh-completions.plugin.zsh
@ -61,7 +59,8 @@ source $HOME/dotfiles/zsh/zsh-completions/zsh-completions.plugin.zsh
# fzf
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# jump
eval "$(jump shell)"
# zsh-completions
fpath=($HOME/dotfiles/zsh/zsh-completions/src $fpath)
export N_PREFIX="$HOME/n"; [[ :$PATH: == *":$N_PREFIX/bin:"* ]] || PATH+=":$N_PREFIX/bin" # Added by n-install (see http://git.io/n-install-repo).

Loading…
Cancel
Save