#########################################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
# 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#####################
# 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';
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'
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'
+ago de oz https://music.youtube.com/watch?v=AQyeh5bSVyM&list=RDAMVMvXDGmdLiaCs
"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 .