commit bf0abe3a2ab4405f7171c5edbbe366738dac83f7 Author: Marvin Preuss Date: Tue Aug 23 15:46:16 2022 +0200 first commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..5ec0b15 --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +# til + +_Inspired by [jbranchaud/til](https://github.com/jbranchaud/til)_ + +## Categories + +- [git](./git/) +- [neovim](./neovim/) + +--- + +### git + +- [clone to worktree](./git/clone-to-worktree.md) + +### neovim + +- [debug what code set last filetype settings](./neovim/debug-what-code-set-last-filetype-settings.md) +- [netrw](./neovim/netrw.md) diff --git a/git/clone-to-worktree.md b/git/clone-to-worktree.md new file mode 100644 index 0000000..0562abd --- /dev/null +++ b/git/clone-to-worktree.md @@ -0,0 +1,17 @@ +# Clone to worktree + +Git branches is like an antipattern. +Its best to use `git worktree` to have already checked out git branches. + +## Cloning + + git clone https://git.xsfx.dev/xsteadfastx/til.git til/main + +This will create the directory `til` and clones the branch `main` into it. + +## Create new worktree + + cd til/main + git worktree add ../foo main + +This will create the worktree `foo` in `til/foo`. diff --git a/neovim/debug-what-code-set-last-filetype-settings.md b/neovim/debug-what-code-set-last-filetype-settings.md new file mode 100644 index 0000000..3971cbd --- /dev/null +++ b/neovim/debug-what-code-set-last-filetype-settings.md @@ -0,0 +1,3 @@ +# Debug what code set last filetype settings + + :verbose set ft diff --git a/neovim/netrw.md b/neovim/netrw.md new file mode 100644 index 0000000..2c42705 --- /dev/null +++ b/neovim/netrw.md @@ -0,0 +1,19 @@ +# netrw + +`netrw` is a simple file and directory browser for vim. + +## Opening netrw + + :Explore + +## Create file + + % + +## Create directory + + d + +## Remove directory or file + + D