From 6d5256103d4739ad014d9c0e7db5d841ab03fda1 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Thu, 1 Oct 2020 13:05:15 +0200 Subject: [PATCH] Initial (n)vim configuration. --- .config/nvim/init.vim | 3 +++ .vim/colors/monokai-black.vim | 34 +++++++++++++++++++++++++++++ .vimrc | 40 +++++++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+) create mode 100644 .config/nvim/init.vim create mode 100644 .vim/colors/monokai-black.vim create mode 100644 .vimrc diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim new file mode 100644 index 0000000..f182e5b --- /dev/null +++ b/.config/nvim/init.vim @@ -0,0 +1,3 @@ +set runtimepath^=~/.vim runtimepath+=~/.vim/after +let &packpath = &runtimepath +source ~/.vimrc diff --git a/.vim/colors/monokai-black.vim b/.vim/colors/monokai-black.vim new file mode 100644 index 0000000..46dbc73 --- /dev/null +++ b/.vim/colors/monokai-black.vim @@ -0,0 +1,34 @@ +" VIM color file +" +" Note: Based on the Monokai theme for Sublime Text + +hi clear +set background=dark +if version > 580 + if exists("syntax_on") + syntax reset + endif +endif +set t_Co=256 +let g:colors_name="Monokai" +hi Character guifg=#AE81FF guibg=NONE guisp=NONE gui=NONE ctermfg=141 ctermbg=NONE cterm=NONE +hi Comment guifg=#75715E guibg=NONE guisp=NONE gui=NONE ctermfg=242 ctermbg=NONE cterm=NONE +hi Constant guifg=#AE81FF guibg=NONE guisp=NONE gui=NONE ctermfg=141 ctermbg=NONE cterm=NONE +hi Cursor guifg=NONE guibg=#F8F8F0 guisp=NONE gui=NONE ctermfg=NONE ctermbg=255 cterm=NONE +hi CursorLine guifg=NONE guibg=#3E3D32 guisp=NONE gui=NONE ctermfg=NONE ctermbg=237 cterm=NONE +hi Function guifg=#A6E22E guibg=NONE guisp=NONE gui=NONE ctermfg=148 ctermbg=NONE cterm=NONE +hi Identifier guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE +hi Keyword guifg=#F92672 guibg=NONE guisp=NONE gui=NONE ctermfg=197 ctermbg=NONE cterm=NONE +hi LineNr guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE +hi Normal guifg=#F8F8F2 guibg=#0D0D0B guisp=NONE gui=NONE ctermfg=255 ctermbg=232 cterm=NONE +hi Number guifg=#AE81FF guibg=NONE guisp=NONE gui=NONE ctermfg=141 ctermbg=NONE cterm=NONE +hi StorageClass guifg=#F92672 guibg=NONE guisp=NONE gui=NONE ctermfg=197 ctermbg=NONE cterm=NONE +hi String guifg=#E6DB74 guibg=NONE guisp=NONE gui=NONE ctermfg=186 ctermbg=NONE cterm=NONE +hi Type guifg=#A6E22E guibg=NONE guisp=NONE gui=underline ctermfg=148 ctermbg=NONE cterm=underline +hi Visual guifg=NONE guibg=#49483E guisp=NONE gui=NONE ctermfg=NONE ctermbg=238 cterm=NONE + +hi link Conditional Keyword +hi link Repeat Keyword + +hi link cType Keyword + diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..c63e6ee --- /dev/null +++ b/.vimrc @@ -0,0 +1,40 @@ +call plug#begin('~/.vim/plugged') + + "Julia support + Plug 'JuliaEditorSupport/julia-vim' + "TOML syntax highlighting + Plug 'cespare/vim-toml' + "LaTeX + Plug 'lervag/vimtex' + +call plug#end() + +"Need to specify latex flavor for the lervag/vimtex plugin +:let g:tex_flavor = 'latex' + +"Enable colors and set color scheme +"if has('nvim') +if exists('+termguicolors') + :set termguicolors +endif +:colorscheme monokai-black + +"Line numbers +:set number + +"Misc keymappings and configurations +:imap jk |"use jk for exiting insert mode +:set tabstop=4 softtabstop=4 shiftwidth=4 expandtab smarttab autoindent "Nicer tab actions + +"Move aroung splits without the C-W prefix +:nnoremap +:nnoremap +:nnoremap +:nnoremap +"More natural split directions +:set splitbelow +:set splitright +"Auto-resize splits when terminal window changes size (e.g. when splitting or +"zooming with tmux +:autocmd VimResized * wincmd = +