<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Hleb</title>
    <description>The latest articles on DEV Community by Hleb (@hleb).</description>
    <link>https://dev.to/hleb</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F233853%2F29b188fd-59ce-4cb0-bef7-a1f6400f7d52.jpg</url>
      <title>DEV Community: Hleb</title>
      <link>https://dev.to/hleb</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hleb"/>
    <language>en</language>
    <item>
      <title>Zathura - cool PDF viewer with Vim bindings</title>
      <dc:creator>Hleb</dc:creator>
      <pubDate>Tue, 25 Oct 2022 05:51:01 +0000</pubDate>
      <link>https://dev.to/hleb/zathura-cool-pdf-viewer-with-vim-bindings-66k</link>
      <guid>https://dev.to/hleb/zathura-cool-pdf-viewer-with-vim-bindings-66k</guid>
      <description>&lt;p&gt;A pleasant find of recent days for me is Zathura - open source, lightweight, minimalistic, highly customizable PDF viewer with Vim hotkeys support. Sounds good, doesn’t it?&lt;/p&gt;

&lt;p&gt;I read regularly quite a lot of books and documentation in PDF, so I am very glad to discover this tool. Here’s what it looks like for me after a little tweaking.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UTx4UAam--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ggvyra2rwyzejad8ntfa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UTx4UAam--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ggvyra2rwyzejad8ntfa.png" alt="Zathura PDF viewer" width="880" height="621"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;Installation of Zathura looks pretty trivial:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~ sudo apt-get install zathura
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I also installed &lt;code&gt;zathura-djvu&lt;/code&gt; to read DjVu documents:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~ sudo apt-get install zathura-djvu
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Basics
&lt;/h2&gt;

&lt;p&gt;As I mentioned above, Zathura uses Vim bindings, so if you’re familiar with this editor, you’ll feel very comfortable with Zathura. If you are not familiar with Vim, here is a short description of the keys:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;j&lt;/code&gt;, &lt;code&gt;k&lt;/code&gt;, &lt;code&gt;h&lt;/code&gt;, &lt;code&gt;l&lt;/code&gt; for navigation&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;gg&lt;/code&gt; to jump to the beginning of the document&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;G&lt;/code&gt; to go to the end of the document&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;J&lt;/code&gt;, &lt;code&gt;K&lt;/code&gt; to go to the next and previous pages respectively&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/&lt;/code&gt; to search&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;n&lt;/code&gt;, &lt;code&gt;N&lt;/code&gt; to move between search results&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;q&lt;/code&gt; to close the application&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;:&lt;/code&gt; for entering commands, for example &lt;code&gt;:bmark&lt;/code&gt; for creating bookmarks or &lt;code&gt;:blist&lt;/code&gt; to view the list of bookmarks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are also additional hotkeys such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;TAB&lt;/code&gt; to see content of the document&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;d&lt;/code&gt; to toggle between single and double page view&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;r&lt;/code&gt; to rotate document&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;F11&lt;/code&gt; to open fullscreen.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For more information about keyboard shortcuts check &lt;code&gt;man&lt;/code&gt; or the project website.&lt;/p&gt;

&lt;h2&gt;
  
  
  Other Features
&lt;/h2&gt;

&lt;p&gt;In addition to the fact that the viewer itself looks quite minimalistic, it also has other benefits.&lt;br&gt;
For example, Zathura is able to reload an open file automatically if it was updated. This can be very useful for example when you work with LaTeX documents and see the result immediately.&lt;/p&gt;

&lt;p&gt;Also, I would like to note the ability to install plugins for different formats of documents. I've only tried DjVu so far, but &lt;a href="https://pwmt.org/projects/zathura/plugins/"&gt;here&lt;/a&gt; you can see more options.&lt;/p&gt;
&lt;h2&gt;
  
  
  Configuration
&lt;/h2&gt;

&lt;p&gt;To configure Zathura you can edit &lt;code&gt;~/.config/zathura/zathurarc&lt;/code&gt; file. For example, here's mine:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#open files in maximized window
set window-height 3000
set window-width 3000

set font "inconsolata 15"

# copy selection to system clipboard
set selection-clipboard clipboard

#stop at page boundries
set scroll-page-aware "true"
set smooth-scroll "true"
set scroll-full-overlap 0.01
set scroll-step 100

#setup dark theme
set default-bg "#000000"
set default-fg "#F7F7F6"

set statusbar-fg "#B0B0B0"
set statusbar-bg "#202020"

set inputbar-bg "#151515"
set inputbar-fg "#FFFFFF"

set notification-error-bg "#AC4142"
set notification-error-fg "#151515"

set notification-warning-bg "#AC4142"
set notification-warning-fg "#151515"

set highlight-color "#F4BF75"
set highlight-active-color "#6A9FB5"

set completion-highlight-fg "#151515"
set completion-highlight-bg "#90A959"

set completion-bg "#303030"
set completion-fg "#E0E0E0"

set notification-bg "#90A959"
set notification-fg "#151515"

set recolor "true"
set recolor-lightcolor "#000000"
set recolor-darkcolor "#E0E0E0"
set recolor-reverse-video "true"
set recolor-keephue "true"

set render-loading "false"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Summarizing
&lt;/h2&gt;

&lt;p&gt;Zathura looks like as the main tool that I will use for viewing PDF and DjVu documents. And I would like to recommend you try it too!&lt;/p&gt;

</description>
      <category>vim</category>
      <category>pdf</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
