summaryrefslogtreecommitdiff
path: root/nvim/init.vim
diff options
context:
space:
mode:
authortjk918 <tjk@tjkeller.xyz>2021-10-08 18:04:37 -0500
committertjk918 <tjk@tjkeller.xyz>2021-10-08 18:04:37 -0500
commit060010ed8eb1882fecfe46e124b564b6b9d9eab5 (patch)
treec1cac2ad0c8d9c9d1799144228b0c81c5c512976 /nvim/init.vim
parent2f269974da53bebfdef097b07302057bcd04127d (diff)
downloaddotconfig-060010ed8eb1882fecfe46e124b564b6b9d9eab5.tar.xz
dotconfig-060010ed8eb1882fecfe46e124b564b6b9d9eab5.zip
colors and tex changes
Diffstat (limited to 'nvim/init.vim')
-rwxr-xr-xnvim/init.vim29
1 files changed, 18 insertions, 11 deletions
diff --git a/nvim/init.vim b/nvim/init.vim
index 73fea05..de93236 100755
--- a/nvim/init.vim
+++ b/nvim/init.vim
@@ -28,8 +28,13 @@ set termguicolors " Enable GUI colors for the terminal to get truecolor
set wildmode=longest,list,full " Enable file auto-complete
syntax on " Enable syntax highlighting
+" Filetype options
+autocmd BufRead,BufNewFile *.tex set filetype=tex
+au Filetype tex let b:autopairs_enabled = 0
+au Filetype tex setlocal indentexpr=
+
" VimWiki options
-let g:vimwiki_list = [{'path': '~/docs/school/docs/wiki/', 'path_html': '~/docs/school/docs/wiki/site/'}]
+let g:vimwiki_list = [{'path': '~/docs/school/arc/docs/wiki/', 'path_html': '~/docs/school/arc/docs/wiki/site/'}]
" Keybindings
" Set leader-key to comma
@@ -48,14 +53,14 @@ nmap <C-h> 0
nmap <C-j> <C-d>
nmap <C-k> <C-u>
nmap <C-l> $
- " Faster split navigation (alt-hjlk, as opposed to ctrl-w + hjlk)
-"map <A-h> <C-w>h
-"map <A-j> <C-w>j
-"map <A-k> <C-w>k
-"map <A-l> <C-w>l
+ " Faster split navigation (leader-wasd, as opposed to ctrl-w + hjlk)
+map <leader>a <C-w>h
+map <leader>s <C-w>j
+map <leader>w <C-w>k
+map <leader>d <C-w>l
" Streamlined tab navigation with chromium inspired keybindings
-nmap <TAB> gt
-nmap <S-TAB> gT
+nmap <leader><TAB> gt
+nmap <leader>t :tabnew<CR>
nmap <C-T> :tabnew<CR>
" Copy, paste, and cut with standard bindings
map <C-c> "+y
@@ -104,11 +109,13 @@ endfunction
autocmd BufWritePre * call DelWS()
" Disables automatic commenting on newline:
- autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
+autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
+
" Perform dot commands over visual blocks:
- vnoremap . :normal .<CR>
+vnoremap . :normal .<CR>
+
" Save file as sudo on files that require root permission
- cnoremap w!! execute 'silent! write !doas tee % >/dev/null' <bar> edit!
+cnoremap w!! execute 'silent! write !doas tee % >/dev/null' <bar> edit!
" Plugin options
" closetag