commit 13429d1b0227160157ec2e66f411321c94af2cbd
parent d8e55b19054d1d8c9fbf88e504dd2f608db983a7
Author: Benjamin Chausse <benjamin@chausse.xyz>
Date:   Tue, 17 Nov 2020 23:57:41 -0500

Starting vim spring cleanup

Diffstat:
M.config/mimeapps.list | 1+
M.config/newsboat/urls | 11+++++++----
D.config/nvim/UltiSnips/rnoweb.snippets | 122-------------------------------------------------------------------------------
A.config/nvim/ftplugin/csv.vim | 0
A.config/nvim/ftplugin/go.vim | 17+++++++++++++++++
A.config/nvim/ftplugin/python.vim | 0
A.config/nvim/ftplugin/r.vim | 4++++
A.config/nvim/ftplugin/rmd.vim | 6++++++
A.config/nvim/ftplugin/rnoweb.vim | 8++++++++
A.config/nvim/ftplugin/tex.vim | 0
M.config/nvim/init.vim | 53++++-------------------------------------------------
M.config/vifm/vifmrc | 2+-
12 files changed, 48 insertions(+), 176 deletions(-)

diff --git a/.config/mimeapps.list b/.config/mimeapps.list @@ -19,3 +19,4 @@ x-scheme-handler/lbry=lbry.desktop inode/directory=file.desktop x-scheme-handler/kite=kite-copilot.desktop application/x-osptracker=tracker.desktop +x-scheme-handler/msteams=teams.desktop diff --git a/.config/newsboat/urls b/.config/newsboat/urls @@ -1,8 +1,11 @@ #https://rss.app/feeds/nxTRC66uslhT5E22.xml #---Podcasts---# # -http://feeds.wnyc.org/science-friday "Podcast" "~Podcast: Science Friday " -https://feeds.buzzsprout.com/191338.rss "Podcast" "~Podcast: Our Ludicrous Future (Tim Dodd) " -https://carpoolcritics.libsyn.com/rss "Podcast" "~Podcast: Carpool Critics " -https://linustechtips.libsyn.com/wanshow "Podcast" "~Podcast: The WAN Show" +http://feeds.wnyc.org/science-friday "Podcast" "~Podcast: Science Friday " +https://feeds.buzzsprout.com/191338.rss "Podcast" "~Podcast: Our Ludicrous Future (Tim Dodd) " +https://carpoolcritics.libsyn.com/rss "Podcast" "~Podcast: Carpool Critics " +https://linustechtips.libsyn.com/wanshow "Podcast" "~Podcast: The WAN Show" +https://anchor.fm/s/3a6f26f8/podcast/rss "Podcast" "~Podcast: Total Space" +http://festivalofthespokennerd.libsyn.com/rss "Podcast" "~Podcast: A Podcast of Unnecessary Details" +http://aproblemsquared.libsyn.com/rss "Podcast" "~Podcast: A Problem Squared" # #---Youtube---# # https://www.youtube.com/feeds/videos.xml?channel_id=UCtI0Hodo5o5dUb67FeUjDeA "Youtube" "~Youtube: SpaceX" diff --git a/.config/nvim/UltiSnips/rnoweb.snippets b/.config/nvim/UltiSnips/rnoweb.snippets @@ -1,122 +0,0 @@ -snippet begin "Begin/End Environments" -\begin{${1:element}} -${2:contents} -\end{$1} - -endsnippet - -snippet v "Import R variable in LaTeX" -\Sexpr{${1:var}} -endsnippet - -snippet eqn "Floating Equation" -\begin{eqfloat}[H] -\begin{align} - ${3:E} &= ${4:mc^2} -\end{align} -cond$5 -\label{eqn:${2:title}} -\caption{${1:A Title}} -\end{eqfloat} - -endsnippet - -snippet x "Multiplication Dot" -\cdot -endsnippet - -snippet e "Scientific Notation" -\cdot10^{${1:power}} -endsnippet - -snippet cond "Conditions for Equations" -\begin{conditions} - ${1:V} & ${2:Definition of V} -\end{conditions} -endsnippet - -snippet R "R Code" -<<label='${1:label}',echo=${2:FALSE},results='${3:asis}'>>= -${4:1+1} -@ -endsnippet - -snippet csv "Import CSV in R" -${1:variable_vame} <- read.csv("${2:path/to/file}.csv", -header=${3:TRUE}, -sep="${4:;}" -) - -endsnippet - -snippet xtable "Table made from R matrix" -print( - xtable(${1:matrix_name}, - caption="${2:Title of the table}", - label="tab:${3:table}", - digits=matrix($6 - c( -`!p -from time import sleep -try: - col = int(t[3])-1 - paragraph = "" - for i in range(int(t[4])-1): - paragraph += " rep(0,"+str(col)+"), <++>,\n" - paragraph += " rep(0,"+str(col)+"), <++>" - snip.rv = paragraph -except(ValueError): - sleep(1) -# paragraph = "" -# paragraph = " rep(0,"+t[3]+"), 0,\n" -# for i in range(int(t[4])-2): -# paragraph += " rep(0,"+t[3]+"), <++>,\n" -# paragraph += " rep(0,"+t[3]+"), <++>" -# snip.rv = paragraph -` - ), - nrow=${5:6}, - ncol=${4:3}, - byrow=TRUE - ), - table.placement="H" - ), - include.rownames=FALSE, - table.placement="H" -) - -endsnippet - -snippet img "Image" -\begin{figure}[H] -\begin{center} -\includegraphics[scale=${1:1}]{${2:path/to/image}} -\label{fig:${3/\s/_/g}} -\caption{${3:A Title}} -\end{center} -\end{figure} -endsnippet - -snippet b "Bold" -\textbf{${1:text}} -endsnippet - -snippet i "Italix" -\textit{${1:text}} -endsnippet - -snippet u "Underline" -\uline{${1:text}} -endsnippet - -snippet 1 "Section" -\section{${1:Title}} -endsnippet - -snippet 2 "Subsection" -\subsection{${1:Title}} -endsnippet - -snippet 3 "Subsubsection" -\subsubsection{${1:Title}} -endsnippet diff --git a/.config/nvim/ftplugin/csv.vim b/.config/nvim/ftplugin/csv.vim diff --git a/.config/nvim/ftplugin/go.vim b/.config/nvim/ftplugin/go.vim @@ -0,0 +1,17 @@ +" Go deoplete +let g:deoplete#sources#go#gocode_binary = '$GOPATH/bin/gocode' +" GoRun Split Reuse +function! ReuseVimGoTerm(cmd) abort + for w in nvim_list_wins() + if "goterm" == nvim_buf_get_option(nvim_win_get_buf(w), 'filetype') + call nvim_win_close(w, v:true) + break + endif + endfor + execute a:cmd +endfunction +let g:go_term_enabled = 1 +let g:go_term_mode = "silent keepalt rightbelow 35 vsplit" +let g:go_def_reuse_buffer = 1 +autocmd FileType go nmap <leader>r :call ReuseVimGoTerm('GoRun')<Return> + diff --git a/.config/nvim/ftplugin/python.vim b/.config/nvim/ftplugin/python.vim diff --git a/.config/nvim/ftplugin/r.vim b/.config/nvim/ftplugin/r.vim @@ -0,0 +1,4 @@ +" Nvim-R +let R_rconsole_width = 0 +let R_openpdf = 0 + diff --git a/.config/nvim/ftplugin/rmd.vim b/.config/nvim/ftplugin/rmd.vim @@ -0,0 +1,6 @@ +" Nvim-R +let R_rconsole_width = 0 +let R_openpdf = 0 +au BufWritePost *.rmd silent! :call RWeave("nobib", 1, 1) +au VimLeave *.rmd !texclear % + diff --git a/.config/nvim/ftplugin/rnoweb.vim b/.config/nvim/ftplugin/rnoweb.vim @@ -0,0 +1,8 @@ +autocmd BufEnter * :UltiSnipsAddFiletypes tex.r + +" Nvim-R +let R_rconsole_width = 0 +let R_openpdf = 0 +au BufWritePost *.rnw, silent! :call RWeave("nobib", 1, 1) +au VimLeave *.rnw !texclear % + diff --git a/.config/nvim/ftplugin/tex.vim b/.config/nvim/ftplugin/tex.vim diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim @@ -6,6 +6,8 @@ " \_/ |_|_| |_| |_|_| \___| " " + + " #---Plug Installer---# " if empty(glob('~/.vim/autoload/plug.vim')) silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs @@ -43,8 +45,6 @@ Plug 'kiteco/vim-plugin' Plug 'stevearc/vim-arduino' " Vim org tables Plug 'dhruvasagar/vim-table-mode' -" Html linter enabler (for prettier AUR package) -Plug 'dense-analysis/ale' " Vim css hex highlight Plug 'chrisbra/Colorizer' " Bracket Completion @@ -89,10 +89,6 @@ Plug 'lervag/vimtex' " Plug 'ludovicchabant/vim-gutentags' " C developement in vim Plug 'vim-scripts/c.vim' -" NERDTree -Plug 'scrooloose/nerdtree' -" Git plugin for NERDTree -Plug 'Xuyuanp/nerdtree-git-plugin' " Icons in NERDTree and Airline Plug 'ryanoasis/vim-devicons' " lightline @@ -146,11 +142,6 @@ set wrap set linebreak " #---Plugin Preferences---# " -" Nvim-R -let R_rconsole_width = 0 -let R_openpdf = 0 -au BufWritePost *.rmd,*.rnw, silent! :call RWeave("nobib", 1, 1) -au VimLeave *.rmd,*.rnw,*.tex !texclear % " Emmet Expansion let g:user_emmet_leader_key=',' " Enable kite autocompletion @@ -158,12 +149,9 @@ let g:user_emmet_leader_key=',' " MarkdownPreview " let g:mkdp_browser = 'surf' " Bracey -let g:bracey_browser_command = "chromium" +let g:bracey_browser_command = "firefox" " Grammalecte path let g:grammalecte_cli_py = "/usr/bin/grammalecte-cli" -" Ale Linter with prettier -let g:ale_linters_explicit = 1 -" autocmd BufWrite, *.css,*.html,*.js :ALEFix prettier " Ultisnips " Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe. let g:UltiSnipsExpandTrigger="<Tab>" @@ -173,24 +161,8 @@ let g:ale_linters_explicit = 1 let g:UltiSnipsEditSplit="vertical" " Snippet directory let g:UltiSnipsSnippetDirectories=[$HOME.'/.config/nvim/UltiSnips'] -" Go deoplete -let g:deoplete#sources#go#gocode_binary = '$GOPATH/bin/gocode' " Hexokinase let g:Hexokinase_highlighters = ['virtual'] -" GoRun Split Reuse -function! ReuseVimGoTerm(cmd) abort - for w in nvim_list_wins() - if "goterm" == nvim_buf_get_option(nvim_win_get_buf(w), 'filetype') - call nvim_win_close(w, v:true) - break - endif - endfor - execute a:cmd -endfunction -let g:go_term_enabled = 1 -let g:go_term_mode = "silent keepalt rightbelow 35 vsplit" -let g:go_def_reuse_buffer = 1 -autocmd FileType go nmap <leader>r :call ReuseVimGoTerm('GoRun')<Return> " Vimtex pdf viewer let g:vimtex_view_general_viewer = 'open' let g:vimtex_view_general_options = '-a zathura' @@ -237,7 +209,7 @@ command RcTitle .!figlet -s -f big " Easily escape terminal mode tnoremap <Esc> <C-\><C-n> " Pressing shift semicolon was too long: -nnoremap <Space> : +nmap <Space> <Leader> " Fastest :w in the west nnoremap <leader>w :w<CR> " #---Visual Enhancements---# " @@ -250,11 +222,6 @@ let g:lightline = { \ 'colorscheme': 'friffle', \ } set noshowmode -" Vim-go breakpoints and debug -nnoremap mp :GoDebugBreakpoint<CR> -nnoremap mn :GoDebugNext<CR> -nnoremap ms :GoDebugStart<CR> -nnoremap mq :GoDebugStop<CR> " #---Ease Of Use---# " " Normal/relative number toggle @@ -268,18 +235,6 @@ augroup END autocmd BufWritePre * %s/\s\+$//e " Soft Tabs filetype plugin indent on -" NERDTRee Hotkey map -map <C-n> :NERDTreeToggle<CR> - let NERDTreeDirArrowExpandable="|" - let NERDTreeDirArrowCollapsible="-" -" Close vim if the only window left open is a NERDTree -autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif -" Other NERDTree Preferences -let NERDTreeMinimalUI = 1 -let NERDTreeDirArrows = 1 -let NERDTreeShowBookmarks=1 -let NERDTreeAutoDeleteBuffer = 1 -let NERDTreeQuitOnOpen = 1 " Nvim-R send line nmap <C-Enter> <leader>l " Nvim folding diff --git a/.config/vifm/vifmrc b/.config/vifm/vifmrc @@ -286,7 +286,7 @@ nnoremap mkd :mkdir<space> set classify=' :dir:/, :exe:, :reg:, :link:' " various file names set classify+=' ::../::, ::*.sh::, ::*.[hc]pp::, ::*.[hc]::, ::/^copying|license$/::, ::.git/,,*.git/::, ::*.epub,,*.fb2,,*.djvu::, ::*.pdf::, ::*.htm,,*.html,,**.[sx]html,,*.xml::' -set classify+=' ::*.go::, ::*.vim,,vimrc::, ::*.tex,,*.aux,,*.toc,,*.rnw,,*.rmd::, ::*.js::, ::*.css::, ::*.log,,*.db::, ::*.py,,*.pyc,,*.pyd,,*.pyo::, ::*.md::, ::*.json::, ::*.vcf::, ::*.rss::' +set classify+=' ::*.go::, ::*.vim,,vimrc::, ::*.tex,,*.aux,,*.toc,,*.rnw,,*.rmd::, ::*.js::, ::*.css::, ::*.log,,*.db::, ::*.py,,*.pyc,,*.pyd,,*.pyo::, ::*.md::, ::*.json::, ::*.vcf::, ::*.rss::' " archives set classify+=' ::*.7z,,*.ace,,*.arj,,*.bz2,,*.cpio,,*.deb,,*.dz,,*.gz,,*.jar,,*.lzh,,*.lzma,,*.rar,,*.rpm,,*.rz,,*.tar,,*.taz,,*.tb2,,*.tbz,,*.tbz2,,*.tgz,,*.tlz,,*.trz,,*.txz,,*.tz,,*.tz2,,*.xz,,*.z,,*.zip,,*.zoo::' " images