" _ " (_) " __ ___ _ __ ___ _ __ ___ " \ \ / / | '_ ` _ \| '__/ __| " \ V /| | | | | | | | | (__ " \_/ |_|_| |_| |_|_| \___| " " " Vim Plug {{{ " Plug Autoinstall {{{ 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 " }}} " Plugins call plug#begin() " Bracket Completion Plug 'jiangmiao/auto-pairs' " Automated vim bulletpoints Plug 'dkarter/bullets.vim' " Vim css hex highlight Plug 'chrisbra/Colorizer' " Deoplete Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } " LaTeX deoplete Plug 'hisaknown/deoplete-latex' " Todoist with vim? Plug 'romgrk/todoist.nvim', { 'do': ':TodoistInstall' } " Minimal writing environment Plug 'junegunn/goyo.vim' " markdown preview vim Plug 'iamcco/markdown-preview.nvim' " Nice markdown formatting Plug 'godlygeek/tabular', { 'for': 'markdown' } Plug 'plasticboy/vim-markdown', { 'for': 'markdown' } " Generate buffers Plug 'AndrewRadev/bufferize.vim' " Emmet Plug 'mattn/emmet-vim', { 'for': [ 'markdown', 'html' ] } " html preview Plug 'turbio/bracey.vim', { 'for': [ 'html', 'stylesheet', 'javascript'] } " My colorscheme Plug 'ChausseBenjamin/friffle-vim' " Elly colorscheme Plug 'ryuta69/elly.vim' " Vim Fugitive Plug 'tpope/vim-fugitive' " Vim-Surround Plug 'tpope/vim-surround' " Vim repeat for dot command on vim surround Plug 'tpope/vim-repeat' " Vimtex Plug 'lervag/vimtex', { 'for': ['tex', 'aux', 'bib'] } " Commentary Plug 'tpope/vim-commentary' " Vim snippet manager/tool Plug 'sirver/UltiSnips' " Vim snippet library Plug 'honza/vim-snippets' " French grammar checker Plug 'dpelle/vim-Grammalecte' " All purpose grammar checker Plug 'dpelle/vim-LanguageTool' " sxhkd syntax Plug 'kovetskiy/sxhkd-vim', { 'for': 'sxhkdrc' } " Google cal inside vim Plug 'itchyny/calendar.vim' " Turning vim into an R IDE Plug 'jalvesaq/Nvim-R', { 'for': [ 'R', 'Rnoweb', 'tex', 'aux', 'bib' ] } " csv filetype for vim Plug 'chrisbra/csv.vim' " Quick highlighting Plug 'qxxxb/vim-searchhi' " Split resizing made easy Plug 'simeji/winresizer' call plug#end() " }}} " Sensible defaults {{{ " Aesthetics & basics syntax on colo friffle " colorscheme tweaks {{{ hi Normal guibg=NONE hi CursorLineNr guibg=NONE hi Constant guibg=NONE hi Conceal guibg=NONE hi Folded guibg=NONE hi ColorColumn guibg='#738c9c' hi Todo guibg='#acb3b5' guifg='#340001' hi Search guifg='#810002' guibg='#738c9c' " }}} " weird Goyo behavior fix {{{ au User GoyoEnter,GoyoLeave hi Normal guibg=NONE au User GoyoEnter,GoyoLeave hi StatusLineNC guibg=NONE au User GoyoEnter,GoyoLeave hi StatusLine guibg=NONE au User GoyoEnter,GoyoLeave hi VertSplit guibg=NONE " }}} set tgc " Use my terminal's colors set lz " Lazy redraw -> Quicker vim set t_Co=256 " 256 colors set enc=utf-8 set wmnu " Display all matching file when we tab complete set nosc " Don't show the previously typed command set nu rnu " Ablolute Relative number hybrid set ru " View column count set ls=0 " Disable the statusline set sb spr " Sensible split directions set ts=2 " A sensible tab width set shiftwidth=2 " A sensible tab width set et " Expanding tabs set foldmethod=marker " vim folding " Completion set path+=** " Provides tab-completion for all file related tasks set wim=longest,list,full " set completion mode set runtimepath+=~/.config/nvim/plugged/deoplete.nvim let g:deoplete#enable_at_startup = 1 " Wrapping set wrap set lbr " Custom semicolon leader let mapleader=";" " Tab space for quick commands nnoremap : " Spelling set complete+=kspell " Better Spell Checking set spl=fr " French prose " Tag Editing inoremap t <++> inoremap : /<++>"_c4l " Quickly save nnoremap w :update " Logical way to Y ank nnoremap Y y$ " Easily escape terminal mode tnoremap " Split motion nnoremap h nnoremap j nnoremap k nnoremap l " Saving and quitting buffers nnoremap ZF ZQ nnoremap w :update " Remove trailing white spaces autocmd BufWritePre * %s/\s\+$//e " }}} " Workflow specific {{{ " 'o'pen pdf for the current document nnoremap o :!opout % nnoremap c :update \| :!compiler % nnoremap r :update \| :!compiler % \| :!sage %:r.sagetex.sage && compiler % " Auto-enable Goyo for certain filetypes au filetype mail,todoist Goyo " }}} " Plugin related {{{ " Todoist.nvim let todoist = { \ 'icons': { \ 'unchecked': ' ', \ 'checked': ' ', \ 'loading': ' ', \ 'error': ' ', \ }, \} " Markdown syntax let g:vim_markdown_strikethrough = 1 let g:vim_markdown_folding_disabled = 1 set conceallevel=2 " Bufferize let g:bufferize_command = 'vnew' " Bracey let g:bracey_browser_command = "firefox" " Grammalecte let g:grammalecte_cli_py = "/usr/bin/grammalecte-cli" " Calendar.vim let g:calendar_google_calendar = 1 let g:calendar_frame = 'default' source ~/.cache/calendar.vim/credentials.vim " Emmet.vim let g:user_emmet_leader_key=',' " Vimtex " pdf viewer let g:vimtex_view_general_viewer = 'open' let g:vimtex_view_general_options = '-a zathura' let g:tex_flavor = 'latex' " TOC nnoremap :VimtexTocToggle " Underscore errors let g:tex_no_error=1 " Nvim-R " Folding let r_syntax_folding = 1 set foldnestmax=1 set foldmethod=marker " Follow colorscheme let rout_follow_colorscheme = 0 " Arduino let g:arduino_cmd = '/usr/bin/arduino' let g:arduino_dir = '/usr/share/arduino' " Ultisnips let g:UltiSnipsExpandTrigger="" let g:UltiSnipsJumpForwardTrigger=";" let g:UltiSnipsJumpBackwardTrigger=";n" " If you want :UltiSnipsEdit to split your window. let g:UltiSnipsEditSplit="vertical" " Snippet directory let g:UltiSnipsSnippetDirectories=[$HOME.'/.config/nvim/UltiSnips'] " }}} " See immediate results when edditing this file autocmd BufWritePost ~/.config/nvim/init.vim :source %