Giter Site home page Giter Site logo

dotfiles's Introduction

Dotfiles

ZSH, TMUX, and Vim.

Installation

Once the repo is cloned, execute the deploy script:

# install nvim, tmux, oh my zsh, node , 
bash ./isntall.sh (sh might not work)
# install plugins managers and dotfiles
./deploy
# tmux plugins install with TMUX_PREFIX+I 
# install https://github.com/so-fancy/diff-so-fancy manual

language server

Coc set up config with :CocConfig, py example:

  • pyright as linter
{
  "pyright.enable": true,
  "python.linting.enabled": true,
  "python.formatting.provider": "black",
  "python.pythonPath": "/home/merklinm/.virtualenvs/seg/bin/python",
  "python.analysis.typeCheckingMode": "off"
}

Update zsh plugins

zinit update
# if comint error occurs run compint
zinit cclear

This script guides you through the following:

  1. Checks to see if you have zsh, tmux, and vim installed.
  2. Installs it using your default package manager if you don't have it installed.
  3. Checks to see if your default shell is zsh.
  4. Sets zsh to your default shell.
  5. Backs up your old configuration files.

Pretty convenient for configuring new servers.

Basic runtime opperations

All default dotfiles (.zshrc, .vimrc, etc) source something within the dotfiles repository. This helps separate changes that are synced across all your machines with system specific changes.

Upon launching a new shell, the first thing that's evaulated is zshrc_manager.sh. This script first launches tmux. Then once zsh logs in, within tmux, it updates the dotfiles repository, and sources the changes.

  • cd has been reassigned to cd and ls. Every time you navigate to a new directory, it will display the contents of that directory.
  • v has been aliased too: vim -p. This let's you open multiple files in vim as tabs.

Keybindings (tmux and zshrc)

Key Stroke What It Does
TMUX_PREFIX+I Install plugins
TMUX_PREFIX+U update plugins
TMUX_PREFIX+f fpp file picker
TMUX_PREFIX+r realaod tmux config
Ctrl-hjkl panel navigation
Ctrl-HJKL panel resize
Ctrl-g terminal text commit -a
Ctrl-p terminal text commit -a and push
Ctrl-v fzf search and open file
Ctrl-V Runs fc. Takes last command and puts it in a vim buffer.
Ctrl-S Add's sudo to the beginning of the buffer.
Ctrl-o cd ..
Ctrl-O open finder
Ctrl-t fzf pick file
Alt-c fzf cd to dir

git

git diff print better installed with zinit and configure with: diff-so-fancy

Plugins

  • zsh-autosuggestions: Searches your history while you type and provides suggestions.
  • zsh-syntax-highlighting: Provides fish style syntax highlighting for zsh.
  • ohmyzsh: Borrowed things like tab completion, fixing ls, tmux's vi-mode plugin.
  • vimode-zsh allows you to hit esc and navigate the current buffer using vim movement keys.

Prompt

The prompt takes on the form:

[plugin, plugin, ...]: 

Each plugin is sensitive to where you are and what you're doing, they reveal themselves when it's contextually relevant. Plugins include:

  • PWD plugin: always present, tells you where you are. Always the first plugin.
  • Status code plugin: appears anytime a program returns with a non-zero status code. Tells you what status code the program completed with.
  • Git plugin: appears when you're in a git repository. Tells you what branch you're on, and how many files have been changed since the last commit.
  • Sudo plugin: tells you when you can sudo without a password. Or when you're logged in as root.
  • REMOVED Time plugin: appears when a program took more than 1s to execute. Tells you how long it took to execute.
  • REMOVED PID plugin: appears when you background a task. Tells you what the PID of the task is.

ssh key note

file ~/.ssh/config example how to config ssh keys

Host github.com
HostName github.com
IdentityFile ~/.ssh/github_id_ras
User git

Host gitlab.com
HostName gitlab.com
IdentityFile ~/.ssh/gitlab_id_rsa
User git

ssh keys example

update ~/.ssh/config

Host github.com
HostName github.com
IdentityFile ~/.ssh/github_id_ras
User git

Host gitlab.com
HostName gitlab.com
IdentityFile ~/.ssh/gitlab_id_rsa
User git

Issues

dotfiles's People

Contributors

0xdead-c0de avatar joncolella avatar krishma-bawa avatar markus-bbnv avatar parth avatar redheadm avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.