summaryrefslogtreecommitdiff
path: root/nvim/init.vim
diff options
context:
space:
mode:
authorTimmy Keller <tjk@tjkeller.xyz>2021-10-14 13:41:43 -0500
committerTimmy Keller <tjk@tjkeller.xyz>2021-10-14 13:41:43 -0500
commitae3e6e3b74c1ee1e63fa8adfcc7457703d0b2b4f (patch)
tree11b65072e5a7bbb34c3fd5bd5b1f3da58aad27be /nvim/init.vim
parent62a28fa769a21829b9c2b6c6b1ff5312043c2c4b (diff)
parent060010ed8eb1882fecfe46e124b564b6b9d9eab5 (diff)
downloaddotconfig-ae3e6e3b74c1ee1e63fa8adfcc7457703d0b2b4f.tar.xz
dotconfig-ae3e6e3b74c1ee1e63fa8adfcc7457703d0b2b4f.zip
Merge branch 'master' of git.tjkeller.xyz:/var/www/git/dotconfig
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