Files
dotfiles/dotfiles/vimrc
2019-12-18 17:30:02 +01:00

108 lines
2.2 KiB
VimL

" #######################
" ### vimrc from Marc ###
" #######################
" Vundle Plugin Manager - START
" Required
set nocompatible
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" Plugins
Plugin 'VundleVim/Vundle.vim'
Plugin 'jiangmiao/auto-pairs'
Plugin 'scrooloose/nerdtree'
Plugin 'editorconfig/editorconfig-vim'
Plugin 'maxboisvert/vim-simple-complete'
" Colorscheme
Plugin 'joshdick/onedark.vim'
Plugin 'itchyny/lightline.vim'
" Required
call vundle#end()
filetype plugin indent on
" Vundle Plugin Manager - END
" Plugin Settings
" NerdTree
let NERDTreeShowHidden=1
" Lightline Statusbar
set laststatus=2
let g:lightline = {
\ 'colorscheme': 'wombat',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ], [ 'readonly', 'absolutepath', 'modified' ] ],
\}
\ }
" Onedark Colorscheme
let g:onedark_hide_endofbuffer=1
let g:onedark_terminal_italics=1
" Coloooooors
syntax on
colorscheme onedark
filetype on
filetype indent plugin on
set colorcolumn=80
" Numbers at the left side
set number
:highlight LineNr ctermfg=gray "color
" set relativenumber
" Parathesis highlighting
set showmatch
set mat=5
" General
set noswapfile
set confirm "cant quit wo saving
"set showmode " shows editing mode in status
set noshowmode " reverse of above
" set showcmd " shows commands in status
set noshowcmd " reverse of above
set encoding=utf-8
set mouse=a
set mouse=c
set undolevels=1337
" Indents
set tabstop=4
set softtabstop=4
set shiftwidth=4
set noexpandtab " tabs are not spaces
" set expandtab " tabs are spaces
set smartindent
" Whitespaces
set list
"hi SpecialKey ctermbg=Darkgray " colored tabs
set list listchars=tab:>-,trail:\\ " default
" ADD JUST TRAILING HERE " just trailing
" Search
set incsearch
set ignorecase
set smartcase " case sens only when capitol letters
set hlsearch " highlight all results
nnoremap<leader><space> :nohlsearch<CR>
" Macros (cmap old new)
cmap Wq wq
cmap Q q
cmap W w
cmap q1 q!
map <C-t> :NERDTreeToggle<CR>
map <F2> :NERDTreeToggle<CR>
" go to line edited, when closed
if has("autocmd")
au BufReadPost * if line("' f\"") > 0 && line("'\"") <= line("$")
\| exe "normal! g'\"" | endif
endif
" no clue, got it from a co-worker
au BufNewFile,BufRead *.itex set filetype=tex