summaryrefslogtreecommitdiff
path: root/.config/nvim/init.vim
blob: b72a55ea191364351f46b3c2af879c1c9f6b731d (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
call plug#begin()
Plug 'gpanders/editorconfig.nvim'
call plug#end()

set t_Co=256
set encoding=utf-8
set tabstop=8
set shiftwidth=8
set autoindent
set magic
set number
set scrolloff=3
set sidescroll=3
set cc=80
set nowrap
set ignorecase
set smartcase
set splitbelow
set showmatch
set mouse=a
set noswapfile
set nofoldenable
set lazyredraw
set clipboard=unnamedplus

let g:fzf_layout = { 'window': { 'width': 1.0, 'height': 0.5, 'relative': v:true, 'yoffset': 1.0, 'border': 'none' } }
let g:fzf_action = { 'enter': 'tab split' }

function! GitFZF()
	let path = trim(system('cd '.shellescape(expand('%:p:h')).' && git rev-parse --show-toplevel'))
exe 'FZF ' . path
endfunction
command! GitFZF call GitFZF()
nnoremap <C-p> :GitFZF<CR>

let mapleader = "\<space>"
nnoremap \\ :noh<CR> " Clear higlighting
nnoremap Y y$
set listchars=tab:▸\ ,eol:¬,space:.
nnoremap <leader>l :set list!<CR>
nnoremap <leader>s :setlocal spell! spelllang=en_us<CR>
nnoremap <leader>m :!pandoc -V geometry:margin=1in % -o %:r.pdf<CR>
nnoremap <leader>t :!pdflatex %<CR>

highlight Search ctermbg=12
highlight clear SignColumn
highlight Comment cterm=none ctermfg=darkgrey
highlight StatusLine cterm=none ctermbg=none ctermfg=darkgrey
highlight StatusLineNC cterm=none ctermbg=none ctermfg=darkgrey
highlight Title cterm=none ctermfg=darkgrey
highlight TabLineFill cterm=none
highlight TabLine cterm=none ctermfg=darkgrey ctermbg=none
highlight ColorColumn ctermbg=darkgrey guibg=lightgrey
highlight Todo ctermbg=NONE ctermfg=red cterm=bold
highlight PreProc ctermfg=grey
highlight Type ctermfg=darkblue
highlight Pmenu ctermbg=white ctermfg=black
highlight PmenuSel ctermbg=darkcyan ctermfg=black

autocmd FileType markdown setlocal tw=80 et ts=2 sw=2
autocmd FileType text setlocal tw=80