Skip to content

Tools / Preference for my development workflow

Notifications You must be signed in to change notification settings

Springok/dotfiles

Repository files navigation

dotfiles

  • Tools / Preference for my development workflow
  • Tmux x Neovim x Zsh
  • Script for quick development environment restore

🔧Installation / ⚙Preference / 🙋‍♀️🙋 FAQ / ⌨️Commands / 🧰 Tools / 📚Great Resources

🔧Installation

install zsh first, and set zsh as your default shell

chsh -s /bin/zsh

then run:

git clone git@github.com:Springok/dotfiles.git ~/dotfiles

Mac OS

~/dotfiles/install/mac_os.zsh

Linux (Ubuntu)

~/dotfiles/install/linux.zsh

Things ain’t automated in setup script

  • [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 use xterm-256color in tmux.conf)

    • sudo /usr/bin/tic -x ./tmux-256color.src
  • Install fonts

⚙Preference

General

  • disable homebrew auto update
  • enable vim mode in command line

Zsh - .zimrc / .zshrc

  • zmodule setup in .zimrc
  • aliases / ENV setup in .zshrc / .zshenv (for run commands in vim)

Tmux - tmux.conf

  • remap prefix key to `

NeoVim - init.vim

  • remap mapleader to ,
  • ale-linters will need dependencies
    • clj-kondo
    • rubocop

Git - tigrc

tigrc(5) · Tig - Text-mode interface for Git

Ruby - default - gems / pryrc

  • 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 development
    • change-password
    • at => whereami
    • ep => exit-program

Clojure - deps.edn

FAQ

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, and wscript is my private project, which is not ready to be public now, feel free remove these aliases, likewise vim-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, invoke stow in the ~/dotfiles , will put these configs to the parent of current folder, which is home directory ~ .

Commands

(TODO)

Navigation

  • seamless moves in tmux / vim
    • ctrl + h,j, k, l
  • tmux
    • window - prefix key + <space> , prefix key + <number>
    • pane - ctrl + h,j, k, l
  • vim
    • h, j, k, l
    • window - ctrl + j, k
    • buffer - <tab>, <S-tab>
    • file explorer (nerdtree / nvimtree)
      • toggle tree - ,dd
    • 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 _
  • shell
    • directory - cd, j

Command Lines(cli) / Aliases

  • .vimrc / tmux.conf / .zshrc
  • zsh history - ctrl + r
  • git - gfm, gc, gs

Cheatsheet

🧰Tools

Zsh

Z shell - Wikipedia

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.

Zim

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

Neovim

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.

Tmux

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

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

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 gvmnvmrbenv & pyenv (and more) all in one! Simply install your language's plugin!

fzf

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

BurntSushi/ripgrep: ripgrep recursively searches directories for a regex pattern while respecting your gitignore

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.

bat

sharkdp/bat: A cat(1) clone with wings.

cat(1) clone with syntax highlighting and Git integration.

zoxide

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

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

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


tig

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.

diff-so-fancy

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.

diff-highlight(archived)

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.


htop

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.

gnu-sed / gnu-time

We will need gsed / gtime in some scripts of our projects

📚Great Resources

General

Vim / Neovim

Tmux

Ruby

Clojure

About

Tools / Preference for my development workflow

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published