- Tools / Preference for my development workflow
- Tmux x Neovim x Zsh
- Script for quick development environment restore
🔧Installation / ⚙Preference / 🙋♀️🙋 FAQ / ⌨️Commands / 🧰 Tools / 📚Great Resources
install zsh
first, and set zsh
as your default shell
chsh -s /bin/zsh
then run:
git clone [email protected]:Springok/dotfiles.git ~/dotfiles
~/dotfiles/install/mac_os.zsh
~/dotfiles/install/linux.zsh
-
[Important!] Use your own email / username in
~/.config/git/user_config
-
Install tmux plugins
prefix key + I
after running setup script
-
install
tmux-color256
(or you can usexterm-256color
intmux.conf
)sudo /usr/bin/tic -x ./tmux-256color.src
-
Install fonts
brew tap homebrew/cask-fonts
brew install --cask font-hack-nerd-font
- https://www.nerdfonts.com/
- disable homebrew auto update
- enable vim mode in command line
- zmodule setup in
.zimrc
- aliases / ENV setup in
.zshrc
/.zshenv
(for run commands in vim)
- remap prefix key to
`
- remap mapleader to
,
- ale-linters will need dependencies
clj-kondo
rubocop
tigrc(5) · Tig - Text-mode interface for Git
- disable gem doc install to save time
- will install gems after Ruby installed (trigger by asdf Ruby plugin)
- bundler, to manage Ruby dependencies
- pry, a better irb
- awesome_print, a better printer in pry
- mailcatcher, for email testing
.pryrc
have several commands / remap for project developmentchange-password
at
=>whereami
ep
=>exit-program
I saw the proj
folder in some aliases mappings in .zshrc
, what is it?
~/proj
is my personal preference to store the projects from work, life, it is not configurable at the moment, sorry about that.
I saw the vm
/ wscript
folders in some aliases mappings in .zshrc
, what are they?
vm
is a private project, own by our team, it contains many helpers related to our main project, andwscript
is my private project, which is not ready to be public now, feel free remove these aliases, likewisevim-abagile.git
is our private project too, feel free remove it from the list of vim plugins.
Do I have to clone the dotfiles
repository to the home directory(~
)?
Yep, because I use
stow
as the softlink manager, and most of these configs, should be putted in the home directory, by default, invokestow
in the~/dotfiles
, will put these configs to the parent of current folder, which is home directory~
.
(TODO)
- seamless moves in tmux / vim
ctrl
+h
,j
,k
,l
- tmux
- window - prefix key +
<space>
, prefix key +<number>
- pane -
ctrl
+h
,j
,k
,l
- window - prefix key +
- vim
h
,j
,k
,l
- window -
ctrl
+j
,k
- buffer -
<tab>
,<S-tab>
- file explorer (nerdtree / nvimtree)
- toggle tree -
,dd
- toggle tree -
- jump to a file -
ctrl + p
- within a line -
H
,L
- within a buffer -
gg
,G
,{
,}
,<number>
+j
,k
- in the Rails project
- relative, alternative files -
:R
:A
- controller, models, ... -
:Econtroller _
- relative, alternative files -
- shell
- directory -
cd
,j
- directory -
.vimrc
/tmux.conf
/.zshrc
- zsh history -
ctrl + r
- git -
gfm
,gc
,gs
- Tmux - Tmux Cheat Sheet & Quick Reference
- Clojure - vim-sexp cheatsheet
The Z shell (Zsh) is a Unix shell that can be used as an interactive login shell and as a command interpreter for shell scripting. Zsh is an extended Bourne shell with many improvements, including some features of Bash, ksh, and tcsh.
zimfw/zimfw: Zim: Modular, customizable, and blazing fast Zsh framework
Zim is a Zsh configuration framework that bundles a plugin manager, useful modules, and a wide variety of themes, without compromising on speed.
Neovim is a refactor, and sometimes redactor, in the tradition of Vim (which itself derives from Stevie). It is not a rewrite but a continuation and extension of Vim. Many clones and derivatives exist, some very clever—but none are Vim. Neovim is built for users who want the good parts of Vim, and more.
Getting Started · tmux/tmux Wiki
tmux is a program which runs in a terminal and allows multiple other terminal programs to be run inside it. Each program inside tmux gets its own terminal managed by tmux, which can be accessed from the single terminal where tmux is running - this called multiplexing and tmux is a terminal multiplexer.
Stow - GNU Project - Free Software Foundation Documentation (Stow)
GNU Stow is a symlink farm manager which takes distinct packages of software and/or data located in separate directories on the filesystem, and makes them appear to be installed in the same place. For example,
/usr/local/bin
could contain symlinks to files within/usr/local/stow/emacs/bin
,/usr/local/stow/perl/bin
etc., and likewise recursively for any other subdirectories such as.../share
,.../man
, and so on.
asdf-vm/asdf: Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more
asdf is a CLI tool that can manage multiple language runtime versions on a per-project basis. It is like
gvm
,nvm
,rbenv
&pyenv
(and more) all in one! Simply install your language's plugin!
junegunn/fzf: A command-line fuzzy finder
fzf is a general-purpose command-line fuzzy finder. It's an interactive Unix filter for command-line that can be used with any list; files, command history, processes, hostnames, bookmarks, git commits, etc.
ripgrep is a line-oriented search tool that recursively searches the current directory for a regex pattern. By default, ripgrep will respect gitignore rules and automatically skip hidden files/directories and binary files. ripgrep is similar to other popular search tools like The Silver Searcher, ack and grep.
sharkdp/bat: A cat(1) clone with wings.
A cat(1) clone with syntax highlighting and Git integration.
ajeetdsouza/zoxide: A smarter cd command. Supports all major shells.
zoxide is a smarter cd command, inspired by z and autojump. It remembers which directories you use most frequently, so you can "jump" to them in just a few keystrokes.
exa · a modern replacement for ls
exa is an improved file lister with more features and better defaults. It uses colours to distinguish file types and metadata. It knows about symlinks, extended attributes, and Git. And it’s small, fast, and just one single binary.
Wget - GNU Project - Free Software Foundation
GNU Wget is a free software package for retrieving files using HTTP, HTTPS, FTP and FTPS, the most widely used Internet protocols. It is a non-interactive commandline tool, so it may easily be called from scripts,
cron
jobs, terminals without X-Windows support, etc.
- httpie/httpie: As easy as /aitch-tee-tee-pie/ 🥧 Modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more
- HTTPie 3.2.1 (latest) docs
> Its goal is to make CLI interaction with web services as human-friendly as possible. HTTPie is designed for testing, debugging, and generally interacting with APIs & HTTP servers. The
http
&https
commands allow for creating and sending arbitrary HTTP requests. They use simple and natural syntax and provide formatted and colorized output.
Introduction · Tig - Text-mode interface for Git
Tig is an ncurses-based text-mode interface for git. It functions mainly as a Git repository browser, but can also assist in staging changes for commit at chunk level and act as a pager for output from various Git commands.
so-fancy/diff-so-fancy: Good-lookin' diffs. Actually… nah… The best-lookin' diffs.🎉
diff-so-fancy
strives to make your diffs human readable instead of machine readable. This helps improve code quality and helps you spot defects faster.
git and diff-highlight | michaelheap.com
diff-highlight is a contrib script that ships with git. It's a better way to visualise a diff when the changes are small words, not entire lines/paragraphs.
a cross-platform interactive process viewer. It is a text-mode application (for console or X terminals) and requires ncurses.
htop
allows scrolling the list of processes vertically and horizontally to see their full command lines and related information like memory and CPU consumption. Also system wide information, like load average or swap usage, is shown.
We will need gsed / gtime in some scripts of our projects
- Dotfiles – What is a Dotfile and How to Create it in Mac and Linux
- 15 Command Line Tools which Spark Joy in Your Terminal - jmfayard.dev
- Managing dotfiles with GNU Stow | Bastian Venthur's Blog