summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
authorDavid Luevano <55825613+luevano@users.noreply.github.com>2020-02-15 14:12:51 -0700
committerDavid Luevano <55825613+luevano@users.noreply.github.com>2020-02-15 14:12:51 -0700
commite50871ee017b6845fa8bf1cd495d485644d0770a (patch)
tree0673012b1b8117665bce856cd70c668da343d5bb /.config
parent3e32663639b15e0ce12a1ea5696064cc7337bc63 (diff)
Tweak vim config
Diffstat (limited to '.config')
-rw-r--r--.config/nvim/init.vim59
1 files changed, 50 insertions, 9 deletions
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 <F5> :source ~/.config/nvim/init.vim<CR>
+
+ " Toggle relative line number
+ nmap <F2> :set number invrelativenumber<CR>
+
+ " Toggle NERDTree
+ nmap <C-n> :NERDTreeToggle<CR>
+
+ " Toggle Goyo
+ nmap <F8> :Goyo<CR>
+
+ " Split navigation
+ map <C-h> <C-w>h
+ map <C-j> <C-w>j
+ map <C-k> <C-w>k
+ map <C-l> <C-w>l