This commit is contained in:
Diego Fernando Carrión 2021-11-25 12:26:00 +01:00
parent 2c41144deb
commit bdc3c5377f
2 changed files with 27 additions and 10 deletions

View File

@ -17,6 +17,7 @@ esac
#### Shell Options ####
########################
shopt -s extglob
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
@ -37,19 +38,10 @@ if [ -d "$HOME/.pyenv" ]; then
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
if command -v pyenv 1>/dev/null 2>&1; then
if ! shopt -q extglob
then
resetextglob=true
shopt -s extglob
fi
if [[ "${OSTYPE%%+([[:digit:].])}" == "darwin" ]]
then
eval "$(pyenv init --path)"
fi
if $resetextglob
then
shopt -u extglob
fi
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
fi
@ -66,6 +58,11 @@ then
eval "`fnm completions --shell bash`"
fi
if [[ -d "$HOME/.rbenv" ]]
then
eval "$(rbenv init - bash)"
fi
if [[ "$OSTYPE" == "linux-gnu"* && -f /etc/debian_version ]]
then
# if [ -d $HOME/.pyenv ]

View File

@ -16,7 +16,8 @@ Plug 'lepture/vim-jinja'
Plug 'b4b4r07/vim-hcl'
Plug 'hashivim/vim-packer'
Plug 'hashivim/vim-terraform'
Plug 'scrooloose/nerdtree'
" Plug 'scrooloose/nerdtree'
Plug 'preservim/nerdtree'
Plug 'PotatoesMaster/i3-vim-syntax'
"Plug 'tpope/vim-surround'
"Plugin 'jiangmiao/auto-pairs'
@ -227,6 +228,25 @@ let g:go_def_mapping_enabled = 0
" call neomake#configure#automake('nrwi', 500)
""" NERDtree
" nnoremap <leader>n :NERDTreeFocus<CR>
" nnoremap <C-n> :NERDTree<CR>
nnoremap <C-t> :NERDTreeToggle<CR>
nnoremap <C-h> :NERDTreeFind<CR>
" Start NERDTree when Vim starts with a directory argument.
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists('s:std_in') |
\ execute 'NERDTree' argv()[0] | wincmd p | enew | execute 'cd '.argv()[0] | endif
" Exit Vim if NERDTree is the only window remaining in the only tab.
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
" Close the tab if NERDTree is the only window remaining in it.
autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
" If another buffer tries to replace NERDTree, put it in the other window, and bring back NERDTree.
autocmd BufEnter * if bufname('#') =~ 'NERD_tree_\d\+' && bufname('%') !~ 'NERD_tree_\d\+' && winnr('$') > 1 |
\ let buf=bufnr() | buffer# | execute "normal! \<C-W>w" | execute 'buffer'.buf | endif
""" airline
let g:airline_theme='powerlineish' " <theme> is a valid theme name
let g:airline_powerline_fonts = 1