From 2f152e112a5667024e9dd72c286eb26a93fa3d57 Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Fri, 8 Nov 2019 22:27:19 +0100 Subject: Adds some configuration files. --- vimrc | 139 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 vimrc (limited to 'vimrc') diff --git a/vimrc b/vimrc new file mode 100644 index 0000000..b5051aa --- /dev/null +++ b/vimrc @@ -0,0 +1,139 @@ +"Required for mapping commands. +set nocompatible + +execute pathogen#infect() + +"Enables syntax coloring. +syntax on + +"Enables rainbow coloring of parenthesis. +let g:rainbow_active=1 + +"Sets the color theme. +let g:gruvbox_italic=1 +colorscheme gruvbox + +"Highlights the 81th column onward. +let &colorcolumn=join(range(81,999),",") + +"Enables the command menu autocomplete feature. +set wildmenu + + +"Searching options. +set incsearch "Search as I type. +set hlsearch "Highlight matches. + +"Tab navigation mapping. +:map :tabprevious +:map :tabnext +:imap :tabprevious +:imap :tabnext + +"Spell mapping. +:map :set spell spelllang=en_us +:map :set spell spelllang=fr +:map :set nospell +:imap :set spell spelllang=en_us +:imap :set spell spelllang=fr +:imap :set nospell +:nnoremap ` a + +"Vim uses 2 spaces for LISP, I prefer 3. +:map :set indentexpr=3 +:imap :set indentexpr=3 + +"Remove useless whitespaces. +:map :%s/\s\+$//g +:map :%s/\s\+$//g + +"Button to toggle paste mode. +set pastetoggle= + +"Disable the directional keys, because they hurt my wrists. +noremap +noremap +noremap +noremap +inoremap +inoremap +inoremap +inoremap + +"Sets the number of tabs that can be opened by 'vim -p'. +set tabpagemax=255 + +"Creates a shared clipboard between Vim instances. +set clipboard=unnamedplus + +"Displays line numbers. +set number + +"Shows matching parenthesis. +set showmatch + +"let g:syntastic_java_checkers = ['javac'] +let g:syntastic_java_javac_custom_classpath_command= + \ 'echo ".:";cat ./.java_classpath' + +"Italics +set t_ZH= +set t_ZR= + +"We use Chicken Scheme +let b:is_chicken=1 +"No clue... +"set smartindent +let g:syntastic_enable_signs=1 + +" Custom rainbow parenthesis config +let g:rainbow_conf = { +\ 'guifgs': ['royalblue3', 'darkorange3', 'seagreen3', 'firebrick'], +\ 'ctermfgs': ['lightblue', 'lightyellow', 'lightcyan', 'lightmagenta'], +\ 'operators': '_,_', +\ 'parentheses': ['start=/(/ end=/)/ fold', 'start=/\[/ end=/\]/ fold', 'start=/{/ end=/}/ fold'], +\ 'separately': { +\ '*': {}, +\ 'tex': { +\ 'parentheses': ['start=/(/ end=/)/', 'start=/\[/ end=/\]/'], +\ }, +\ 'lisp': { +\ 'guifgs': ['royalblue3', 'darkorange3', 'seagreen3', 'firebrick', 'darkorchid3'], +\ }, +\ 'vim': { +\ 'parentheses': ['start=/(/ end=/)/', 'start=/\[/ end=/\]/', 'start=/{/ end=/}/ fold', 'start=/(/ end=/)/ containedin=vimFuncBody', 'start=/\[/ end=/\]/ containedin=vimFuncBody', 'start=/{/ end=/}/ fold containedin=vimFuncBody'], +\ }, +\ 'html': { +\ 'parentheses': ['start=/\v\<((area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)[ >])@!\z([-_:a-zA-Z0-9]+)(\s+[-_:a-zA-Z0-9]+(\=("[^"]*"|'."'".'[^'."'".']*'."'".'|[^ '."'".'"><=`]*))?)*\>/ end=## fold'], +\ }, +\ 'css': 0, +\ } +\} + + +" Enables dark mode for gruvbox +set background=dark + +" Keeps the terminal's current background color (and transparency) +hi Normal ctermfg=252 ctermbg=none +"Highlights unwanted whitespaces. +highlight ExtraWhitespace ctermbg=red guibg=red +match ExtraWhitespace /\s\+$/ +autocmd BufWinEnter * match ExtraWhitespace /\s\+$/ +autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@