From a80b8df3a27a371e01842c1d1a082e2c5f9602ab Mon Sep 17 00:00:00 2001 From: Josuer08 Date: Tue, 9 Feb 2021 21:47:57 -0500 Subject: [PATCH] Minor vim changes and bashrc repair --- .bashrc | 24 ++++++++++++++---------- .config/nvim/.netrwhist | 8 ++++---- .config/qutebrowser/quickmarks | 1 + .vimrc | 26 ++++++++++++++++++++++++++ 4 files changed, 45 insertions(+), 14 deletions(-) diff --git a/.bashrc b/.bashrc index 3c2c9590..b9c99c20 100644 --- a/.bashrc +++ b/.bashrc @@ -35,14 +35,6 @@ fi #########################################AUTOCOMPLETION##################### # sources /etc/bash.bashrc). -if ! shopt -oq posix; then - if [ -f /usr/share/bash-completion/bash_completion ]; then - . /usr/share/bash-completion/bash_completion - elif [ -f /etc/bash_completion ]; then - . /etc/bash_completion - fi -fi - if [ -f /usr/share/fzf/completion.bash ]; then source /usr/share/fzf/completion.bash @@ -55,8 +47,14 @@ fi # autocomplete for sudo man and wich complete -cf sudo man wich; #For arch -bind 'set show-all-if-ambiguous on'; -bind 'TAB:menu-complete'; +if ! shopt -oq posix; then + if [ -f /usr/share/bash-completion/bash_completion ]; then + . /usr/share/bash-completion/bash_completion + elif [ -f /etc/bash_completion ]; then + . /etc/bash_completion + fi +fi + ########################################################################### ####################################HISTORY MANAGEMENT##################### @@ -81,3 +79,9 @@ shopt -s checkwinsize # vi mode in the shell set -o vi + + + +source /usr/share/bash-completion/bash_completion +bind 'set show-all-if-ambiguous on'; +bind 'TAB:menu-complete'; diff --git a/.config/nvim/.netrwhist b/.config/nvim/.netrwhist index 3f99a495..7e1fc6fa 100644 --- a/.config/nvim/.netrwhist +++ b/.config/nvim/.netrwhist @@ -1,5 +1,8 @@ let g:netrw_dirhistmax =10 -let g:netrw_dirhistcnt =2 +let g:netrw_dirhistcnt =5 +let g:netrw_dirhist_5='/home/josuer08/.dotfiles/.config/nvim' +let g:netrw_dirhist_4='/home/josuer08/.dotfiles/.config' +let g:netrw_dirhist_3='/home/josuer08/.dotfiles' let g:netrw_dirhist_2='/home/josuer08/Documents/tinysh' let g:netrw_dirhist_1='/home/josuer08/Documents' let g:netrw_dirhist_0='/home/josuer08/.dotfiles/.config/bashrc' @@ -7,6 +10,3 @@ let g:netrw_dirhist_9='/home/josuer08/.dotfiles/.config' let g:netrw_dirhist_8='/home/josuer08/.dotfiles' let g:netrw_dirhist_7='/home/josuer08/.dotfiles/.config/bashrc' let g:netrw_dirhist_6='/home/josuer08/.dotfiles/.config' -let g:netrw_dirhist_5='/home/josuer08/.dotfiles' -let g:netrw_dirhist_4='/home/josuer08/.dotfiles/.config/bashrc' -let g:netrw_dirhist_3='/home/josuer08/.dotfiles/.config' diff --git a/.config/qutebrowser/quickmarks b/.config/qutebrowser/quickmarks index e69de29b..928eca07 100644 --- a/.config/qutebrowser/quickmarks +++ b/.config/qutebrowser/quickmarks @@ -0,0 +1 @@ +ago de oz https://music.youtube.com/watch?v=AQyeh5bSVyM&list=RDAMVMvXDGmdLiaCs diff --git a/.vimrc b/.vimrc index 7a967bba..50b213d0 100644 --- a/.vimrc +++ b/.vimrc @@ -9,6 +9,32 @@ set wildmenu "cambiar entre los buffers que tenemos abiertos, los que podemos ver "con el comando ":ls" que nos deja ver todos los buffer +"REMAPS: +inoremap jk +nnoremap :w +noremap j (v:count == 0 ? 'gj' : 'j') +noremap k (v:count == 0 ? 'gk' : 'k') +nnoremap v :Vex +nnoremap h :Sex +"searcher function +function! Grepper() + call inputsave() + let replacement = input('RegExp: ') + let workdir = input('Directory: ') + call inputrestore() + execute 'grep! -Irn '.replacement.' '.workdir +endfunction +nnoremap g :call Grepper():copen + + + +" this is an auto changer for relative numbers +:augroup numbertoggle +: autocmd! +: autocmd BufEnter,FocusGained,InsertLeave * set relativenumber +: autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber +:augroup END + "PARA CREAR TAGS EN UN PROYECTO: command! MakeTags !ctags -R . -- 2.25.1