2022-10-26 12:05:56 -06:00
|
|
|
filetype plugin on
|
|
|
|
syntax enable
|
|
|
|
let g:vimtex_compiler_method = 'arara'
|
|
|
|
let maplocalleader = "\\"
|
|
|
|
|
2021-11-16 16:40:58 -07:00
|
|
|
set nocompatible
|
2022-05-02 23:02:43 -06:00
|
|
|
let g:gruvbox_contrast_dark = 'soft'
|
|
|
|
let g:gruvbox_termcolors = '16'
|
2022-10-26 12:05:56 -06:00
|
|
|
let g:python_recommended_style = 0
|
2022-03-11 00:20:49 -07:00
|
|
|
colorscheme gruvbox
|
2022-05-02 23:02:43 -06:00
|
|
|
set ttymouse=sgr
|
|
|
|
set number
|
2022-03-11 00:20:49 -07:00
|
|
|
set bg:dark
|
2021-11-16 16:40:58 -07:00
|
|
|
set mouse=a
|
2022-03-11 00:20:49 -07:00
|
|
|
set tabstop=2 softtabstop=2 shiftwidth=2 expandtab
|
2021-11-16 16:40:58 -07:00
|
|
|
set linebreak
|
|
|
|
set cursorline
|
|
|
|
set backspace=indent,eol,start
|
|
|
|
set laststatus=2
|
|
|
|
set wildmenu
|
|
|
|
set scrolloff=5
|
2022-03-03 22:13:34 -07:00
|
|
|
set incsearch
|
2022-03-11 00:20:49 -07:00
|
|
|
set ttimeout ttimeoutlen=25
|
2022-10-26 12:05:56 -06:00
|
|
|
"set clipboard=unnamedplus
|
|
|
|
set showtabline=2
|
|
|
|
set undodir=~/.vim/undo-dir
|
|
|
|
set undofile
|
2021-11-16 16:40:58 -07:00
|
|
|
|
2022-02-19 16:05:54 -07:00
|
|
|
" turn on spell checker for all markdown files
|
|
|
|
autocmd FileType markdown setlocal spell
|
2022-10-26 12:05:56 -06:00
|
|
|
hi clear SpellBad
|
|
|
|
hi SpellBad cterm=underline
|
|
|
|
hi clear SpellRare
|
|
|
|
hi SpellRare cterm=underline
|
|
|
|
hi clear SpellCap
|
|
|
|
hi SpellCap cterm=underline
|
|
|
|
hi clear SpellLocal
|
|
|
|
hi SpellLocal cterm=underline
|
2022-03-11 00:20:49 -07:00
|
|
|
|
2022-05-02 23:02:43 -06:00
|
|
|
call plug#begin()
|
|
|
|
|
|
|
|
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
|
|
|
Plug 'jaxbot/semantic-highlight.vim'
|
2022-10-26 12:05:56 -06:00
|
|
|
Plug 'itchyny/lightline.vim'
|
|
|
|
Plug 'jceb/vim-orgmode'
|
|
|
|
Plug 'tpope/vim-speeddating'
|
|
|
|
Plug 'lervag/vimtex'
|
2022-05-02 23:02:43 -06:00
|
|
|
|
|
|
|
call plug#end()
|
|
|
|
|
|
|
|
inoremap <silent><expr> <TAB>
|
|
|
|
\ pumvisible() ? "\<C-n>" :
|
|
|
|
\ <SID>check_back_space() ? "\<TAB>" :
|
|
|
|
\ coc#refresh()
|
|
|
|
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
|
|
|
|
|
|
|
function! s:check_back_space() abort
|
|
|
|
let col = col('.') - 1
|
|
|
|
return !col || getline('.')[col - 1] =~# '\s'
|
|
|
|
endfunction
|
|
|
|
|
2022-10-26 12:05:56 -06:00
|
|
|
"let s:semanticGUIColors = [ "#cc241d", "#98971a", "#d79921", "#458588", "#b16286", "#689d6a", "#928374", "#fb4934", "#b8bb26", "#fabd2f", "#83a598", "#d3869b", "#8ec07c", "#ebdbb2" ]
|
2022-05-02 23:02:43 -06:00
|
|
|
|
|
|
|
|
2021-11-16 16:40:58 -07:00
|
|
|
" stolen from https://shapeshed.com/vim-statuslines/
|
|
|
|
"function! GitBranch()
|
|
|
|
" return system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'")
|
|
|
|
" let g:gitparsedbranchname = strlen(l:string) > 0?'['.l:string.']':''
|
|
|
|
"endfunction
|
|
|
|
|
|
|
|
"function! StatuslineGit()
|
|
|
|
" let l:branchname = GitBranch()
|
|
|
|
" return strlen(l:branchname) > 0?' '.l:branchname.' ':''
|
|
|
|
"endfunction
|
|
|
|
|
|
|
|
"function! InsertStatuslineColor(mode)
|
|
|
|
" if a:mode == 'i'
|
|
|
|
" hi statusline guibg=Cyan ctermfg=6 guifg=Black ctermbg=0
|
|
|
|
" elseif a:mode == 'r'
|
|
|
|
" hi statusline guibg=Purple ctermfg=5 guifg=Black ctermbg=0
|
|
|
|
" else
|
|
|
|
" hi statusline guibg=DarkRed ctermfg=1 guifg=Black ctermbg=0
|
|
|
|
" endif
|
|
|
|
"endfunction
|
|
|
|
|
|
|
|
"au InsertEnter * call InsertStatuslineColor(v:insertmode)
|
|
|
|
"au InsertLeave * hi statusline guibg=DarkGrey ctermfg=8 guifg=White ctermbg=15
|
|
|
|
|
|
|
|
set statusline=
|
|
|
|
"set statusline+=%#PmenuSel#
|
|
|
|
"set statusline+=%{StatuslineGit()}
|
|
|
|
"set statusline+=%#LineNr#
|
2022-02-19 16:05:54 -07:00
|
|
|
set statusline+=\ %F
|
|
|
|
set statusline+=\ %y
|
2021-11-16 16:40:58 -07:00
|
|
|
set statusline+=\ %m
|
|
|
|
set statusline+=\ %r
|
|
|
|
set statusline+=%=
|
|
|
|
set statusline+=%#CursorColumn#
|
2022-02-19 16:05:54 -07:00
|
|
|
"set statusline+=\ %L\ lines
|
|
|
|
"set statusline+=\ %y
|
2021-11-16 16:40:58 -07:00
|
|
|
"set statusline+=\
|
|
|
|
set statusline+=\ %{&fileencoding?&fileencoding:&encoding}
|
|
|
|
"set statusline+=" >"
|
2022-02-19 16:05:54 -07:00
|
|
|
set statusline+=\ [%{&fileformat}\]
|
2021-11-16 16:40:58 -07:00
|
|
|
"set statusline+=" >"
|
|
|
|
set statusline+=\ %p%%
|
|
|
|
"set statusline+=" >"
|
2022-02-19 16:05:54 -07:00
|
|
|
set statusline+=\ %l/%L:%c
|
|
|
|
set statusline+=\
|
2021-11-16 16:40:58 -07:00
|
|
|
|
|
|
|
|
2022-03-11 00:20:49 -07:00
|
|
|
"hi StatusLine ctermbg=black
|
2022-02-19 16:05:54 -07:00
|
|
|
hi Normal ctermbg=NONE
|
|
|
|
let g:lightline = {
|
2022-03-11 00:20:49 -07:00
|
|
|
\ 'colorscheme': 'gruvbox',
|
|
|
|
\ 'active': {
|
|
|
|
\ 'left': [ [ 'mode', 'paste' ],
|
|
|
|
\ [ 'filename', 'readonly', 'modified' ] ],
|
|
|
|
\ 'right': [ [ 'lineinfo' ],
|
|
|
|
\ [ 'fileformat', 'fileencoding', 'filetype' ] ]
|
|
|
|
\ },
|
2022-05-02 23:02:43 -06:00
|
|
|
\ 'component_function': {
|
|
|
|
\ 'cocstatus': 'coc#status',
|
|
|
|
\ 'currentfunction': 'CocCurrentFunction'
|
|
|
|
\ },
|
2022-03-11 00:20:49 -07:00
|
|
|
\ }
|
|
|
|
set noshowmode
|