Right after I issued the command vi
on the terminal, I got the
following error message.
$ vi
Error detected while processing /home/owner/.vim/bundle/UltraBlog.vim/plugin/UltraBlog.vim:
line 253:
Traceback (most recent call last):
File "<string>", line 7, in <module>
File "/home/owner/.vim/bundle/UltraBlog.vim/plugin/ultrablog/commands.py", line 8, in <module>
from db import *
File "/home/owner/.vim/bundle/UltraBlog.vim/plugin/ultrablog/db.py", line 181, in <module>
u.ub_echoerr(msg)
File "/home/owner/.vim/bundle/UltraBlog.vim/plugin/ultrablog/util.py", line 623, in ub_echoerr
vim.command(cmd)
vim.error: Vim(echoerr):Missing key 'xmlrpc_uri' in the settings list of UltraBlog.vim !
Press ENTER or type command to continue
Before entering the standard startup screen, I received another complaint from the editor.
Error detected while processing BufEnter Auto commands for "*":
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name '__ub_on_buffer_enter' is not defined
Press ENTER or type command to continue
I tried opening a file, and was blamed by the program again!
"foo.txt" 123L, 456C
Error detected while processing BufEnter Auto commands for "*":
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name '__ub_on_buffer_enter' is not defined
Press ENTER or type command to continue
I split my window into half by the editor command :new
and captured
the content of another error message. I found that it’s the same as
the second message.
I moved the cursor across windows, and got similar message, but repeated a few times.
Error detected while processing BufEnter Auto commands for "*":
Traceback (most recent call last):
Press ENTER or type command to continue
Error detected while processing BufEnter Auto commands for "*":
File "<string>", line 1, in <module>
Press ENTER or type command to continue
Error detected while processing BufEnter Auto commands for "*":
NameError: name '__ub_on_buffer_enter' is not defined
Press ENTER or type command to continue
I was annoyed by the error, and decided to fix it. From the alphabets
“ub” in __ub_on_buffer_enter
in the error messages, I believed that
the recently updated plugin UltraBlog.vim was the cause of my problem.
I searched Google for “vim ultrablog”. To narrow down the search, I
only viewed the web pages which were updated in the past year. I
found a blog post on the automatic completion of the category of
posts.1 The post was written by Leigh, the creator of
UltraBlog.vim. There’s a code block in the middle, and experienced
Vim users will notice that it’s the suggested configurations in one’s
own VIMRC. Comparing the settings for the previous version of
UltraBlog.vim in my VIMRC with his, I realized that I didn’t include
the line containing ‘xmlrpc_uri’. I copied the whole line in his code
block to my VIMRC, and restarted Vim again. Finally, Vim didn’t show
me errors anymore.
Looking back, I regret not reading the first error message…
Like Leigh, I’ve switched from WordPress to Octopress three months ago.2 His migration motivated me to follow his suit.3 For the detailed practical advantages of Octopress over WordPress, you may refer to my about page.
This post contains a code block. Following what I’ve done in the numbered list and the last paragraph in one of my recent post on WordPress.com, surrounding the code block with 3 backticks should work in UltraBlog.1
1
2
3
public static void main(String[] args) {
int i = 1;
}
However, I tried writing an <html>
tag in the online editor, and the
code was stripped of. Anyways, there’s Gist on GitHub, so there
should be no problem.
Posted via UltraBlog.vim.
Refer to Testing WordPress’ Footnotes for details. ↩
I tried to embed footnotes using UltraBlog. Maybe I’ve done too much things. Let me list them here.
:UBList
.It involves several technologies. UltraBlog. Therefore, it’s unrealistic to rely on Google search engine to get the answer.
In order to quickly find out the cause of such error, I used the
online editor to create a minimum working example of a post containing
a footnote. Then I used UltraBlog to download that post. In gVim, I
could see that the filetype is html
, instead of markdown
. I tried
to change it to markdown
and update the draft. However, the string
^1
enclosed in middle brackets wasn’t interpreted. When I switch
the filetype back to html
, then things just work again. Just like
the text below. I copied them from
the official pandoc markdown syntax guide.
As I can see from the above block quote, the string ^longnote
inside a
pair of middle brackets will be changed to numbers. In order to let you
see it, I post a screenshot of my gVim here.
Note: Remember to :se ft=html
before :UBSend
Posted via UltraBlog.vim.
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.
I tried to quit the new list with :q
.
Vim told me to use :q!
instead.
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.
]]>Note: I can now figure out a way to work with both UltraBlog and WordPress.com’s built-in online code highlighter. See my newer post for details.
Markdown is easy to write. However, writing code with (I’ve found a way to use the
built-in SyntaxHighlighter now because I’ve realised that a blank line
in Markdown will be changed to a code
tag (surrounded with []
) using UltraBlog in Vim doesn’t work. In
order to post some code, one needs to
use 3 backticks.<p>
tag in HTML. Thus, don’t put
any blank lines right above and below the the <code>
tags.)
1
2
element1 = document.getElementById(“foo”);
element1.innerHTML = “Hello world!”;
There’s some shortcomings of the above method. If you need to copy a
list of source code, you’ll need to browse the source code, provided
that the “gutter” option of the code list is “true”,
which is the default.
Moreover, if you include source code that consists of <angled
blocks>
in a blog post written in Markdown using the UltraBlog
plugin, then the angled block may be interpreted as an HTML tag
element, such as the statement #include <iostream>
in a C++ program.
More importantly, I’ve found out that this apporach
doesn’t work with UltraBlog. The above code list verifies
this assertion.
Figure 1: This is a screenshot of the “code list” in UltraBlog.vim. Markdown quick reference suggests the use of 3 backticks.
Figure 2: The above figure shows how the source code for the “code list” (in lines 12–15 in UltraBlog.vim, see Figure 1) is interpreted.
If you’re a Blogger user who has made use of SyntaxHighlighter to share your source code online, you’ll know that the copy function depends on Adobe Flash. I don’t have time to figure out whether this is a JavaScript trap, but it’s better if I can find a way to avoid proprietary softwares.
Moreover, the languages supported by WordPress.com is not as much as Gist. For instance, Gist can highlight code in a VIMRC file, but the plugin used by WordPress.com can’t.
According to WordPress’s official support, using Gist should be much easier. The following is the result.
Posted via UltraBlog.vim.
]]>