""Basic stuff set number set ttyfast set encoding=utf8 set clipboard=unnamedplus set nofoldenable ""Spaces instead of tabs set expandtab set tabstop=2 set shiftwidth=2 ""Don't litter swp files everywhere set backupdir=~/.cache set directory=~/.cache ""Ignore case and highlight matches when searching set ignorecase set hlsearch ""Resize line number colum set numberwidth=2 ""Keybindings set pastetoggle= let mapleader="\" nnoremap n :noh "Move the current line up or down nnoremap k :m-2== nnoremap j :m+== ""Markdown au FileType markdown Goyo let g:markdown_fenced_languages = ['cpp', 'python', 'java', 'sql'] let g:vim_markdown_math=1 ""Snippets let g:UltiSnipsExpandTrigger = '' let g:UltiSnipsJumpForwardTrigger = '' let g:UltiSnipsJumpBackwardTrigger = '' ""Vim-plug call plug#begin('~/.config/nvim/plugged') Plug 'plasticboy/vim-markdown', { 'for': 'markdown' } Plug 'junegunn/goyo.vim', { 'on': 'Goyo' } Plug 'SirVer/ultisnips', { 'for': 'markdown' } Plug 'Raimondi/delimitMate' Plug 'cocopon/iceberg.vim' call plug#end() ""Colors colorscheme iceberg set termguicolors ""Sets the colorscheme in tmux let &t_8f = "\[38;2;%lu;%lu;%lum" let &t_8b = "\[48;2;%lu;%lu;%lum" ""Disabe status line set laststatus=0 ""Set Markdown filetype for neomutt autocmd BufNewFile,BufRead /tmp/neomutt* set filetype=markdown ""Quitting whether Goyo is active or not function! s:goyo_enter() let b:quitting = 0 let b:quitting_bang = 0 autocmd QuitPre let b:quitting = 1 cabbrev q! let b:quitting_bang = 1 q! endfunction function! s:goyo_leave() " Quit Vim if this is the only remaining buffer if b:quitting && len(filter(range(1, bufnr('$')), 'buflisted(v:val)')) == 1 if b:quitting_bang qa! else qa endif endif endfunction autocmd! User GoyoEnter call goyo_enter() autocmd! User GoyoLeave call goyo_leave()