" _ _|_|_____ ___ ___ " | | | | | _| _| " \_/|_|_|_|_|_| |___| " Menu: " 1...................Plugins " 2....................Basics " 3................Remappings " 4......Plugin Configuration " 3.......................GUI " 4................Statusline " 5.....................Fonts " 6....................Panels " 7................MS Windows "set laststatus=2 "set showtabline=2 " -----[ PLUGINS ]----- " call plug#begin('~/.vim/plugged') Plug 'itchyny/lightline.vim' " simple, goodlooking statusline Plug 'junegunn/fzf.vim' " fuzzy finder for files/buffers .. "Plug 'ervandew/supertab' " tabcompletion Plug 'junegunn/goyo.vim' " Goyo, distraction free writing for LaTeX Plug 'HansMartin/inline-python' " Inline Python exec. Plug 'dylanaraps/wal.vim' " Set coloscheme from pywal Plug 'rust-lang/rust.vim' " For Rust Plug 'preservim/nerdtree' " Not sure if needed Plug 'tpope/vim-fugitive' " Git for Vim Plug 'zah/nim.vim' " Nim Plugin Plug 'neovim/nvim-lspconfig' " Official Language Server Protocol " All the lua completion plugins Plug 'hrsh7th/nvim-cmp', {'branch': 'main'} Plug 'hrsh7th/cmp-nvim-lsp', {'branch': 'main'} Plug 'hrsh7th/cmp-buffer', {'branch': 'main'} Plug 'hrsh7th/cmp-path', {'branch': 'main'} Plug 'nvim-lua/plenary.nvim' Plug 'nvim-telescope/telescope.nvim' Plug 'catppuccin/nvim', {'as': 'catppuccin', 'branch':'main'} "Plug 'neoclide/coc.nvim', {'branch': 'release'} " Testing Plug 'chriskempson/base16-vim' call plug#end() " Loads lua config from lua/init.lua lua require('init') " -----[ BASICS ]----- " " Color Settings colorscheme wal " using the wal colorscheme set mouse=a " for moving splits with the mouse " Encoding set encoding=utf-8 " set UTF-8 Encoding per Defautl (render glyphs and co) set nocompatible set conceallevel=0 " conceallevel for markdown/latex files " disable any (terminal-)bells set noeb set novb set belloff=all " Path settings set backupdir=$HOME/.config/nvim/backups set noswapfile set undodir=$HOME/.config/nvim/undo " Syntax and Lines syntax enable set number set relativenumber filetype plugin indent on " CursorLine " set cursorline " hi CursorLine term=none cterm=none " Tab/Spacing settings set expandtab " use spaces instead of tabs set shiftwidth=4 " number of columns when indenting with > or < set softtabstop=4 " number of spaces when hitting tab set autoindent " set indentation from previous line " searching... set ignorecase " case insensitive set nohlsearch " no search highlighting after the search is done set noshowmatch " disable that blinking bracket stuff set wildmenu " shows menu for tab completion set incsearch " search if you type the letters set path+=** " include all subdirs for finding files (eg. :find) set backspace=2 set scrolloff=2 " -----[ Remappings ]----- " " Bind 'n' to nzz (center current line) nnoremap n nzz nnoremap N Nzz " Jump 5 lines at once with Ctr+e and Ctr+y nnoremap 5 nnoremap 5 " mapping for fast buffer switching nnoremap a :bp! noremap s :bn! " When selecting Text, keep the Block selected vmap < >gv " Remove Trailling Whitespaces on Buffer Write autocmd BufWritePre * :%s/\s\+$//e " auto execute xrdb when .Xresources is saved autocmd BufWritePost ~/.Xresources !xrdb % " automatically adjust splits autocmd VimResized * wincmd = " use Ctr+C for Copy Pasterino into sys. clipboard vnoremap "*y :let @+=@* " Bind Goyo to shortcut map :Goyo " Markdown viewer script map :silent !md-viewer % " Auto make map :silent !make " -----[ Plugin Configuration ]----- " " Lightline - Status Line " To use the wombat colorscheme set noshowmode " no required when having lightline in place let g:lightline = { \ 'colorscheme': 'wombat', \ } " FZF - Best Tool ever nnoremap :Telescope buffers nnoremap :Telescope find_files " Map the Python Evaluation into the vim-expression command(Q) nnoremap Q :EvalPython let g:il_append=1 let g:il_use_nextline=0 " Goyo Configuration let g:goyo_width=100 let g:goyo_height=100 " --- LaTeX Mappings --- " stolen from Luke Smith's vimrc " " will only work in .tex files " Navigating with guides autocmd FileType tex inoremap /<++>"_c4l autocmd FileType tex vnoremap /<++>"_c4l autocmd FileType tex nnoremap /<++>"_c4l " Compile document using xelatex: autocmd FileType tex inoremap :!pdflatex%a autocmd FileType tex nnoremap :!pdflatex% " Shortcuts autocmd FileType tex inoremap ,em \emph{}<++>T{i autocmd FileType tex inoremap ,bf \textbf{}<++>T{i autocmd FileType tex vnoremap , ``>2la}?\\{a autocmd FileType tex inoremap ,it \textit{}<++>T{i autocmd FileType tex inoremap ,ol \begin{enumerate}\end{enumerate}<++>3kA\item autocmd FileType tex inoremap ,ul \begin{itemize}\end{itemize}<++>3kA\item autocmd FileType tex inoremap ,li \item autocmd FileType tex inoremap ,ref \ref{}<++>T{i autocmd FileType tex inoremap ,tab \begin{tabular}<++>\end{tabular}<++>4kA{}i autocmd FileType tex inoremap ,sc \textsc{}<++>T{i autocmd FileType tex inoremap ,chap \chapter{}<++>2kf}i autocmd FileType tex inoremap ,sec \section{}<++>2kf}i autocmd FileType tex inoremap ,ssec \subsection{}<++>2kf}i autocmd FileType tex inoremap ,sssec \subsubsection{}<++>2kf}i autocmd FileType tex inoremap ,col \begin{columns}[T]\begin{column}{.5\textwidth}\end{column}\begin{column}{.5\textwidth}<++>\end{column}\end{columns}5kA " -----[ GUI ]----- " " This hides the Toolbar, Menubar and left/right scrollbar in gvim if has("gui_running") set guioptions -=T set guioptions -=m set guioptions -=r set guioptions -=L endif " -----[ Fonts ]----- " if has("gui_running") if has("gui_gtk2") set guifont=Hack\ 9 elseif has("gui_macvim") set guifont=Menlo\ Regular:h14 elseif has("gui_win32") set guifont=Hack:h9:cANSI,Consolas:h11:cANSI endif endif " -----[ Panels ]----- " " This remaps Ctrl+W + to Ctr+HJKL for changig the Panel in a " splitted mode map h map j map k map l " This is to get Tabs by using the Key (Leader Key: '\') nmap 1 1gt nmap 2 2gt nmap 3 3gt nmap 4 4gt nmap 5 5gt nmap 6 6gt " -----[ MS Windows ]----- " " Getting the Windows mswin behaviour if has("win32") source $VIMRUNTIME/mswin.vim behave mswin endif if exists("b:current_syntax") finish endif " Conceal "hi Conceal guibg=NONE setlocal cole=1 if exists("g:neovide") colorscheme catppuccin let g:neovide_cursor_animation_length=0.15 let g:neovide_cursor_trail_length=0.3 nnoremap "+p inoremap + cnoremap + endif " -----[ Completion ]----- " " --> Completion is handled in `init.lua` " LSP / Completion Stuff " keep the left column for hinte.g. structs in nim) set signcolumn=yes