blob: 34e25e908c0ae91b0f998829c098a3aa1aa4a5af (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
"
" ~/.config/nvim/init.vim
"
""---Auto installs vim-plug---""
" let autoload_plug_path = '~/.config/nvim/autoload/plug.vim'
" if !filereadable(autoload_plug_path)
" echo "Downloading junegunn/vim-plug to manage plugins..."
" silent execute '!curl -fLo ' . autoload_plug_path . ' --create-dirs
" \ "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim"'
" autocmd VimEnter * PlugInstall
" endif
" unlet autoload_plug_path
""---Loads plugins---""
call plug#begin('~/.config/nvim/plugged')
Plug 'mboughaba/i3config.vim'
Plug 'junegunn/goyo.vim'
Plug 'preservim/nerdtree'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
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
" PlugUpdate [name ...] [#threads] Install or update plugins
" PlugClean[!] Remove unlisted plugins (bang version will clean without prompt)
" PlugUpgrade Upgrade vim-plug itself
" PlugStatus Check the status of plugins
" PlugDiff Examine changes from the previous update and the pending changes
" PlugSnapshot[!] [output path] Generate script for restoring the current snapshot of the plugins
""---Basic configuration---""
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
let g:airline_powerline_fonts=1
" vim-airline-themes
let g:airline_theme='solarized'
" 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
|