Updated a tmux readme
parent
7c96bc5314
commit
c5a3dc0728
7
GIT.md
7
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 <branch_name>
|
||||
```
|
||||
|
||||
### Switch to remote branch that is not on local computer
|
||||
|
||||
`git switch <branch_name>`
|
||||
|
|
|
@ -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
33
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/<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)
|
||||
|
|
Loading…
Reference in New Issue