Blog 1

Random Talk on Random Thoughts

Don't Allow Pingbacks

| Comments |

This noon, I received some pingback notifications. It is possible that I get these messages because I included some hyperlinks that link back to my own posts. After viewing the contents, I found them meaningless and wanted to delete them. Harrison provides the reasons for not allowing pingbacks.1

As the author has said, he will simply delete the pingbacks on his blog pages. Moreover, I don’t want to bother the authors of posts to which I has linked. Therefore, I’ve found the last part of the official support page useful.2

Disabling Pingbacks

You can easily disable pingbacks on individual posts via the Discussion module on your Add New or Edit Post page:
Wordpress.com's interface

Posted via UltraBlog.vim.


  1. The link for Dan Harrison’s post on WP Doctors at http://www.wpdoctors.co.uk/with-wordpress-whats-a-pingback-should-i-approve-them is now dead

  2. WordPress.com’s support page on pingbacks 

EMACS Key Bindings in Vimperator?

| Comments |

I’ve written a post about Vimperator, and also another one about Viper. However, I’ve never seen web pages that introduce the following Vimperator insert mode commands written by fans of Vim or Vimperator.

  • Typing <C-a> moves the cursor to the beginning of the line.
  • Typing <C-e> moves the cursor to the end of the line.
  • Typing <C-k> removes the characters after the cursor.

They behave exactly like the keyboard commands in GNU Emacs!

In my opinion, they’re just behaving like the commands used in a *nix terminal. Anyways, I’ve learnt some new commands, no matter where they’re used. For a Vim user, it won’t hurt to take the official tutorial of Emacs since they can applied once you’re in an Info page. For example, if you want to scroll down by one screen in an Info document, you can issue the command <C-v>. To reverse the change, you can type <M-v>.

I end this post with <C-j>, though its behaviour in Emacs differs from the behaviour in Vimperator. It’s just another way for using the search engine: moving the cursor to the search box at the top right-hand corner.

Posted via UltraBlog.vim.

My Error While Using UltraBlog

| Comments |

I’m not sure if I’ve installed UltraBlog.vim correctly a month ago, but it surely improves my blogging efficiency a lot. With Vim’s keystroke, I can move the cursor quickly. Such power of “what you think is what you get” is impossible to find in other editors, either the online ones or the offline ones.

I write this post because I would like to make a record only. I can still find ways to work well with UltraBlog.

What are the errors? The following screenshots illustrate them.

I opened a local list and forgot to close it before opening another list. Then, from one of the lists, I opened a new buffer to edit a post. After I finished editing the post, I issued ZQ in order to close the buffer. However, the buffer didn’t close. Instead, I got another list. It seems that the plugin doesn’t want users to use an “outdated” list to link up with a post. As I tried to close the new list with ZQ or :q, I just couldn’t do it. But there’s so many windows. OK! Then I just use <C-w>j and ZQ to close the old lists. When I used UltraBlog for the first time, the plugin surprised me by giving me an extra, identical and updated list of contents. Since the first time, the plugin still do the same thing, of course, but I can “keep calm and continue blogging”.

I’ve run into this situation for the first time today.

fig1

I tried to quit the new list with :q.

fig2

Vim told me to use :q! instead.

fig3

UltraBlog threw a host of errors that I wouldn’t be interested to find out more.

I wouldn’t have time to figure out what it really is. As far as I know, if I remember to close all post lists while writing or editing a post, things will be fine. Anyways, just make things work, and blogging with Vim and UltraBlog.vim is awesome!


(Last edited on FEB 05, 2014)

Note: Actually, :on can clear the unwanted and unaccessible old lists. This can be checked using :ls, which is the same as :buffers.


(Last edited on JUN 23, 2014)

Now, I’ve switched to Octopress, just like the creator of UltraBlog.vim since it’s better than WordPress.


Posted via UltraBlog.vim.

Firefox's Markdown Viewer

| Comments |

This morning, I’ve found a Firefox Add-on called Markdown Viewer. As its name suggests, it’s a Firefox plugin that enables users to view Markdown documents. The screenshot provided on the home page of the add-on illustrates that it works on M$ Win*. How about GNU/Linux? I clicked the button and installed the plugin. After that, I used :restart in Vimperator to see what happened if I used Firefox to view a local Markdown file with extension name .md.

It turned out that nothing happened! With Lai’s review titled Work on Linux, I figured out what to do. After looking at his suggested code for vi ~/.mozilla/firefox/*default/mimeTypes.rdf, I really tested it and it worked. Critical readers will then ask about the way to include multiple file extensions.

Browsing the code with # in the RDF file helps. Here’s what my results.

1
2
3
4
5
6
7
8
9
<RDF:Description RDF:about="urn:mimetype:application/vnd.ms-excel"
NC:value="application/vnd.ms-excel"
NC:editable="true"
NC:description="Microsoft Excel Worksheet">
<NC:fileExtensions>xls</NC:fileExtensions>
<NC:fileExtensions>xlb</NC:fileExtensions>
<NC:fileExtensions>xlt</NC:fileExtensions>
<NC:handlerProp RDF:resource="urn:mimetype:handler:application/vnd.ms-excel"/>
</RDF:Description>

According to a question on Super User, we use more than one extension name for a Markdown file. However, a GNU/Linux user should never use .md.

Finally, combining Lai’s and Cas’s posts, I’ve come up with a Gist.

Posted via UltraBlog.vim.

A Reason for My VimRepress Installation Failure

| Comments |

In one of my old posts, I mentioned that I had tried using VimRepress.1 However, this plugin kept throwing errors like this.

Confirm Delete [6]: First Post Using VimRepress? [yes/NO] :yes
Error detected while processing :
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/owner/.vim/bundle/VimRepress/plugin/vimrepress.py", line 41, in __check
echoerr("something wrong: %s" % e)
File "/home/owner/.vim/bundle/VimRepress/plugin/vimrepress.py", line 47, in <lambda>
echoerr = lambda s: vim.command('echoerr "%s"' % s)
vim.error: Vim(echoerr):something wrong: Vim(let):E461: Illegal variable name: s:user_input
Press ENTER or type command to continue

GnuPG Encryption

| Comments |

I’ve found a page which provides a brief summary of gpg commands. I think some mainland users will find it useful. I hope that I can use these commands soon.

$ gpg -k
$ gpg -K

My Experience of Using Vundle

| Comments |

Three months ago, I gave Vundle a try, and it’s much more convenient than pathogen.vim. With Zaadi’s VIMRC configuration, Vundle can be set up within several minutes.

I installed FuzzyFinder for opening files in other directories without leaving Vim. However, during the installation of the plugin, I carelessly forgot to download L9 library first. Therefore, I put it into $MYVIMRC.

1
2
Bundle 'L9' " FuzzyFinder dependency
Bundle 'FuzzyFinder'

Then, I got the following error message.

$ vi
Error detected while processing /home/owner/.vimrc:
line   28:
E116: Invalid arguments for function vundle#config#bundle
line   30:
E116: Invalid arguments for function vundle#config#bundle
line   31:
E116: Invalid arguments for function vundle#config#bundle
line   32:
E116: Invalid arguments for function vundle#config#bundle
line   33:
E116: Invalid arguments for function vundle#config#bundle
line   39:
E116: Invalid arguments for function vundle#config#bundle
Error detected while processing /home/owner/.vim/bundle/FuzzyFinder/plugin/fuf.vim:
line   13:
***** L9 library must be installed! *****
Press ENTER or type command to continue

:BundleList doesn’t have L9, but ~/.vim/bundle has the folder L9. The cause of the problem is the comment on the right of the Bundle 'foo' command.

Posted via UltraBlog.vim.

My Choice of Vim Alignment Plugin

| Comments |

This post is nothing more than a link to a post on Ruby China, which recommends some Vim plugins1, and I’d like to use vim-easy-align rather than Align.vim.

For the rest of the plugins, I don’t feel that I need them now, so I won’t bother them. For instance, I found the ruler at the bottom of each buffer useful, and I can’t see the difference between a powerline and the default ruler.

Posted via UltraBlog.vim.