From bf0abe3a2ab4405f7171c5edbbe366738dac83f7 Mon Sep 17 00:00:00 2001 From: Marvin Preuss Date: Tue, 23 Aug 2022 15:46:16 +0200 Subject: [PATCH] first commit --- README.md | 19 +++++++++++++++++++ git/clone-to-worktree.md | 17 +++++++++++++++++ ...ug-what-code-set-last-filetype-settings.md | 3 +++ neovim/netrw.md | 19 +++++++++++++++++++ 4 files changed, 58 insertions(+) create mode 100644 README.md create mode 100644 git/clone-to-worktree.md create mode 100644 neovim/debug-what-code-set-last-filetype-settings.md create mode 100644 neovim/netrw.md 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