Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8374737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:59:24+00:00 2026-06-09T14:59:24+00:00

I would like to view a pdf file in a split window using gVim,

  • 0

I would like to view a pdf file in a split window using gVim, does anyone know if this is possible? How?

Some details: I just recently started using vim and use it to make notes, while reading a pdf. I write own notes, but quite often I copy text from pdf, so smooth copying would be nice. Currently I need to alt+tab for pdf viewer, go to mouse or arrow keys, select text, copy, alt+tab back to vim. Of course this is not a huge task, but using vim I feel it could be possible without mouse, keeping hands at “home row”, and not needing external program alt+tab to…

Ideally I would like pdf to be shown as it is supposed to be. If that is not possible, I will try how pdf shows as text representation using some plugin.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T14:59:25+00:00Added an answer on June 9, 2026 at 2:59 pm

    Vim is a text editor, so it only edits text. So, yes you can edit the PDF on a binary level, but no you can’t view the contents of the PDF as they are meant to be displayed. You can use the xpdf package to convert the PDF to text first and then view that, but the results aren’t perfect. However, there are some useful autocommands to allow you to open non-text files with their default program when you “open” them in vim. I use these:

    augroup nonvim
       au!
       au BufRead *.png,*.jpg,*.pdf,*.gif,*.xls* sil exe "!open " . shellescape(expand("%:p")) | bd | let &ft=&ft
       au BufRead *.ppt*,*.doc*,*.rtf let g:output_pdf = shellescape(expand("%:r") . ".pdf")
       au BufRead *.ppt*,*.doc*,*.rtf sil exe "!/usr/local/bin/any2pdf " . shellescape(expand("%:p"))
       au BufRead *.ppt*,*.doc*,*.rtf sil exe "!open " . g:output_pdf | bd | let &ft=&ft
    augroup end
    

    Instead of !open you can use !xdg-open if you’re using a Linux distro. The any2pdf command there is a script I use that converts those files to a PDF before opening them. You can edit this if you just want to open everything with its default program. For example,

    augroup nonvim
       au!
       au BufRead *.png,*.jpg,*.pdf,*.gif,*.xls*,*.ppt*,*.doc*,*.rtf sil exe "!open " . shellescape(expand("%:p")) | bd | let &ft=&ft
    augroup end
    

    You might also want to look into window managers like dwm or ratpoison, which come pretty close to what you’re asking for.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know how to use core graphics to draw a pdf like in
I would like to create a view where this subview will be in repeated
I would like to create an Invoice in HTML instead of a PDF-file. And
I'd like to know (from a high level view) what would be required to
I would like to generate a pdf file when the user clicks on it,
I started in the mapping. I would like to view a map of France
I would like to get View instance that is used to display specific Preference
I would like to implement a view similar to the detail view of Apple's
I would like to get the view that is the first responder, currently I
I would like to animate a view along a path. While it moves from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.