Updated a tmux readme

main
Gasper Spagnolo 2022-12-17 17:49:03 -05:00
parent 7c96bc5314
commit c5a3dc0728
3 changed files with 51 additions and 1 deletions

7
GIT.md
View File

@ -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 <branch_name>
```
### Switch to remote branch that is not on local computer
`git switch <branch_name>`

12
emacs.md Normal file
View File

@ -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

33
tmux.md
View File

@ -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/<user>/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)