diff --git a/GIT.md b/GIT.md index c5ce395..78ef336 100755 --- a/GIT.md +++ b/GIT.md @@ -22,7 +22,6 @@ modified: '2021-12-14T21:13:05.655Z' git reset -- path/to/folder git checkout -- path/to/folder ``` - ### List all branches * local: `git branch` * remote: `git branch -r` @@ -30,6 +29,12 @@ git checkout -- path/to/folder You can also add `-v` flag to increase verbosity to get more details about listed branches. +### Delete local branch + +```bash +git branch --delete +``` + ### Switch to remote branch that is not on local computer `git switch ` diff --git a/emacs.md b/emacs.md new file mode 100644 index 0000000..45584b5 --- /dev/null +++ b/emacs.md @@ -0,0 +1,12 @@ +# Emacs + +## Basics +`alt x` - show available commands +`space .` - show file search +`ctrl/space + w + v` - virtual split +`ctrl/space + w + w`- switch to next vsplit +`ctrl/space + w + c` - close virutal split +`space + b + k` - kill buffer +`space + b + b` - display opened buffers +`space + h + r + r` - `doom.d/init.el` reload plugins +`space + f + r` seaarch through reacently opened files diff --git a/tmux.md b/tmux.md index f0450f4..8c40f03 100755 --- a/tmux.md +++ b/tmux.md @@ -25,5 +25,38 @@ modified: '2021-12-05T22:46:14.308Z' - `ctrl+b !` - convert pane into a window - `ctrl+b x` - kill current pane + +### Tms written in rust (https://github.com/jrmoulton/tmux-sessionizer) +Very useful for fuzzy finding git projects in your filesystem. + +```bash + tms config --paths /home//Documents/ +```` + +then just run tms and fuzzy find your project. The tms will +then create a new session for you and also activate venv if you have +it configured. Which is awesome. + ## Rename pane :) `ctrl+b ,` + + +## Multiple ssh servers ? +no problem + +```bash +#!/bin/bash + +ssh_list=( user1@server1 user2@server2 ... ) + +split_list=() +for ssh_entry in "${ssh_list[@]:1}"; do + split_list+=( split-pane ssh "$ssh_entry" ';' ) +done + +tmux new-session ssh "${ssh_list[0]}" ';' \ + "${split_list[@]}" \ + select-layout tiled ';' \ + set-option -w synchronize-panes +``` +[source](https://unix.stackexchange.com/a/533673)