From 4b3e2af6b8be625b12f229c27d49f2e13129fee9 Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Thu, 1 Sep 2016 00:46:45 +0300 Subject: [PATCH] add yank/delete/paste to tutorial Mentioned in #13. --- doc/tutorial.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/tutorial.md b/doc/tutorial.md index 71035a3..a9d06bc 100644 --- a/doc/tutorial.md +++ b/doc/tutorial.md @@ -46,6 +46,14 @@ An explicit `:` could be provided to group statements until a `\n` occurs. This is especially useful for `map` and `cmd` commands. If you need multiline you can wrap statements in `{{` and `}}` after the proper prefix. +## Yank/Delete/Paste + +`lf` uses the underlying `cp` and `mv` shell commands for file operations. +For this purpose, when you `yank` (i.e. copy) a file, it doesn't actually copy the file on the disk, but only records its name to memory. +The actual file operation takes place when you do the `paste` in which case the `cp` command is used. +Similarly the `mv` command is used for `delete` (i.e. cut or kill) followed by `paste`. +These traditional names (e.g. `yank` and `delete`) are picked instead of the other common convention (e.g. copy and cut) to resemble the default keybinds for these operations. + ## Custom Commands To wrap up let us write a shell command to move selected file(s) to trash.