Showing posts with label tip. Show all posts
Showing posts with label tip. Show all posts

Saturday, March 24, 2012

Bring GVIM menu back in Ubuntu 11.10

GVIM menu bar disappeared in Ubuntu 11.10 with Unity if gvim is launched from command line. This post is a compilation of things that I tried to fix the issue.

First, you might need to remove Vim from the .gnome2 dir:

rm ~/.gnome2/Vim

Then, add the following line to ~/.bashrc

alias gvi='gvim -f'

Restart terminal. Type gvi, and you should see the gvim with menu in the unity top bar. People report that the "-f" should fix the menu problem.

If you don't want to block a terminal when opening gvim, replace the above alias line with this:

gvi() {
  gvim -f $@ &
}

Next time, when you type gvi, the gvim process will be put in background.

If you want to keep gvim running even after its terminal is closed, try this:

gvi() {
  gvim -f $@ &
  disown
}

References:


Monday, January 31, 2011

Adobe reader: Remember last read page

I've been using Amazon Kindle lately. It's such an adorable tool for e-book reading. The most useful feature that I can't live without is synchronizing the last read page across all Kindle clients. I have Kindle clients installed on my Kindle 3G Wireless, Windows, Macbook Pro, and of course my beloved Android phone. And whenever I open whichever Kindle client, it will sync to the page I was reading. Convenient and time saving!

However, not every e-book is in kindle format. Actually most of digital documents are PDFs.

Lately, I am reading an e-book that has 1200 pages! A e-door-stopper. It is in PDF format.

I have to turn off my PC every night, otherwise it will intermittently make high-pitch beeps like a hot smoke detector. My Adobe Reader 9 doesn't have a bookmarking feature. So whenever I open the 1200-page PDF, I have to recall where I was, and click through the "Table of Contents" jungle to resume what I left. (Some PDFs even don't have a Table of Contents! Why author, why?!)

Although this little search 'task' doesn't sound difficult, it annoys me every time. It annoys me so much that today I jumped out my chair and finally decided to end my suffering. I Googled. The keyword is "Adobe reader bookmark". It turns out I've been such a fool for so many years.

The solution is so easy, and yet I haven't found or bothered to find it until today. You don't need to install any addon for Adobe Reader, which I thought would be the case. Just go to "Edit" menu, and choose "Preferences". In the dialog box, select the "Documents" category. Now check the "Restore last view settings when reopening documents" option. Done.


Like what the option is described, it makes Adobe Reader jump to the location where you left last time. Of course, unlike Kindle clients, it won't sync PDF copies on different PCs. But this little feature is good enough for me. I don't have to remember the last page nor I have to click through the Table of Contents. The continuous reading experience feels so good :)