Exclusive and Inclusive Motion in Neovim


Suppose that we have the following text in normal mode (cursor is indicated by |):

|hello world

if we use dw, we delete hello<Space>1 and only world is left; if we use de, hello is deleted and <Space>world is left. Have you ever wondered about why dw do not delete w while de will delete the o in hello? It seems that the motion e and w are somewhat inconsistent. It turns out that this has something to do with the exclusivity of motions in Vim.

Vim-like Editing inside Browser

Neovim has powerful ability in editing texts. But if you are in a browser and want to input some text, can we somehow utilize the editing power of Vim? In this post, I would like to share several ways to use Vim or Vim-like editing when you are working inside a browser.

Create Mappings Which Take A Count in Neovim

Many normal mode commands accept a count, which means to repeat the motion count times. For example, 3j moves the cursor 3 lines below the current line and 4w will move the cursor four words forward. Usually, the user-defined mappings can not take a count. Even if they can, they will most probably not work the way you expect them to. In this post, I will describe what I have learned to make a fairly complex mapping repeatable with a count.

How to Use Python Inside Vim Script with Neovim


I have been using Vim-airline for a while to customize my statusline. We can change the theme used for statusline with the many themes available in vim-airline-themes. Not all these themes looks good since it depends on the background color you use for Neovim and certainly your aesthetics.

I only use a handful of themes myself and I change my themes when I feel bored with one theme. It occurs to me that I can write a simple script to randomly pick a theme from my favorite list1. It turns out writing such a script is not easy for Neovim newbies like me.

In this post, I would like to share how I end up achieving what I want by mixing Vim script and Python script.

Using Snippets in Neovim with Ultisnips

If you have used Sublime Text before, you may be familiar with the snippet function. Snippets let you input a trigger word and expand the trigger to some boilerplate code or string you do not want to repeat each time. You will increase your efficiency dramatically with the help of snippets.

Writing LaTeX in Neovim with Vimtex

Previously, I have written a post about how to write and compile LaTeX source code in Sublime Text. Now that I am familiar with Neovim and I want to do everything related to text editting in Neovim. In this post, I would like to share how to configure Neovim for LaTeX editting and previewing.

最新版 Rime 输入法使用

之前一直听说过 Rime 这个神级输入法的大名,却一直迟迟没有试 用,一方面现在有的各种输入法用着可以,另外,对于 Rime 没有 GUI 界面的配置感觉发 怵。之前一直使用的是 QQ 输入法,最近一次升级,却造成 Chrome 浏览器频频崩溃 ,是可忍孰不可忍,真好是时候卸载 QQ 输入法,试 试 Rime 了。关于 Rime 的配置,网上能够找到的资料实在是过于丰富,为了使文章不过 于冗长,一些简单的设置我将不再重复。