Pages
爲什麼是“喝西北風”
漢語裏人們常常說沒飯吃是“喝西北風”,例如詞典中常舉的吳敬梓《儒林外傳》第四十一回的:“都像你這一毛不拔,我們喝西北風。”那爲什麼是喝西北風,不是喝東南風、西南風呢?網上常見的說法是這跟我國的氣候地形有關。我國冬季吹西伯利亞南下的西北風,而這時正值冬天,如果沒有儲備,就只能忍飢挨餓,所以叫喝西北風。這種說法沒有依據,更何況漢語裏很少說冬天沒有糧食吃。說到沒有糧食,一般都是青黃不接,是指的春季莊稼剛剛播種,尚未長成,而舊穀已經吃完了。
2024-12-15
3 min read
Substitution in Vim with expressions
Substitution in vim is very efficient, especially with the help of expressions. This is especially useful for calculations. I discovered this usage when I wanted to insert a list of numbers to the beginning of each line. But before go to the example, let’s take a look at expressions in vim substitution. The expressions in vim are marked with “=”. This tells vim to treat the contents after “=” as expressions rather than literal texts. For example, vim will treat \=1+1 as 2 rather than the text 1+1. Using \=, I can insert numbers in the beginning of each line with expressions.
2024-09-13
2 min read
Convert markdown files to pdf files using pandoc in vim
I am learning vim and I want to migrate my workflow in Sublime Text to vim. One of the things I do most with Sublime Text is to write markdown files and convert them to pdf files using Pandoc. After some search, I did not find a satisfied plugin which does such a job. The vim-pandoc seems to be too powerful. I did some more search and found this post, which is very informative and I follow the instructions to create my own plugin to convert markdown files to pdf files using pandoc in vim.
2024-08-28
2 min read