15
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

vim で delete できない。

Last updated at Posted at 2018-05-02

正確に言うと、インサートモードで入力した文字以外を delete で消せない。

ということで .vimrc に以下設定追加したらできるようになりました。ついでにカーソルの移動についても便利な設定あったので追加してます。(リンク先から全コピです)
参考:vimのインサートモード中にカーソルキー及びBSキーが使えるようにする | sseze's blog

"viとの互換性を無効にする(INSERT中にカーソルキーが有効になる)
set nocompatible
"カーソルを行頭,行末で止まらないようにする
set whichwrap=b,s,h,l,<,>,[,]
"BSで削除できるものを指定する
" indent  : 行頭の空白
" eol     : 改行
" start   : 挿入モード開始位置より手前の文字
set backspace=indent,eol,start

めちゃ便利。

15
6
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
15
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?