I am back to Neovim, see kar9222/nvim. Although I still use some of the stuffs here (e.g. REPL, theme), this repo won't be updated. But feel free to use them.
My minimalist setup for theme & some of my productivity tools for
- VSCode
- Vim via VSCode Neovim
- Tmux
- R REPL {radian}
- R REPL terminal output {colorout}
- Julia REPL
- {theme} for R packages: {ggplot2}, {plotly}, {shiny}, {rmarkdown}, {ggdist}, {ggdag}, etc
Minimalistic style. All colors are chosen & hand tuned manually with love
- Dark background
- 3 light colors: matching colors and good contrast for plots
- Dark colors for everything else e.g. comments, operators, brackets, quotes
- Consistent styles for everything mentioned above
Syntax highlighting styles
- Focus on keywords with minimal visual noise
- Customized for R, Julia, Vimscript, etc
NOTE
- Some of these files (e.g. .Rprofile, startup.jl) only work together with VSCode's theme
- I setup all these mainly for my personal use, hence may contain specific customizations and 'hacks'
- Feel free to pick what you want
Image as above. See minimalist-vscode
Install customize-ui and copy this and in settings.json
Theme
{
"vscode_custom_css.policy": true,
"vscode_custom_css.imports": ["/path/to/vscode.css"],
}
Install Custom CSS and JS Loader
Theme
{
// Sample only. Use any size you want.
"customizeUI.listRowHeight": 28, // optionally, try 29
"customizeUI.fontSizeMap": {
"13px": "16px",
"12px": "16px",
},
}
See My {colorout}
NOTE
- This section contains very hacky ways of editing the source files. Use at your own risks.
- TODO Pull requests or rebase the repo, etc
- Some of them are TODO and the hacks can be avoided
git clone [email protected]:kar9222/minimalist.git && cd minimalist
minimalist=`pwd`
Theme
# NOTE Manually alias your VSCode extensions directory e.g.
$vsc=~/.vscode/extensions
vsc_r=$(ls --color=never $vsc | grep ikuyadeu.r)
ln -sf vscode_r/r.json $vsc/$vsc_r/syntax/r.json
Theme & productivity tools. NOTE I pin the {radian} version at pip install -I radian==0.4.7
FZF + R history search
Call [FZF](https://github.com/junegunn/fzf) for interactive R history search. Great for single-line history search and can be used together with native {radian} REPL's `ctrl+r` multi-line history search.
- Put this in e.g.
~/bin/r_history
thenchmod +x ~/bin/r_history
- Call FZF in Tmux for running this script
~/bin/r_history
#! /bin/bash
# R history: Remove duplicates, commented lines, blank lines, starting `+` symbol
# NOTE the location of your ~/.radian_history. Should be the default.
tac ~/.radian_history | \
awk '!a[$0]++' | \
sed -e '/^#/d ; /^$/d ; s/^+//g' | \
fzf --exact --no-sort
~/.tmux.conf
bind -n MY_KEYBINDING run " \
tmux split-window -p 75 \
'tmux send -t #{pane_id} \
\"$(~/bin/r_history)\"' \
"
Autocompletion: Type some character, press right arrow
or other keybindings for completion. NOTE In the GIF below, I use alt+l
key autocompletion keybindings.
Theme: See image above and in your ~/.radian_profile, simply put options(radian.color_scheme = "monokai")
.
Autocomplete & theme
# R REPL {radian} --------------------------------
repl=./radian
radian_proj=$repl/radian
latest_conda=/opt/$(ls --color=never /opt | grep miniconda | tail -1)
latest_py=$(ls --color=never $latest_conda/lib | grep python | tail -1)
site_packages=$latest_conda/lib/$latest_py/site-packages
# {radian}
# TODO Use customer lexer
radian=$site_packages/radian
sudo ln -sf $radian_proj/lexer.py $radian/lexer.py
sudo ln -sf $radian_proj/completion.py $radian/completion.py
sudo ln -sf $radian_proj/session.py $radian/session.py
# {pygments}
# TODO https://pbelmans.ncag.info/blog/2011/03/06/how-to-change-pygments-styles-and-a-university-of-antwerp-style/
# https://stackoverflow.com/questions/25368222/pygments-style-not-found
# https://github.com/pbelmans/ua-pygments-style
sudo ln -sf $repl/pygments/styles/monokai.py $site_packages/pygments/styles/monokai.py
# {prompt_toolkit}
sudo ln -sf $repl/prompt_toolkit/styles/defaults.py $site_packages/lineedit/deps/prompt_toolkit/styles/defaults.py
{theme} for R packages: {ggplot2}, {plotly}, {shiny}, {rmarkdown}, {ggdist}, {ggdag}, etc.
See {theme}
See Custom {skimr} summary stats
Theme for Julia REPL. See image above and startup.jl
Theme for {vim-sneak} & {vim-easymotion}. See image above and init.vim
{vim-easymotion}
{vim-sneak}
Theme for status bar, pane, window and search bar. See image above and .tmux.conf
Update README for
- FZF + ripgrep setup in VSCode
- FZF + fd setup in VSCode