my vim configuration
#!/bin/bash
if command -v vim &>/dev/null; then
echo "✅ Vim ya está instalado: $(vim --version | head -n1)"
else
echo "📦 Vim no está instalado. Instalando..."
sudo dnf install -y vim
fi
# Instalar vim-plug (idempotente, se sobreescribe si ya existe)
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
call plug#begin()
Plug 'preservim/nerdtree'
Plug 'github/copilot.vim'
call plug#end()
" Apuntar la API de Copilot a DeepSeek
let g:copilot_api_endpoint = 'https://api.deepseek.com/beta/completions'
let g:copilot_api_key = $DEEPSEEK_API_KEY " Se recomienda usar variables de entorno
let g:copilot_model = 'deepseek-flash'
let NERDTreeMapOpenInTab = '<CR>'
let NERDTreeShowHidden=1
"let NERDTreeIgnore=['\.git$', '\.DS_Store$']
" identacion
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set number
highlight LineNr ctermfg=DarkGrey guifg=#555555
highlight CursorLineNr ctermfg=DarkGrey guifg=#555555
" Press Ctrl+n to toggle the file tree sidebar
nnoremap <C-n> :NERDTreeToggle<CR>
" Ctrl+B alterna entre NERDTree y el editor
nnoremap <silent> <C-b> :if &ft == 'nerdtree' \| wincmd p \| else \| NERDTreeFocus \| endif<CR>
" Moverse a la siguiente/anterior pestaña con Ctrl + L / Ctrl + K
nnoremap <C-l> :tabnext<CR>
nnoremap <C-k> :tabprevious<CR>