if has('nvim') " Neovim specific commands else " Standard vim specific commands endif " Mutual commands after this let mapleader=',' set showcmd syntax enable set background=dark colorscheme dracula highlight BadWhitespace ctermbg=red set title set encoding=utf-8 set number relativenumber set cursorline set clipboard+=unnamedplus filetype plugin indent on set tabstop=4 set shiftwidth=4 set foldmethod=indent set foldlevel=99 " es_mx not always supported " set spelllang=es_mx,en_us set spelllang=en_us set showbreak=↪\ set listchars=eol:↲,nbsp:␣,tab:»\ ,trail:•,precedes:⟨,extends:⟩ " functions " Toggle spellchecking function! ToggleSpellCheck() set spell! if &spell echo "Spellcheck ON" else echo "Spellcheck OFF" endif endfunction " Toggle listchars function! ToggleListChars() set list! if &list echo "Listchars ON" else echo "Listchars OFF" endif endfunction " keybindings " reload vim nmap :source ~/.config/nvim/init.vim " toggle relative line number nmap :set number invrelativenumber " buffers nnoremap gb :ls:buffer nmap a :badd nmap l :ls " split navigation nmap h nmap j nmap k nmap l nnoremap :vertical resize -5 nnoremap :resize +5 nnoremap :resize -5 nnoremap :vertical resize +5 " tab manipulation nmap t :tabe nmap y :tabclose " enable folding with the spacebar nnoremap za " spell checking nmap s :call ToggleSpellCheck() " listchars nmap c :call ToggleListChars()