1# User guide
2
3Welcome to _Visp_, a Vi-like Spotify client for the terminal.
4
5First off, Visp is not a _player_ and does not output any sound. To actually play back
6music, you need a dedicated program such as either the official Spotify client, or some
7other playback-capable software such as [spotifyd](https://github.com/Spotifyd/spotifyd).
8This program needs to be running and connected to Spotify so that Visp can recognize it.
9
10To authorize Visp to your Spotify account, please visit https://visp.site/authorize
11to get an access token. Enter your access token with `:auth <TOKEN>`.
12
13Visp is based around the concept of _lists_. Every view in Visp is a list of some kind.
14Upon starting the program, you are shown the _log console_, which keeps track of things
15that happen within the program. Other lists contain playlists, albums, or tracks.
16
17To get an overview of all the lists you've visited while running Visp, press `w`.
18
19To enter a command, type `:` followed by the command, then press `<Enter>`. While entering
20a command, you can press `<Tab>` to engage tab completion, which will complete the word
21you're typing, provided that Visp can guess what you're trying to do. Tab completion in
22Visp is very powerful and can recognize pretty much anything you want to accomplish.
23See [command documentation](commands.md) for a list of all supported commands.
24
25Press `<F1>`, or enter the command `show keybindings`, at any time to show a
26list of key bindings.
27
28
29## Basic movement
30
31The default bindings for movement are similar to Vim.
32
33`j` and `k` (or `<Down>` and `<Up>` and move down and up,
34`gt` and `gT` (or just `t` and `T`) move forward and back between lists.
35Use `<Ctrl-F>` and `<Ctrl-B>` to move a page down or up,
36or `<Ctrl-D>` and `<Ctrl-U`> for half a page at a time.
37`gg` and `G` go to the very top and bottom of the list,
38while `H`, `M`, and `L` go to the top, middle, and bottom of the current viewport.
39
40
41## Find and play music
42
43Your Spotify library can be accessed by pressing `c`.
44Navigate to any entry and press `<Enter>` to load that list from Spotify.
45A list from Spotify contain playlists, albums, tracks, or special items
46such as playback devices.
47
48Type `/` to start a new search. Type in your search query, followed by `<Enter>`.
49A new tracklist will appear with search results.
50
51Once in a _playlist view_, select a playlist and press `<Enter>` to load it into Visp.
52A new window will be created in _tracklist view_, showing all the tracks in that playlist.
53
54When you are in a tracklist view, press `<Enter>` on any track to start playing
55from that track. Press `a` to add the track to the queue instead of playing right away.
56
57Press `o` to like or unlike the currently playing track.
58
59Select up to five tracks and type `R` to have Spotify recommend similar tracks.
60
61To see all the tracks you've played while running Visp, type `<Ctrl-W>h`.
62
63
64## Select multiple tracks
65
66Press `m` to select a single track. The track will be highlighted in blue. To unselect the track,
67move the cursor over it and press `m` again.
68
69Pressing `v` or `V` starts _visual mode_, which starts a selection from the cursor position.
70Move up or down to extend the selection. Press `v` or `V` again to exit visual mode. Any tracks
71selected through visual mode will be unselected. To permanently select the tracks instead, press
72`m` instead of exiting through `v` or `V`.
73
74`<Ctrl-A>` selects all tracks, while `<Ctrl-C>` unselects all tracks.
75
76
77## Cut, copy, paste
78
79Press `x` to cut, `y` to copy, and `p` to paste. `P` pastes
80_before_ the cursor, while `p` pastes _after_ the cursor.
81
82Anything you copy or cut will be placed in a new _clipboard_. Press `C` to view all clipboards
83created in your Visp session. A clipboard acts like a track list.
84
85
86## Make or change a playlist
87
88Press `<Ctrl-W>c` to create a new playlist.
89This playlist exists entirely in Visp and is not saved to Spotify yet.
90
91To rename a playlist, enter the command `rename` followed by a playlist name.
92
93Add tracks by copying and pasting them from either a search result or another tracklist.
94
95To save a playlist to Spotify, enter the command `write` (or `w`) optionally followed by a playlist name.
96If entered without a name, `write` will save changes to an existing playlist. If you provide a name,
97a new playlist is created instead. The `write` command can be used from any track list or search result.
98
99
100## Advanced navigation
101
102Sort any list by pressing `<Ctrl-S>` (default sort order), or optionally by entering the command `sort`
103followed by a space-delimited list of sort keys.
104Sort terms are ordered by most significant field last.
105
106Press `<Ctrl-J>` (or type `:isolate artist`) to search for tracks with the same artist,
107or `<Ctrl-T>` (`:isolate albumartist album`) to search for tracks in the same album.
108
109Press `&` (`:select nearby albumartist album`) to select an entire album.
110
111Type `b` or `e` to move to the previous or next album in a tracklist.
112
113
114## Configuration
115
116By default, Visp tries to read your configuration from
117`$HOME/.config/visp/visp.conf`.
118If you defined paths in either `$XDG_CONFIG_DIRS` or `$XDG_CONFIG_HOME`, Visp will look for `visp.conf` there.
119
120```
121# Sample Visp configuration file.
122# All whitespace, newlines, and text after a hash sign will be ignored.
123
124# The 'center' option will make sure the cursor is always centered on screen.
125set center
126
127# Some custom keyboard bindings.
128bind <Alt-Left> cursor prevOf year    # jump to previous year.
129bind <Alt-Right> cursor nextOf year   # jump to next year.
130
131# Pink statusbar.
132style statusbar black darkmagenta
133
134# Minimalistic topbar.
135set topbar="Now playing: ${tag|artist} \\- ${tag|title} (${elapsed})"
136```
137
138See also [default configuration](../options/options.go).
139