Toggle semicolon (or other character) at end of line

后端 未结 2 698
耶瑟儿~
耶瑟儿~ 2021-01-13 11:09

Appending (or removing) a semicolon to the end of the line is a common operation. Yet commands like A; modify the current cursor position, which is not always i

2条回答
  •  礼貌的吻别
    2021-01-13 12:09

    I don't think I've ever needed to remove a semicolon at the EOL but for adding a semicolon, I have

    nnoremap ,; m`A;``
    

    Which sets a context mark, appends the semicolon and jumps back.

提交回复
热议问题