From e50871ee017b6845fa8bf1cd495d485644d0770a Mon Sep 17 00:00:00 2001 From: David Luevano <55825613+luevano@users.noreply.github.com> Date: Sat, 15 Feb 2020 14:12:51 -0700 Subject: Tweak vim config --- .config/nvim/init.vim | 59 +++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 50 insertions(+), 9 deletions(-) (limited to '.config') diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 23991df..34e25e9 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -23,6 +23,7 @@ call plug#begin('~/.config/nvim/plugged') Plug 'mhinz/vim-signify' Plug 'jmcantrell/vim-virtualenv' Plug 'lervag/vimtex' + Plug 'KeitaNakamura/tex-conceal.vim' call plug#end() "" Commands for plug. " PlugInstall [name ...] [#threads] Install plugins @@ -34,19 +35,59 @@ call plug#end() " PlugSnapshot[!] [output path] Generate script for restoring the current snapshot of the plugins ""---Basic configuration---"" -syntax on -set number relativenumber -set clipboard+=unnamedplus -" set bg=dark -" Set 1 tab = 4 spaces. -set ts=4 sw=4 + set encoding=utf-8 + " set bg=dark + syntax on + set number relativenumber + set clipboard+=unnamedplus + + + " Indentation + filetype plugin indent on + set tabstop=4 + set shiftwidth=4 + + " Spell checking + set spelllang=es_mx,en_us + autocmd FileType tex setlocal spell + + " Leader key + let mapleader=' ' + set showcmd ""---Plugin configuration---"" - "" vim-airline + " vim-airline let g:airline_powerline_fonts=1 - "" vim-airline-themes + " vim-airline-themes let g:airline_theme='solarized' - "" vim-signify + " vim-signify set updatetime=100 + + " tex-conceal + set conceallevel=2 + let g:tex_conceal="abdgm" + + " nerdtree + let g:NERDTreeShowHidden=1 + autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif + +""---Keybindings---"" + " Reload vim + nmap :source ~/.config/nvim/init.vim + + " Toggle relative line number + nmap :set number invrelativenumber + + " Toggle NERDTree + nmap :NERDTreeToggle + + " Toggle Goyo + nmap :Goyo + + " Split navigation + map h + map j + map k + map l -- cgit v1.2.3-54-g00ecf