let mapleader ="," let g:vimwiki_list = [{'path': '~/dox/notes/', 'index': 'Main'}] if ! filereadable(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/plug.vim"')) echo "Downloading junegunn/vim-plug to manage plugins..." silent !mkdir -p ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/ silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/plug.vim autocmd VimEnter * PlugInstall endif let g:vimwiki_list = [{'path': '~/dox/notes/', 'index': 'Main'}] call plug#begin(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/plugged"')) Plug 'tpope/vim-surround' Plug 'preservim/nerdtree' Plug 'junegunn/goyo.vim' Plug 'jreybert/vimagit' Plug 'lukesmithxyz/vimling' Plug 'vimwiki/vimwiki' Plug 'vim-airline/vim-airline' Plug 'tpope/vim-commentary' Plug 'neoclide/coc.nvim', {'branch': 'master', 'do': 'yarn install --frozen-lockfile'} Plug 'ap/vim-css-color' Plug 'lervag/vimtex', { 'for': ['tex'] } Plug 'arcticicestudio/nord-vim' Plug 'rhysd/vim-grammarous' Plug 'jalvesaq/Nvim-R', {'branch': 'stable', 'for': ['r', 'R', 'Rmd', 'rmd']} Plug 'luk400/vim-jukit' Plug 'David-Kunz/gen.nvim' Plug 'othree/html5.vim' Plug 'pangloss/vim-javascript' Plug 'evanleck/vim-svelte', {'branch': 'main'} Plug 'github/copilot.vim', Plug 'nathangrigg/vim-beancount' call plug#end() let g:vimwiki_list = [{'path': '~/dox/notes/', 'index': 'Main'}] set title set bg=light set go=a set mouse=a set nohlsearch set clipboard+=unnamedplus set noshowmode set noruler set laststatus=0 set noshowcmd set undofile colorscheme nord " Some basics: nnoremap c "_c set nocompatible filetype plugin on syntax on set encoding=utf-8 set number relativenumber " respects camel case as different words set iskeyword-=_ " Enable autocompletion: set wildmode=longest,list,full " Disables automatic commenting on newline: autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o " Perform dot commands over visual blocks: vnoremap . :normal . " Goyo plugin makes text more readable when writing prose: map f :Goyo \| set bg=light \| set linebreak " Spell-check set to o, 'o' for 'orthography': map o :setlocal spell! spelllang=en_us " Splits open at the bottom and right, which is non-retarded, unlike vim defaults. set splitbelow splitright """ Autocompile RMarkdown on save if flag is set in file " Define a function to check for the autocompile flag and compile if present function! CompileRMarkdown() let autocompile = search('<\!--\s\+vim:\s\+set\s\+autocompile=true\s\+-->', 'nW') != 0 if autocompile silent !Rscript -e 'rmarkdown::render("%")' redraw! endif endfunction " Automatically compile RMarkdown on buffer write autocmd BufWritePost *.Rmd call CompileRMarkdown() """ GitHub Copilot " remap accept to instead of imap