LoginSignup
16
12

More than 5 years have passed since last update.

Vimのノーマルモードから加算・減算を行う

Last updated at Posted at 2014-03-22

加算

数値<C-a>
カーソルのある行の次に出てくる最初の数字に入力した数値を加算する(カーソル行に数字がない場合は何もおこらない)。

減算

数値<C-x>
こちらは減算を行う。

0から始まる数値について

Vimでは先頭が0だった場合は8進数と扱うので、先頭が0の十進数として数値を扱いたい場合は以下を設定する。

set nrformats=
16
12
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
16
12