Introduction
Central to Hike's user interface is a command line; similar to a shell's command line. It has a history (use the up and down keys to navigate) as well as history auto-completion (use right to accept a suggestion).
Tip
Full help for all of the commands is available inside Hike itself by pressing F1 while the command line has focus.
The commands
Opening a file
There are three different ways to open a file for viewing, from the command line; they are:
With a file name
To open a local file, type in the name (including the path to it if it's not in the current working directory).
With a URL
To open a file that is hosted on a website, type in the URL:
Via a file opening dialog
To open a file opening dialog at a specific directory, type in the directory you want to start browsing at:
and after you get Enter the dialog will open:
Navigation panel
There are some commands that interact with the navigation panel. These are:
bookmarks
Aliases
b
bm
Ensures that the navigation panel is opened and then jumps to the bookmarks.
conents
Aliases
c
toc
Ensures that the navigation panel is opened and then jumps to the Markdown document's table of contents.
history
Aliases
h
Ensures that the navigation panel is opened and then jumps to the document history.
local
Aliases
l
Ensures that the navigation panel is opened and then jumps to the local file system browser.
Viewing files on forges
Hike supports quickly viewing Markdown documents hosted on popular forges, the available commands are:
Forge commands
bitbucket
Alias
bb
Loads and views a file hosted on Bitbucket.
codeberg
Alias
cb
Loads and views a file hosted on Codeberg.
github
Alias
gh
Loads and views a file hosted on GitHub.
gitlab
Alias
gl
Loads and views a file hosted on GitLab.
Specifying the file to view
When using the forge commands listed above, a number of methods of specifying the file to view are supported:
Format | Effect |
---|---|
<owner>/<repo> |
Open README.md from a repository |
<owner> <repo> |
Open README.md from a repository |
<owner>/<repo> <file> |
Open a specific file from a repository |
<owner> <repo> <file> |
Open a specific file from a repository |
<owner>/<repo>:<branch> |
Open README.md from a specific branch of a repository |
<owner> <repo>:<branch> |
Open README.md from a specific branch of a repository |
<owner>/<repo>:<branch> <file> |
Open a specific file from a specific branch of a repository |
<owner> <repo>:<branch> <file> |
Open a specific file from a specific branch of a repository |
So, for example, if you want to view Hike's README:
gh davep/hike
Or if you want to view Hike's change-log:
gh davep/hike ChangeLog.md
If you wanted to view the README file but in a feature branch called revamp-readme
:
gh davep/hike:revamp-readme
etc.
Other commands
Other useful commands include:
chdir <dir>
Aliases
cd
, dir
, ls
Where <dir>
is the path to a directory. This will change the root
directory of the tree in the local file system browser in the navigation
panel.
changelog
Aliases
cl
Loads and views Hike's ChangeLog.
help
Aliases
?
Shows Hike's help dialog.
obsidian
Aliases
obs
Changes the root directory of the tree in the local file system browser in the navigation panel so that it points to the root directory of your Obsidian vaults (obviously only useful if you are an Obsidian user).
readme
Loads and views Hike's README.