" Disable compatibility with vi which can cause unexpected issues. set nocompatible " Enable type file detection. Vim will be able to try to detect the type of file in use. filetype on " Enable plugins and load plugin for the detected file type. " Load an indent file for the detected file type. filetype plugin indent on set mouse+=a " Turn syntax highlighting on. syntax on " Add numbers to the file. set number set rnu " keyword lookup program: my take on grep set kp=flgrep " Highlight cursor line underneath the cursor horizontally. " Highlight cursor line underneath the cursor vertically. " set cursorline " set cursorcolumn " Set shift width to 4 spaces. " Set tab width to 4 columns. " Use space characters instead of tabs. set shiftwidth=4 set tabstop=4 set expandtab " Do not save backup files. set nobackup " Do not let cursor scroll below or above N number of lines when scrolling. " set scrolloff=10 " Do not wrap lines. Allow long lines to extend as far as the line goes. set nowrap " Ignore capital letters during search. " Override the ignorecase option if searching for capital letters. " This will allow you to search specifically for capital letters. set ignorecase set smartcase " Show partial command you type in the last line of the screen. set showcmd " Show the mode you are on the last line. set showmode " Show matching words during a search. " While searching though a file incrementally highlight matching characters as you type. " Use highlighting when doing a search. set showmatch set incsearch set hlsearch " Set the commands to save in history default number is 20. set history=1000 " Enable auto completion menu after pressing TAB. set wildmenu " Make wildmenu behave like similar to Bash completion. set wildmode=list:longest " There are certain files that we would never want to edit with Vim. " Wildmenu will ignore files with these extensions. set wildignore=*.docx,*.jpg,*.png,*.gif,*.pdf,*.pyc,*.exe,*.flv,*.img,*.xlsx " PLUGINS ---------------------------------------------------------------- {{{ call plug#begin('~/.vim/plugged') Plug 'dense-analysis/ale' Plug 'preservim/nerdtree' Plug 'vim-vdebug/vdebug' Plug 'tpope/vim-surround' " geprobeerd, strijdig met phpctags-tagbar? gutentags roept ctags aan " Plug 'ludovicchabant/vim-gutentags' " ik heb gutentags weer uitgeschakeld; mijn systeem gaat hangen van de " sort-calls Plug 'majutsushi/tagbar' Plug 'vim-php/phpctags', {'do': 'composer install'} " kan niet meer bij github? " Plug 'vim-php/tagbar-phpctags' Plug 'tpope/vim-rails' Plug 'christoomey/vim-tmux-navigator' Plug 'adoy/vim-php-refactoring-toolbox' Plug 'ecomba/vim-ruby-refactoring' Plug 'tpope/vim-fugitive' Plug 'phpactor/phpactor' Plug 'https://github.com/adelarsq/vim-matchit' Plug 'airblade/vim-gitgutter' " wil +python " gebruikt php8-constructies " Plug 'joonty/vim-phpqa.git' call plug#end() " }}} " " PLUGIN CONFIGS " ------------------------------------------------------------------------ {{{ " " ale let g:ale_linters = { \'ruby': ['rubocop'], \'php': ['phpcs'], \'js': ['js-beautify'], \} let g:ale_fixers = { \'php': ['phpcbf'], \'ruby': ['rubocop'], \'js': ['js-beautify'], \} " " vim-go let g:go_metalinter_enabled = ['vet', 'golint', 'errcheck'] let g:ale_fix_on_save = 0 " " vdebug let g:vdebug_options = { \ 'port':9003, \ } let g:vdebug_keymap = { \ "set_breakpoint": "b" \ } " " tagbar " let g:tagbar_show_data_type = 1 highlight TagbarVisibilityPrivate ctermfg=Blue " " }}} " " MAPPINGS --------------------------------------------------------------- {{{ nmap :TagbarToggle noremap :ALEFix nmap pa :cexpr system('vendor/bin/phpstan analyse --no-progress --error-format=raw %') nmap ]e :lnext nmap [e :lprevious " " }}} " VIMSCRIPT -------------------------------------------------------------- {{{ " autocmd BufReadPost * \ if line("'\"") > 0 && line("'\"") <= line("$") | \ exe "normal! g`\"" | \ endif " }}} " LEARN VIM THE HARD WAY -------------------------------------------------------------- {{{ " :nnoremap ev :vsplit $MYVIMRC :nnoremap sv :source $MYVIMRC noremap + ddp noremap - ddkP " }}}