" Set as the leader key let mapleader = " " let maplocalleader = " " " [[ Setting options ]] " Fat cursor set guicursor= " Make relative line numbers default set number set relativenumber " Use 4 spaces as tab set tabstop=4 set softtabstop=4 set shiftwidth=4 set expandtab " Smart indentation set smartindent " Enable mouse mode set mouse=a " Don't show the mode, since it's already in the status line " set noshowmode " Enable break indent set breakindent " Save undo history set undofile let &undodir = $HOME . "/.vim/undodir" set noswapfile set nobackup " Case-insensitive searching UNLESS \C or one or more capital letters in the search term set ignorecase set smartcase " Incremental search set incsearch " Keep signcolumn on by default set signcolumn=yes set colorcolumn=79 " Decrease update time set updatetime=250 " Decrease mapped sequence wait time " Displays which-key popup sooner set timeoutlen=300 " Configure how new splits should be opened set splitright set splitbelow " Sets how Vim will display certain whitespace characters in the editor set nolist set listchars=tab:»\ ,space:·,trail:·,nbsp:␣ " Preview substitutions live, as you type! " set inccommand=nosplit " Show which line your cursor is on set nocursorline " Minimal number of screen lines to keep above and below the cursor. set scrolloff=0 " [[ Keymaps ]] " Set highlight on search, but clear on pressing in normal mode set hlsearch nnoremap :nohlsearch " Netrw nnoremap pv :Ex " Move through quick fixes nnoremap :cnext nnoremap :cprev " Move text in visual mode vnoremap J :m '>+1gv=gv vnoremap K :m '<-2gv=gv " Center screen with Vim motions nnoremap zz nnoremap zz nnoremap n nzzzv nnoremap N Nzzzv " System clipboard nnoremap y "+y vnoremap y "+y nnoremap Y "+Y " Delete without copying nnoremap d "_d vnoremap d "_d " Delete all marks nnoremap dm :delmarks! " Toggle listchars nnoremap lc :set list nnoremap ln :set nolist " Make executable nnoremap x :!chmod +x % " Change CWD for current tab nnoremap cd :cd %:h \| pwd " Tabs nnoremap tt :tabnew nnoremap tw :tabc nnoremap tn :tabn nnoremap tp :tabp nnoremap tr :tabr nnoremap tl :tabl " Buffers nnoremap bc :enew nnoremap bn :bn nnoremap bp :bp " Exit terminal mode in the builtin terminal with a shortcut that is a bit easier tnoremap " [[ Colorscheme ]] syntax on colorscheme GruberDarker " [[ GVim options ]] " Gui options set guioptions-=T set guifont=Iosevka\ 14