Commands#
In vimiv all keybindings are mapped to commands.
Most of the commands can also be run from the command line but some are hidden
as they are not useful to run by hand. A typical example is the :command
command which enters the command line.
Every command is limited to its mode. This allows commands with equal names to
do different things depending on the mode they are run in. For example the
:zoom
command rescales the image in image
mode but changes the size of
thumbnails in thumbnail
mode. This also prevents running commands that are
useless in the current mode. Commands available in the special global
mode
can be run in image
, library
and thumbnail
mode.
Below is a complete list of all commands in every mode.
Global#
Command |
Description |
---|---|
Add an alias for a command. |
|
Bind keys to a command. |
|
Enter command mode. |
|
Copy currently selected image to system clipboard. |
|
Copy name of current path to system clipboard. |
|
Move one or more images to the trash directory. |
|
Enter another mode. |
|
Toggle fullscreen mode. |
|
Show help on a command or setting. |
|
Clear the command history. |
|
Show a pop-up with keybindings information. |
|
Log a message with the corresponding log level. |
|
Mark one or more paths. |
|
Clear all marks. |
|
Rename marked images with a common base. |
|
Restore the last cleared marks. |
|
Select next image. |
|
Do nothing. |
|
Open one or more paths. |
|
Paste path from clipboard to open command. |
|
Select previous image. |
|
Print text to the terminal. |
|
Quit vimiv. |
|
Rename images with a common base. |
|
Repeat the last command. |
|
Scale the image. |
|
Start a search. |
|
Continue search to the next match. |
|
Continue search to the previous match. |
|
Set an option. |
|
Sleep for a given number of seconds. |
|
Spawn a command in a sub-shell. |
|
Delete an existing tag. |
|
Load images from a tag into the current mark list. |
|
Open images from a tag in image mode. |
|
Write marked paths to a tag. |
|
Toggle one mode. |
|
Unbind a keybinding. |
|
Restore a file from the trash directory. |
|
Show a pop-up with version information. |
|
Show a pop-up with a welcome message for users coming from gtk. |
alias#
Add an alias for a command.
syntax: :alias name command [--mode=MODE]
The command can be a vimiv command like quit
or an external shell
command like !gimp
.
- positional arguments:
name
: Name of the newly defined alias.command
: Name of the command to alias.
- optional arguments:
--mode
: Mode in which the alias is valid. Default:global
.
bind#
Bind keys to a command.
syntax: :bind keybinding command [--mode=MODE]
- positional arguments:
keybinding
: The keys to bind.command
: The command to execute with optional arguments.
- optional arguments:
--mode
: The mode to bind the keybinding in. Default: current.
command#
Enter command mode.
syntax: :command [--text=TEXT]
- optional arguments:
--text
: String to append to the:
prefix.
copy-image#
Copy currently selected image to system clipboard.
syntax: :copy-image [--primary] [--width=WIDTH] [--height=HEIGHT]
[--size=SIZE]
- optional arguments:
--primary
: Copy to primary selection.--width
: Scale width to the specified value.--height
: Scale height to the specified value.--size
: Scale longer side to the specified value.
count: Equivalent to the --size
option
copy-name#
Copy name of current path to system clipboard.
syntax: :copy-name [--abspath] [--primary]
- optional arguments:
--abspath
: Copy absolute path instead of basename.--primary
: Copy to primary selection.
delete#
Move one or more images to the trash directory.
syntax: :delete path [path ...]
- positional arguments:
paths
: The path(s) to the images to delete.
- optional arguments:
--ask
: Prompt for confirmation before deleting the images.
Note
This only deletes images, not any other path(s).
enter#
Enter another mode.
syntax: :enter mode
- positional arguments:
mode
: The mode to enter (image/library/thumbnail/manipulate).
fullscreen#
Toggle fullscreen mode.
help#
Show help on a command or setting.
syntax: :help topic
- positional arguments:
topic
: Either a valid :command or a valid setting name.
Hint
For commands help :command
is the same as command -h
.
history-clear#
Clear the command history.
This clears the history of all modes unless --mode
is passed.
syntax: :history-clear [--mode]
- optional arguments:
--mode
: Clear the history of the current mode only.
keybindings#
Show a pop-up with keybindings information.
syntax: :keybindings [--columns=N]
- optional arguments:
--columns
: Number of columns to split the bindings in.
log#
Log a message with the corresponding log level.
syntax: :log level message
- positional arguments:
level
: Log level of the message (debug, info, warning, error, critical).message
: Message to log.
mark#
Mark one or more paths.
syntax: :mark path [path ...] [--action=ACTION]
Hint
:mark %
marks the current path.
- positional arguments:
paths
: The path(s) to mark.
- optional arguments:
--action
: One of toggle/mark/unmark. Toggle, the default, inverses the mark status of the path(s). Mark forces marking while unmark forces removing the mark.
mark-clear#
Clear all marks.
Hint
It is possible to restore the last cleared marks using mark-restore
.
mark-rename#
Rename marked images with a common base.
syntax: :mark-rename base [--start=INDEX] [--separator=SEPARATOR]
[--overwrite] [--skip-image-check]
- Example::
:mark-rename my_mark
would rename all marked images tomy_mark_001
,my_mark_002
, …,my_mark_NNN
.- positional arguments:
paths
: The path(s) to rename.base
: Base name to use for numbering.
- optional arguments:
--start
: Index to start numbering with. Default: 1.--separator
: Separator between base and numbers. Default: ‘_’.--overwrite
: Overwrite existing paths when renaming.--skip-image-check
: Do not check if all renamed paths are images.
mark-restore#
Restore the last cleared marks.
next#
Select next image.
syntax: :next [--keep-zoom]
- optional arguments:
--keep-zoom
: Keep zoom level and scroll position of the current image.
count: multiplier
nop#
Do nothing.
This is useful to remove keys bound by Qt by explicitly binding them to nop.
open#
Open one or more paths.
syntax: :open path [path ...]
If any path given is an image, all valid images are opened in image mode. Otherwise the first valid directory is opened. If both fails, an error is displayed.
Hint
Passing a single directory therefore changes the directory in the library,
think cd
.
- positional arguments:
paths
: The path(s) to open.
paste-name#
Paste path from clipboard to open command.
syntax: :paste-name [--primary]
- optional arguments:
--primary
: Paste from primary selection.
prev#
Select previous image.
syntax: :prev [--keep-zoom]
- optional arguments:
--keep-zoom
: Keep zoom level and scroll position of the current image.
count: multiplier
print-stdout#
Print text to the terminal.
syntax: :print-stdout text [--sep] [--end]
- positional arguments:
text
: List of strings to concatenate and print
- optional arguments:
--sep
: String inserted between list element, default is new line.--end
: String appended after last element, default is new line.
quit#
Quit vimiv.
rename#
Rename images with a common base.
syntax: :rename path [path ...] base [--start=INDEX] [--separator=SEPARATOR]
[--overwrite] [--skip-image-check]
- Example::
:rename %f identifier
would rename all images in the filelist toidentifier_001
,identifier_002
, …,identifier_NNN
.- positional arguments:
paths
: The path(s) to rename.base
: Base name to use for numbering.
- optional arguments:
--start
: Index to start numbering with. Default: 1.--separator
: Separator between base and numbers. Default: ‘_’.--overwrite
: Overwrite existing paths when renaming.--skip-image-check
: Do not check if all renamed paths are images.
repeat-command#
Repeat the last command.
count: Repeat count times.
scale#
Scale the image.
syntax: :scale [--level=LEVEL]
count: If level is a float, multiply by count.
- optional arguments:
--level
: The level to scale the image to.
Hint
supported levels:
fit: Fit image to current viewport.
fit-width: Fit image width to current viewport.
fit-height: Fit image height to current viewport.
overzoom: Like fit but limit to the overzoom setting.
float: Set scale to arbitrary decimal value.
search#
Start a search.
syntax: :search [--reverse]
- optional arguments:
--reverse
: Search in reverse direction.
search-next#
Continue search to the next match.
syntax: :search-next
count: multiplier
search-prev#
Continue search to the previous match.
syntax: :search-next
count: multiplier
set#
Set an option.
syntax: :set name[!] [[+|-]value]
- positional arguments:
name
: Name of the setting to set. Append a!
to toggle the value of boolean settings.value
: Value to set the setting to. Prepend with+
/-
to increment/decrement the value of numerical settings. If not given, set to default.
sleep#
Sleep for a given number of seconds.
syntax: :sleep duration
- positional arguments:
duration
: The number of seconds to sleep.
spawn#
Spawn a command in a sub-shell.
syntax: :spawn command [--shell=shell --shellarg=shellarg]
- positional arguments:
command
: Full command with arguments to pass to the shell.
- optional arguments:
--shell
: The program to use as sub-shell. Default:sh
.--shellarg
: Argument to prepend for the shell. Default:-c
.
The difference to running commands with ! is that an actual shell is involved instead of running the program directly. This means that shell, redirection etc. will work in spawn, but not with !. Nevertheless ! is recommended in general for performance and security reasons.
tag-delete#
Delete an existing tag.
syntax: :tag-delete name
Warning
If you pass a tag group directory, the complete tree is deleted.
- positional arguments:
name
: Name of the tag to delete.
tag-load#
Load images from a tag into the current mark list.
syntax: tag-load name
Hint
You can open all marked images with :open %m
.
- positional arguments:
name
: Name of the tag to load.
tag-open#
Open images from a tag in image mode.
syntax: tag-open name
Hint
This is equivalent to :tag-load name && open %m
.
- positional arguments:
name
: Name of the tag to open.
tag-write#
Write marked paths to a tag.
syntax: :tag-write name
This writes all currently marked images to this tag. This allows storing a
selection of marked images under a name and re-loading them in later sessions
using :tag-load name
. If the tag file exists, all marked paths that are not
in the tag are appended to it.
Hint
It is possible to group tags into directories by dividing the name into a
directory tree, e.g. :tag-write favourites/2017
.
- positional arguments:
name
: Name of the tag to create.
toggle#
Toggle one mode.
syntax: :toggle mode
.
If the mode is currently visible, leave it. Otherwise enter it.
- positional arguments:
mode
: The mode to toggle (image/library/thumbnail/manipulate).
unbind#
Unbind a keybinding.
syntax: :unbind keybinding [--mode=MODE]
- positional arguments:
keybinding
: The keybinding to unbind.
- optional arguments:
--mode
: The mode to unbind the keybinding in. Default: current.
undelete#
Restore a file from the trash directory.
syntax: :undelete [basename ...]
If no basename is given, the last deleted images in this session are restored.
- positional arguments:
basenames
: The basename(s) of the file in the trash directory.
version#
Show a pop-up with version information.
syntax: :version [--copy]
- optional arguments:
--copy
: Copy version information to clipboard instead.
welcome-to-qt#
Show a pop-up with a welcome message for users coming from gtk.
Image#
Command |
Description |
---|---|
Center the image in the viewport. |
|
Display a widget to crop the current image. |
|
Flip the image. |
|
Select specific image in current filelist. |
|
Toggle between play and pause of animation. |
|
Reload the current image. |
|
Rescale the original image to a new size. |
|
Resize the original image to a new size. |
|
Rotate the image. |
|
Scroll the image in the given direction. |
|
Scroll the image to one edge. |
|
Toggle slideshow. |
|
Display a grid to straighten the current image. |
|
Undo any transformation applied to the current image. |
|
Save the current image to disk. |
|
Zoom the current widget. |
center#
Center the image in the viewport.
crop#
Display a widget to crop the current image.
syntax: crop [--aspectratio=ASPECTRATIO]
- optional arguments:
--aspectratio
: Fix the cropping to the given aspectratio. Valid options are two integers separated by:
or the specialkeep
to keep the aspectratio of the current image.
flip#
Flip the image.
syntax: :flip [--vertical]
- optional arguments:
--vertical
: Flip image vertically instead of horizontally.
goto#
Select specific image in current filelist.
syntax: :goto index
- positional arguments:
index
: Number of the image to select.
Hint
-1 is the last image.
count: Select [count]th image instead.
play-or-pause#
Toggle between play and pause of animation.
reload#
Reload the current image.
rescale#
Rescale the original image to a new size.
syntax: :rescale dx [dy]
- positional arguments:
dx
: Factor in x direction to scale the image by.dy
: Factor in y direction to scale the image by. If not given, the aspectratio is preserved.
resize#
Resize the original image to a new size.
syntax: :resize width [height]
- positional arguments:
width
: Width in pixels to resize the image to.height
: Height in pixels to resize the image to. If not given, the aspectratio is preserved.
rotate#
Rotate the image.
syntax: :rotate [--counter-clockwise]
- optional arguments:
--counter-clockwise
: Rotate counter clockwise.
count: multiplier
scroll#
Scroll the image in the given direction.
syntax: :scroll direction
- positional arguments:
direction
: The direction to scroll in (left/right/up/down).
count: multiplier
scroll-edge#
Scroll the image to one edge.
syntax: :scroll-edge direction
.
- positional arguments:
direction
: The direction to scroll in (left/right/up/down).
slideshow#
Toggle slideshow.
count: Set slideshow delay to count instead.
straighten#
Display a grid to straighten the current image.
The image can then be straightened clockwise using the l
, >
and L
keys and counter-clockwise with h
, <
and H
. Accept the changes with
<return>
and reject them with <escape>
.
undo-transformations#
Undo any transformation applied to the current image.
write#
Save the current image to disk.
syntax: :write [path]
.
- positional arguments:
path
: Save to this path instead of the current one.
zoom#
Zoom the current widget.
syntax: :zoom direction
- positional arguments:
direction
: The direction to zoom in (in/out).
count: multiplier
Library#
Command |
Description |
---|---|
Select specific row in current filelist. |
|
Move the view keeping the cursor on the same position. |
|
Open the currently selected path. |
|
Scroll the library in the given direction. |
goto#
Select specific row in current filelist.
syntax: :goto row
- positional arguments:
row
: Number of the row to select.
- optional arguments:
--open-selected
: Automatically open any selected image.
Hint
-1 is the last row.
count: Select [count]th element instead.
move-view#
Move the view keeping the cursor on the same position.
syntax: :move-view position
- positional arguments:
position
: Position to move the view to (top/center/bottom).
open-selected#
Open the currently selected path.
If the path activated is an image, it is opened in image mode. If it is a directory, the library is loaded for this directory.
syntax: :open-selected [--close]
- optional arguments:
--close
: Close the library if an image was selected.
scroll#
Scroll the library in the given direction.
syntax: :scroll direction
The behaviour is similar to the file manager ranger.
Scrolling right selects the current file.
Scrolling left selects the parent directory.
Scrolling up and down moves the cursor.
- positional arguments:
direction
: The direction to scroll in (left/right/up/down/page-up/page-down/half-page-up/half-page-down).
- optional arguments:
--open-selected
: Automatically open any selected image.
count: multiplier
Thumbnail#
Command |
Description |
---|---|
Select the last thumbnail in the current row. |
|
Select the first thumbnail in the current row. |
|
Select specific thumbnail in current filelist. |
|
Move the view keeping the cursor on the same position. |
|
Open the currently selected thumbnail in image mode. |
|
Scroll to another thumbnail in the given direction. |
|
Zoom the current widget. |
end-of-line#
Select the last thumbnail in the current row.
first-of-line#
Select the first thumbnail in the current row.
goto#
Select specific thumbnail in current filelist.
syntax: :goto index
- positional arguments:
index
: Number of the thumbnail to select.
Hint
-1 is the last thumbnail.
count: Select [count]th thubnail instead.
move-view#
Move the view keeping the cursor on the same position.
syntax: :move-view position
- positional arguments:
position
: Position to move the view to (top/center/bottom).
open-selected#
Open the currently selected thumbnail in image mode.
scroll#
Scroll to another thumbnail in the given direction.
syntax: :scroll direction
- positional arguments:
direction
: The direction to scroll in (left/right/up/down/page-up/page-down/half-page-up/half-page-down).
count: multiplier
zoom#
Zoom the current widget.
syntax: :zoom direction
- positional arguments:
direction
: The direction to zoom in (in/out).
count: multiplier
Command#
Command |
Description |
---|---|
Invoke command line completion. |
|
Cycle through command history. |
|
Cycle through command history with substring matching. |
|
Leave command mode. |
|
Do nothing. |
complete#
Invoke command line completion.
syntax: :complete [--inverse]
- optional arguments:
--inverse
: Complete in inverse direction.
history#
Cycle through command history.
syntax: :history direction
- positional arguments:
direction
: The direction to cycle in (next/prev).
history-substr-search#
Cycle through command history with substring matching.
syntax: :history-substr-search direction
- positional arguments:
direction
: The direction to cycle in (next/prev).
leave-commandline#
Leave command mode.
nop#
Do nothing.
This is useful to remove keys bound by Qt by explicitly binding them to nop.
Manipulate#
Command |
Description |
---|---|
Leave manipulate accepting the applied changes. |
|
Enter command mode. |
|
Decrease the value of the current manipulation. |
|
Discard any changes and leave manipulate. |
|
Toggle fullscreen mode. |
|
Set the value of the current manipulation. |
|
Show help on a command or setting. |
|
Clear the command history. |
|
Increase the value of the current manipulation. |
|
Show a pop-up with keybindings information. |
|
Focus the next manipulation in the current tab. |
|
Focus the next manipulation tab. |
|
Do nothing. |
|
Focus the previous manipulation in the current tab. |
|
Focus the previous manipulation tab. |
|
Set an option. |
accept#
Leave manipulate accepting the applied changes.
command#
Enter command mode.
syntax: :command [--text=TEXT]
- optional arguments:
--text
: String to append to the:
prefix.
decrease#
Decrease the value of the current manipulation.
syntax: :decrease value
- positional arguments:
value
: The value to decrease by.
count: multiplier
discard#
Discard any changes and leave manipulate.
fullscreen#
Toggle fullscreen mode.
goto#
Set the value of the current manipulation.
syntax: :goto value
- positional arguments:
value
: Value to set the manipulation to.
count: Set the manipulation to [count] instead.
help#
Show help on a command or setting.
syntax: :help topic
- positional arguments:
topic
: Either a valid :command or a valid setting name.
Hint
For commands help :command
is the same as command -h
.
history-clear#
Clear the command history.
This clears the history of all modes unless --mode
is passed.
syntax: :history-clear [--mode]
- optional arguments:
--mode
: Clear the history of the current mode only.
increase#
Increase the value of the current manipulation.
syntax: :increase value
- positional arguments:
value
: The value to increase by.
count: multiplier
keybindings#
Show a pop-up with keybindings information.
syntax: :keybindings [--columns=N]
- optional arguments:
--columns
: Number of columns to split the bindings in.
next#
Focus the next manipulation in the current tab.
count: multiplier
next-tab#
Focus the next manipulation tab.
count: multiplier
nop#
Do nothing.
This is useful to remove keys bound by Qt by explicitly binding them to nop.
prev#
Focus the previous manipulation in the current tab.
count: multiplier
prev-tab#
Focus the previous manipulation tab.
count: multiplier
set#
Set an option.
syntax: :set name[!] [[+|-]value]
- positional arguments:
name
: Name of the setting to set. Append a!
to toggle the value of boolean settings.value
: Value to set the setting to. Prepend with+
/-
to increment/decrement the value of numerical settings. If not given, set to default.