Skip to content

Commit

Permalink
Merge pull request #475 from knqti/website-overview-tutorial
Browse files Browse the repository at this point in the history
Revise website's overview and tutorial pages
  • Loading branch information
yorukot authored Nov 21, 2024
2 parents deac975 + 1c9f72a commit 3d47d9c
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 69 deletions.
135 changes: 67 additions & 68 deletions website/src/content/docs/getting-started/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,146 +6,145 @@ head:
content: Tutorial | superfile
---

This tutorial will help you learn to use superfile step by step.
This tutorial will teach you how to use superfile step by step.

:::caution
If you didn't install superfile yet please [click here](/getting-started/installation) to install.
If you haven't installed superfile yet, please [click here](./installation.md).
:::

:::tip
If you just want to know about Hotkey without so much supplementary content, please go to [here](/list/hotkey-list)
A full list of hotkeys are available [here](../list/hotkey-list.md)
:::

## Hotkeys tutorial
First, if you want to open `superfile` by opening a terminal and typing `spf`.

Afterwards if you want to exit just press `q` or `esc`.
Let's start by running superfile! Open a terminal, type `spf` and press `enter`.

To exit, press `q` or `esc`.

![demo](https://github.com/yorukot/superfile/assets/107802416/ddd9f05c-b39b-4f55-838b-d248c845a589)

### Navigation
You can put focus on the sidebar by pressing `s`.
### Panel navigation

Press `p` to focus the processbar.
Once superfile is running, it displays five panels:

Press `m` to focus on metadata.
- sidebar
- file
- processes
- metadata
- clipboard

:::tip
The size of the folder will only be obtained when you focus on metadata.
The file panel is the focused view by default. You can change focus onto three other panels.

If you want to get more detailed metadata, you can install the metadata plugin.
:::
If you want to return to the file panel, just press again to remove focus.
Press `s` to focus on the sidebar.

![demo](https://github.com/yorukot/superfile/assets/107802416/ec7062ce-1884-4395-b68b-e0546c8a02de)
Press `p` to focus on the processes.

### File panel navigation
Now you might be thinking that a file panel is not enough.
Press `m` to focus on the metadata.

Therefore, you can press `n` to create a new file panel and `w` to close the file panel.
To return focus back onto the file panel, press the same hotkey again.

Now you know how to create and close file panels.
You can also press `f` to show or hide the preview window.

But how to switch to the next or previous file panel?

You can press `tab` or `L` (shift+l) to move to the next file panel.
![demo](https://github.com/yorukot/superfile/assets/107802416/ec7062ce-1884-4395-b68b-e0546c8a02de)

Then press `shift+left` or `H` (shift+h) to move to the previous file panel.
:::tip
The size of the folder will only be shown when you focus on the metadata.

![demo](https://github.com/yorukot/superfile/assets/107802416/2c2a7632-c5c0-43b6-80a7-d6e21fcf63b1)
For more detailed metadata, [click here](../configure/enable-plugin.md) to install the metadata plugin.
:::

### File panel movement
To create more file panels, press `n`. Press `w` to close the focused file panel.

Now let us introduce how to operate the File panel
To move through multiple file panels, press `tab` or `L` (shift+l). To move to the previous panel, press `shift`+`left` or `H` (shift+h).

First of all, if you don’t want to see dotfiles, you can press `.` which will hide all dotfiles
![demo](https://github.com/yorukot/superfile/assets/107802416/2c2a7632-c5c0-43b6-80a7-d6e21fcf63b1)

Then if you think you will use this folder frequently, you can also put it on the sidebar, just press `P` to pin or unpin
### Panel movement

When you focus on the file panel you can press `up` or `k` to up
press `down` or `j` to down
superfile provides multiple hotkeys to move through directories. The angle bracket cursor `>` tells you where you are.

After navigation to the file or folder you want, you can press `enter` or `l` to confirm. The file will be opened using your default Application (if not, there will be no response) and the folder will be entered.
While focused on the file panel, move the cursor up with `up` or `k` and down with `down` or `j`.

Press `h` or `backspace` will return to the parent directory.
After navigating to the your file/folder, press `enter` or `l` to confirm your selection. Files are opened with your default application (if none set, there will be no response) and folders are opened for viewing. Press `h` or `backspace` to return to the parent directory.

Pressing `o` will bring up a menu to choose how you would like the panel to sort the files. You can choose between `Name`, `Size`, or `Date Modified`. `enter` to select, and `esc`, `o`, or `ctrl+c` to cancel.
![demo](https://github.com/yorukot/superfile/assets/107802416/f6fd9e4e-f73f-4848-a113-416732abf126)

To reverse the order of the sort, press `R` (`shift+r`)
Folders can be pinned to the sidebar panel. Navigate to and open your folder. Press `P` (shift+p) to pin or unpin it.

If you have a large number of files, you can also use `/` to search,After entering the Key you want, you can press `/` again or `enter`
Press `o` to bring up the sort options menu. You can sort by:
- `Name`
- `Size`
- `Date Modified`

If you want to clear the current search, you can press `ctrl+c` or `esc`
Press `enter` to confirm your sort option. Press `esc`, `o`, or `ctrl`+`c` to cancel. To reverse the order of the sort, press `R` (shift+r).

![demo](https://github.com/yorukot/superfile/assets/107802416/f6fd9e4e-f73f-4848-a113-416732abf126)
Press `/` to bring up the search bar. Type the name (you may need to first delete the `/` if it auto-populates). superfile searches in the current directory and dynamically displays the results. To exit the search bar, press `ctrl`+`c` or `esc`.

### File selection mode movement
Press `.` to show or hide dotfiles.

You might be thinking what is selection mode?
#### Selection mode

That's really easy!This mode is similar to Vim's Visual.But select file or folder instead of code.
Use selection mode for bulk operations. If you are familiar with Vim, selection mode is similar to Vim's [visual mode](https://vimhelp.org/visual.txt.html#Visual).

After selecting, you will be able to perform [file operations](#file-operations) on all selected files or folders.
Press `v` to toggle between selection mode and normal (browser) mode.

First to enter this mode you can press `v`. To return to browse mode the same is done by pressing `v`
Once in selection mode, you can perform [file operations](#file-operations) on all selected files/folders. [Panel movement](#panel-movement) hotkeys also work in selection mode.

:::tip
The following operations can only be performed in Select mode,You can see the current mode in the lower right corner of the file panel
The following operations can only be performed while in selection mode. Your current mode is displayed in the lower-right corner of the file panel (Select or Browser).
:::

After entering you can use the same shortcut as [file panel movement](#file-panel-movement) to move.

Now you may have moved to the file or folder you want to select. You can press `enter` or `L` (shift+l) to select and press again to deselect.
To make selections, navigate to your file/folder and press `enter` or `L` (shift+l). Press the same key again to deselect.

But this will be a bit slow when you want to select a large number of files
This may become tedious when you have a large number of items. Instead, you can press `shift`+`up` or `K` (shift+k) to select everything above the cursor. Press `shift`+`down` or `J` (shift+j) to select everything below the cursor.

So here are some faster ways

You can press `shift+up` or `K` (shift+k) to select all files or folders passed by the cursor when it goes up.

Of course, the same is true for `shift+down` or `J` (shift+j)

You can also press `A` to select all folders in the current directory
You can also press `A` (shift+a) to select everything in the current directory.

![demo](https://github.com/yorukot/superfile/assets/107802416/4306fd31-04e0-456c-b1f2-3923e8d932e1)

### File operations

:::note
Only copy, cut and delete can be used in selection mode
Only copy, cut and delete can be used in selection mode.
:::

You have learned how to use superfile to browse files and select files. Let's learn how to perform file operations!
Now let's learn how to perform file operations.

First, let me teach you how to create a file. You can press `ctrl+n` to create a file or folder, if you want to create folder you need add `/` in the end.
Create a new file with `ctrl`+`n`. Type your new file's name and press `enter`. To create a new folder, add `/` to the end of the name.

Then if you want to rename it, press `ctrl+r` and it will name the location of your cursor.
:::tip
You can create a directory, subdirectory and file in one string. For example:

If you want to copy, you can press `ctrl+c` and the copied file list will be displayed in the clipboard (lower right corner).
`directory/subdirectory/filename`
:::

If you want to cut, press `ctrl+x`.
To rename, point your cursor at a file/folder and press `ctrl`+`r`.

:::tip
The copy here will actually be copied to the clipboard of your system.
:::
To copy, you can press `ctrl`+`c`.

To cut, you can press `ctrl`+`x`.

Both cut and copied items are shown in the clipboard panel (lower-right corner). The progress of your operations is displayed in the processes panel (lower-left corner).

Your copy process will be displayed in the processbar (lower left corner).
To delete, you can press `ctrl`+`d`

You can press `ctrl+d` to delete file (The deletion here is not direct deletion but will be placed in the trash can.). But when you use an external hard drive, it will be deleted directly.
:::note
The deletion here is not direct deletion, but will be placed in the trash can. However, when you use an external hard drive, it will be deleted directly.
:::

If you want to decompress or compress you can press `ctrl+a` to compress and `ctrl+e` to decompress.
To compress, press `ctrl`+`a`. To decompress, press `ctrl`+`e`.

To open a file with an editor, press `e`.

To open the current directory with an editor, press `E`.
To open the current directory with an editor, press `E` (shift+e).

To change the default editor, you can set the `EDITOR` environment variable in your terminal. For example:

```bash
EDITOR=nvim
```


This will set Neovim as your default editor. After setting this, the specified editor will be used when opening files with the `e` or `E` key bindings.

:::caution
Expand Down
2 changes: 1 addition & 1 deletion website/src/content/docs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ head:
![](https://github.com/yorukot/superfile/blob/main/asset/demo.png?raw=true)

# What is superfile?
Superfile is a modern terminal file manager crafted with a strong focus on user interface, functionality, and ease of use. Built with [Go](https://go.dev/) and [Bubble Tea](https://github.com/charmbracelet/bubbletea), it combines a visually appealing design with the simplicity of terminal tools, providing a fresh, accessible approach to file management.
superfile is a modern terminal file manager crafted with a strong focus on user interface, functionality, and ease of use. Built with [Go](https://go.dev/) and [Bubble Tea](https://github.com/charmbracelet/bubbletea), it combines a visually appealing design with the simplicity of terminal tools, providing a fresh, accessible approach to file management.

# Why was superfile built?
Before creating superfile, I tried a lot of terminal file managers, but I was often disappointed by their UI design. So, I built superfile with a primary focus on delivering a refined, user-friendly interface.
Expand Down

0 comments on commit 3d47d9c

Please sign in to comment.