{"id":29774635,"url":"https://github.com/lingjie00/cli_settings","last_synced_at":"2026-02-15T21:01:53.454Z","repository":{"id":41388500,"uuid":"367079976","full_name":"lingjie00/cli_settings","owner":"lingjie00","description":"storing the dotfiles I use","archived":false,"fork":false,"pushed_at":"2025-04-05T08:31:37.000Z","size":389,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-11T12:39:03.906Z","etag":null,"topics":["dotfiles","neovim","tmux","vim","zsh"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lingjie00.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-05-13T14:47:12.000Z","updated_at":"2025-04-05T08:31:40.000Z","dependencies_parsed_at":"2023-11-10T14:12:18.137Z","dependency_job_id":"10f11360-da7b-40a2-a3d1-0164d6e617be","html_url":"https://github.com/lingjie00/cli_settings","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/lingjie00/cli_settings","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingjie00%2Fcli_settings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingjie00%2Fcli_settings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingjie00%2Fcli_settings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingjie00%2Fcli_settings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lingjie00","download_url":"https://codeload.github.com/lingjie00/cli_settings/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingjie00%2Fcli_settings/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29489330,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T19:29:10.908Z","status":"ssl_error","status_checked_at":"2026-02-15T19:29:10.419Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotfiles","neovim","tmux","vim","zsh"],"created_at":"2025-07-27T08:08:53.518Z","updated_at":"2026-02-15T21:01:53.421Z","avatar_url":"https://github.com/lingjie00.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Table of Contents\n\n\u003c!-- vim-markdown-toc GFM --\u003e\n\n* [CLI settings](#cli-settings)\n* [Setup](#setup)\n    * [symbolic links](#symbolic-links)\n    * [Python and R workflow](#python-and-r-workflow)\n* [Config](#config)\n    * [Neovim](#neovim)\n    * [Fish shell](#fish-shell)\n    * [miniconda, and fixes](#miniconda-and-fixes)\n    * [Tmux](#tmux)\n    * [Yabai](#yabai)\n* [Saving SSH settings](#saving-ssh-settings)\n    * [Add SSH host](#add-ssh-host)\n    * [Add private key](#add-private-key)\n* [Common commands](#common-commands)\n\n\u003c!-- vim-markdown-toc --\u003e\n\n# CLI settings\n\nThis repo stores the following CLI settings I use:\n\n1. Neovim (text editor)\n2. fish shell\n3. Tmux\n4. Yabai (window management for macOS)\n\n# Setup\n\n## symbolic links\n\nFor a new machine, all the configs done can be done by git\nclone and symbolic linking the files.\n\n```bash\n# git clone\ngit clone https://github.com/lingjie00/cli_settings .dotfiles\n\n# symbolic link\n./install\n```\n\n## Python and R workflow\n\nI use Neovim for script editing.\nTherefore, there is no specific configurations for script \nfiles (.py and .R)\n\nHowever, there are occasions visualizations or\nexperimentation are required. In these cases, a notebook\nstyle of editing is preferred.\n\nFor Python, I use Jupyter notebook. Jupyter notebook runs a\nlocal host at port (default) 8888, which I forward to local\nmachine using SSH.\n\nFor R, if you install the GUI RStudio then it is very\ntroublesome to forward the GUI using X11. The simple\nsolution would be to install\n[Rstudio server](https://www.rstudio.com/products/rstudio/download-server/)\nwhich will work similarity as Jupyter Lab.\n\n# Config\n\n## Neovim\n\nI have switched from Vim to Neovim to display\nerrors inline and to have some Neovim specific\nPlugins, including Neovim built-in LSPs.\n\nI started switching to Vim and full terminal based\nworkflow from May 2021. In Nov 2021 I have managed\nto switch to nearly 100% of my workflow to\nVim/Neovim. I use\n[ Vimium ]( https://chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb?hl=en )\nfor browsing. The only time I will still need my\nmouse is to navigate PDF documents.\n\nFor data science related work, I use [ Jupytext ]( https://github.com/mwouts/jupytext )\nwhich sync between Jupyter\nnotebook and Python script, balances\nthe need to experiment with data in notebooks and\nhaving the best practice in software development.\n\nRead more about Neovim from their [ official\npage ]( https://neovim.io/ )\n\n## Fish shell\n\nI have transit from Bash to Zsh to fish shell now.\nFish shell is much more responsive than zsh.\n\nSince most of my workflow is in Neovim and Tmux\nnow, the most usage for terminal will be to prompt\nfiles and commands.\n\n## miniconda, and fixes\n\nI use miniconda for my local Python environment\nhandling. \nMiniconda is a light-weight version of the full\nconda installation.\n\nJust beware, if you are upgrading from bash to zsh after installing conda, you might lose the settings.\nLuckily, the fix is easy thanks to [this](https://stackoverflow.com/questions/40370467/anaconda-not-found-in-zsh)\n\n```\n/(your conda installation path)/bin/conda init zsh\n```\n\n## Tmux\n\n[Tmux](https://github.com/tmux/tmux) is a\n\"terminal multiplexer\". The biggest benefit of\nTmux is the ability to launch multiple terminals\nwithin a single screen. I usually split my screen\ninto 1) Neovim 2) Script Terminal (Python, R) 3)\nchecking files (with `ls`) and launch another\nwindow within Tmux to launch jupyter server.\n\nI use a home server to perform heavy-duty work.\nUsing Tmux allows me to perform my workflow with a\nsingle SSH and allows me to continue my work after\nresuming server back from sleep.\n\n## Yabai\n\nUnlike Linux which has a decent window management\nsystem. MacOS's default window management is\nconfusing with windows popping everywhere. I use\n[yabai](https://github.com/koekeishiya/yabai) to\ncontrol my spaces.\n\n# Saving SSH settings\n\nIf you use SSH frequently, then perhaps you also\nface the problem of constantly needing to enter the IP\naddress and password for the server. There are ways to\nsimplify the workflow\n\n\n## Add SSH host\n\nAdd in `~/.ssh/config`\n\n```\nHost example_host\n    User name\n    HostName 111.111.111.111\n    IdentityFile ~/.ssh/host.pub\n    Port 22\n```\n\n## Add private key\n\n1. Generate SSH key in host\n\n```\nssh-keygen\n```\n\n2. Copy key to server\n\nRemember to copy the SSH over with e.g. `scp`\n\n```\nssh-copy-id -i ~./ssh/host.pub user@host\n```\n\n# Common commands\n\nThere are some common commands in (n)Vim for different file types\n\nNote:\n\n- for bigger projects a MakeFile is recommended\n- `%:p` display the file path\n- `%:p:h` displays the folder path file is in\n\n```bash\n#########\n# LaTex #\n#########\n# generate output\npdflatex -output-directory '%:p:h'  '%:p'\n# clear temp files\nrm '%:p:r.aux' '%:p:r.log' '%:p:r.out'\n\n#####\n# R #\n#####\n# R: run the current script\nRscript '%:p'\n# Rmd: compile the Rmd file\nRscript -e \"rmarkdown::render('%:p')\"\n\n############\n# MarkDown #\n############\n# compile to pdf using pandoc\npandoc '%:p' -o '%:p:r.pdf'\n\n##########\n# Python #\n##########\n# run the current script\npython3 '%:p'\n# run jupyter ascending sync (a bit buggy now)\npython3 -m jupyter_ascending.requests.sync --filename '%:p'\n\n#######\n# C++ #\n#######\n# compile\ng++ '%' -o '%:r'\n\n########\n# Json #\n########\n# reformat json files with python json.tool\npython -m json.tool\n\n########\n# Java #\n########\n# compile\njavac %\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flingjie00%2Fcli_settings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flingjie00%2Fcli_settings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flingjie00%2Fcli_settings/lists"}