Minor vim changes and bashrc repair
authorJosuer08 <josuer08@gmail.com>
Wed, 10 Feb 2021 02:47:57 +0000 (21:47 -0500)
committerJosuer08 <josuer08@gmail.com>
Wed, 10 Feb 2021 02:47:57 +0000 (21:47 -0500)
.bashrc
.config/nvim/.netrwhist
.config/qutebrowser/quickmarks
.vimrc

diff --git a/.bashrc b/.bashrc
index 3c2c9590d84cbceff1da475d8c7f4f26f196ade6..b9c99c2044687b9ffb577a9bcefe3a27e06c33fd 100644 (file)
--- 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';
index 3f99a495bd27e4b6677f75c62e87bff33ebfdfb0..7e1fc6fac6d35eeb419ee502d3bb52e9e29733c2 100644 (file)
@@ -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'
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..928eca0779ab0f9890774291835980564bc17dd0 100644 (file)
@@ -0,0 +1 @@
+ago de oz https://music.youtube.com/watch?v=AQyeh5bSVyM&list=RDAMVMvXDGmdLiaCs
diff --git a/.vimrc b/.vimrc
index 7a967bbab69e3b4d4988e6f9ff08426e14a64033..50b213d0912135b0da8f06a6c75dbea754b73940 100644 (file)
--- 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 <ESC>
+nnoremap <C-s> :w<CR>
+noremap <silent> <expr> j (v:count == 0 ? 'gj' : 'j')
+noremap <silent> <expr> k (v:count == 0 ? 'gk' : 'k')
+nnoremap <leader>v :Vex<CR>
+nnoremap <leader>h :Sex<CR>
+"searcher function
+function! Grepper()
+    call inputsave()
+    let replacement = input('RegExp: ')
+    let workdir = input('Directory: ')
+    call inputrestore()
+    execute 'grep! -Irn '.replacement.' '.workdir
+endfunction
+nnoremap <silent> <leader>g  :call Grepper()<CR>:copen<CR>
+
+
+
+" 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 .