--- /dev/null
+
+# cursors + indicator depending on mode
+set editing-mode vi
+set vi-ins-mode-string \1\e[34;1m\2[i]\1\e[0m\2\1\e[5 q\e]12;\a\2
+set vi-cmd-mode-string \1\e[33;1m\2[n]\1\e[0m\2\1\e[1 q\e]12;\a\2
+set show-mode-in-prompt on
+
+# tab completion options
+set show-all-if-ambiguous on
+set page-completions off
set encoding=utf-8
set tabstop=4
set shiftwidth=4
-set expandtab
+" set expandtab
set ignorecase
set smartcase
set nrformats+=alpha "inc/dec alpha
" Bindings
let mapleader = ' '
-" File stuff
+" netrw stuff
map <leader>f :Ex<cr>
map <leader>l :bn<cr>
map <leader>h :bp<cr>
function! StatusModeColor()
if (mode() =~# '\v(n|no)')
hi StatusLine cterm=None gui=None ctermfg=black ctermbg=Yellow
- elseif (mode() =~# '\v(v|V)')
+ elseif (mode() =~# '\v(v|V|\16)')
hi StatusLine cterm=None gui=None ctermfg=black ctermbg=Red
elseif (mode() ==# 'i')
hi StatusLine cterm=None gui=None ctermfg=black ctermbg=LightBlue
" vim plug
" this blob auto installs vim plug if it isnt already
-if empty(glob('~/.vim/autoload/plug.vim'))
- silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
- \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
- autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
- endif
+fun! s:VimPlugSetup()
+ if empty(glob('~/.vim/autoload/plug.vim'))
+ silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
+ autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
+ else
+ echo 'VimPlug is already installed'
+ endif
+endfun
+command PlugSetup :call s:VimPlugSetup()
" template stuff
call plug#begin('~/.vim/plugged')
Plug 'sirver/ultisnips'
+Plug 'tpope/vim-commentary'
+Plug 'ap/vim-buftabline'
Plug 'lervag/vimtex'
Plug 'PietroPate/vim-tex-conceal'
" Plug 'jiangmiao/auto-pairs'
-Plug 'tpope/vim-commentary'
-Plug 'rlue/vim-barbaric'
-Plug 'ap/vim-buftabline'
+" Plug 'rlue/vim-barbaric'
+" Plug 'junegunn/fzf'
call plug#end()
map <localleader>sr :call UltiSnips#RefreshSnippets()<cr>:echo "Refreshed Snippets"<cr>
+" latex stuff
+" fun! LatexCompile()
+" echo 'compiling latex'
+" endfun
+" augroup latex
+" autocmd!
+" autocmd BufWritePost *.tex :call LatexCompile()
+" augroup END
+
" Vimtex
let g:tex_flavor='latex'
let g:vimtex_view_method='zathura'
" \],
" vim-barbaric
-let g:barbaric_ime = 'ibus'
-set ttimeoutlen=0
+" let g:barbaric_ime = 'ibus'
+" set ttimeoutlen=0
" buftabline
let g:buftabline_show = 1
+" fzf
+" let g:fzf_layout = { 'down': '40%' }
+" let g:fzf_layout = { 'window': '-tabnew' }
+
" Run after plugins
autocmd FileType * set formatoptions-=o