2021-09-06 07:30:45 +02:00
|
|
|
" ----------------------------------------------------------------------------
|
|
|
|
" basic essentials
|
|
|
|
" ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
" don't make vim vi compatible (if not set you miss out on a lot of features!)
|
|
|
|
" you'll see this option set in most configuration files found online
|
|
|
|
set nocompatible
|
|
|
|
|
|
|
|
" enable filetype recognition plus indent and plugin (pretty much mandatory)
|
|
|
|
filetype plugin indent on " required
|
|
|
|
|
|
|
|
" enable syntax highlighting
|
|
|
|
syntax on
|
|
|
|
|
|
|
|
" backspace can be a tricky thing and this setting make it work a lot better
|
|
|
|
set backspace=indent,eol,start
|
|
|
|
|
|
|
|
" when tab completing on the expert line you don't want to miss out on EDIT vs
|
|
|
|
" edit or nerdtree vs NERDTree and this setting ignores case completely
|
|
|
|
set ignorecase
|
|
|
|
|
|
|
|
" highlight your search patterns (very handy when building regexes)
|
|
|
|
set hlsearch
|
|
|
|
|
|
|
|
" highlight the search pattern as-you-go (tremendously helpful when
|
|
|
|
" constructing regexes)
|
|
|
|
set incsearch
|
|
|
|
|
|
|
|
" always show a status line at the bottom of your vim which shows some basic
|
|
|
|
" information about the file, which line you're at etc
|
|
|
|
set laststatus=2
|
|
|
|
|
|
|
|
" show files in statusbar when opening via expert mode
|
|
|
|
set wildmenu
|
|
|
|
|
|
|
|
" also show all possible expert mode commands in the statusline
|
|
|
|
set wildmode=full
|
|
|
|
|
|
|
|
" reverse numbering (in the sideline) so you don't have to manually count how
|
|
|
|
" many lines you have to yank
|
|
|
|
set rnu
|
|
|
|
|
|
|
|
" it's also nice to still have your absolute line number in the sideline
|
|
|
|
set nu
|
|
|
|
|
|
|
|
" can do copy paste from the clipboard
|
|
|
|
set clipboard=unnamedplus
|
|
|
|
|
|
|
|
" automatically save buffers
|
|
|
|
set autowrite
|
|
|
|
set autowriteall
|
|
|
|
|
|
|
|
" spaces not tabs for coding purposes
|
|
|
|
set sw=4
|
|
|
|
set ts=4
|
|
|
|
set sts=4
|
2024-01-30 09:10:33 +01:00
|
|
|
set autoindent
|
|
|
|
set expandtab
|
2021-09-06 07:30:45 +02:00
|
|
|
|
|
|
|
" mouse usage can be handy, especially when using LspPeekDefinition
|
|
|
|
set mouse=a
|
|
|
|
|
|
|
|
" enable code folding
|
|
|
|
set foldmethod=indent
|
|
|
|
|
|
|
|
" set SPACE to toggle a fold
|
|
|
|
nnoremap <SPACE> za
|
|
|
|
|
|
|
|
" set the leader key for shortcuts (uncomment if you don't want it to be the
|
|
|
|
" default \ key
|
|
|
|
"let mapleader=";"
|
|
|
|
|