1# Introduction
2
3## Configuration
4
5By default, PMS tries to read your configuration from
6`$HOME/.config/pms/pms.conf`.
7If you defined paths in either `$XDG_CONFIG_DIRS` or `$XDG_CONFIG_HOME`, PMS will look for `pms.conf` there.
8
9```
10# Sample PMS configuration file.
11# All whitespace, newlines, and text after a hash sign will be ignored.
12
13# The 'center' option will make sure the cursor is always centered on screen.
14set center
15
16# Some custom keyboard bindings.
17bind <Alt-Left> cursor prevOf year    # jump to previous year.
18bind <Alt-Right> cursor nextOf year   # jump to next year.
19
20# Pink statusbar.
21style statusbar black darkmagenta
22
23# Minimalistic topbar.
24set topbar="Now playing: ${tag|artist} \\- ${tag|title} (${elapsed})"
25```
26
27See the [default configuration](/options/defaults.go).
28
29
30## Basic movement
31
32The default bindings for movement are similar to vim.
33
34`j` and `k` move down and up,
35`gt` and `gT` (or just `t` and `T`) move forward and back between lists.
36Use `<Ctrl-F>` and `<Ctrl-B>` to move a page down or up,
37or `<Ctrl-D>` and `<Ctrl-U`> for half a page at a time.
38`gg` and `G` go to the very top and bottom of the list,
39while `H`, `M`, and `L` go to the top, middle, and bottom of the current viewport.
40
41You can also move quickly from album to album using `b` and `e`,
42which are examples of [`cursor prevOf` and `cursor nextOf` commands](commands.md#move-the-cursor-and-viewport).
43
44
45## Adding tracks to the playlist
46
47A highlighted track (or selection of tracks) can be added to the current list with `a`,
48or added and played with `<Enter>`.
49(When the current playlist is focused, `<Enter>` will just play, rather than also adding a duplicate.)
50
51`x`, meanwhile, will delete the highlighted track from the list.
52
53
54## Searching for tracks
55
56PMS employs a very fast and powerful search engine called _Bleve_.
57The following is an example on how to do a search in PMS:
58
59To start a search, type `/` (or `:inputmode search`).
60The tracklist will be cleared, and a slash will appear in the statusline.
61Type at least two characters to start searching.
62The tracklist will update itself as you type.
63
64Search results will be sorted by match score.
65If you want to sort your search result, press `<Ctrl-S>` (or type `:sort`) to sort by the default sort parameters.
66
67To drill down into the search, highlight a song,
68then press `<Ctrl-J>` (or type `:isolate artist`) to show all tracks with the same artist,
69or `<Ctrl-T>` (`:isolate albumartist album`) to show all tracks in the same album.
70
71To select tracks, type `m` (`:select toggle`) to mark one at a time,
72or use the visual selection by typing `v` (`:select visual`).
73You could also type `&` (`:select nearby albumartist album`) to select the entire album.
74Press `a` (`:add`) to add the selected songs to the queue,
75or `<Enter>` (`:play selection`) to play them immediately.
76
77
78## Known issues
79
80If having connection problems, you might be hitting a buffer limit in MPD.
81It may help to configure your MPD server according to [configuring PMS and MPD](mpd.md).
82