diff options
-rw-r--r-- | .bashrc | 11 | ||||
-rw-r--r-- | .config/nvim/init.vim | 16 |
2 files changed, 24 insertions, 3 deletions
@@ -5,11 +5,17 @@ # If not running interactively, don't do anything [[ $- != *i* ]] && return +# Bash options set -o vi bind -m vi-insert "\C-l":clear-screen - source /usr/share/bash-completion/bash_completion +export HISTCONTROL=ignoredups:erasedup +export HISTSIZE=100000 +export HISTFILESIZE=100000 +shopt -s histappend +export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND" +# Aliases alias ls='ls --color=auto' alias la='ls -lah' alias vim='nvim' @@ -17,12 +23,14 @@ alias v='nvim' alias calc='bc -lq' alias zat='zathura' +# Git aliases alias gs='git status' alias gc='git commit' alias ga='git add' alias gp='nohup git push --quiet &> /dev/null &' alias gd='git diff' +# Settings export PS1='[\W] ' export HISTCONTROL=ignoredups export BROWSER='qutebrowser' @@ -32,3 +40,4 @@ export TERMINAL='st' export PATH=$PATH:$HOME/.scripts:$HOME/.sailfish/bin:$HOME/.gem/ruby/2.7.0/bin:$HOME/.cargo/bin export GITHUB_TOKEN="$(cat "$HOME"/.crypto/github)" export FZF_DEFAULT_COMMAND='rg --line-number --color never --no-heading ""' +export FZF_DEFAULT_OPTS='--bind ctrl-d:half-page-down,ctrl-u:half-page-up' diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index a81a654..ac355ea 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -27,6 +27,7 @@ Plug 'tpope/vim-salve' Plug 'tpope/vim-projectionist' Plug 'tpope/vim-dispatch' Plug 'tpope/vim-fireplace' +Plug 'tpope/vim-fugitive' Plug 'guns/vim-clojure-static' Plug 'guns/vim-clojure-highlight' Plug 'kien/rainbow_parentheses.vim' @@ -35,7 +36,7 @@ Plug 'w0rp/ale' Plug 'majutsushi/tagbar' Plug 'peterhoeg/vim-qml' Plug 'dermusikman/sonicpi.vim' -Plug 'ananagame/vimsence' +"Plug 'ananagame/vimsence' " Menus Plug 'scrooloose/nerdtree' @@ -154,7 +155,8 @@ autocmd TermOpen * startinsert " FZF nmap ; :Files<CR> nmap <Leader>B :Buffers<CR> -nmap <Leader>c :Colors<CR> +nmap <Leader>C :Colors<CR> +nmap <Leader>c :Commits<CR> nmap <Leader>s :Rg!<CR> let $FZF_DEFAULT_COMMAND = 'rg --files --follow -g "!{.git,node_modules}/*" 2>/dev/null' command! -bang -nargs=* Rg @@ -164,6 +166,7 @@ command! -bang -nargs=* Rg \ : fzf#vim#with_preview('right:50%:hidden', '?'), \ <bang>0) + " Git implementation let g:gitgutter_enabled=1 let g:gitgutter_map_keys=0 @@ -238,6 +241,8 @@ let NERDTreeIgnore=['node_modules', 'cross'] let g:NERDTreeMarkBookmarks=0 let g:NERDTreeAutoDeleteBuffer=1 let g:NERDTreeStatusLine=-1 +au BufEnter * if bufname('#') =~ 'NERD_tree' && bufname('%') !~ 'NERD_tree' && winnr('$') > 1 | b# | exe "normal! \<c-w>\<c-w>" | :blast | endif +autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif " Root master super save cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit! @@ -259,6 +264,13 @@ highlight GitGutterAdd guifg=#009900 ctermfg=2 highlight GitGutterChange guifg=#bbbb00 ctermfg=3 highlight GitGutterDelete guifg=#ff2222 ctermfg=1 +" TODOs +command Td :Rg! TODO +command TD :Rg! TODO +command Todo :Rg! TODO +command ToDo :Rg! TODO +command TODO :Rg! TODO + " Better vim diff if &diff highlight! link DiffText MatchParen |