挿入モードに入ったときにvimが新しい行を挿入するのを防ぐ方法

挿入モードに入ったときにvimが新しい行を挿入するのを防ぐ方法

Vimが挿入モードに入ったら、新しい行を挿入してください。明らかに私はこれが残念だと思います。これは、リモートサーバーのiTerm2とOSXのローカルで発生します。

これは私のものです.vimrc

" Use the monokai theme
set background=dark
colorscheme monokai

" Use the OS clipboard by default (on versions compiled with `+clipboard`)
set clipboard+=unnamed

" Use UTF-8 without BOM
set encoding=utf-8 nobomb

" Centralize backups, swapfiles and undo history
set backupdir=~/.vim/backups
set directory=~/.vim/swaps
" Enable line numbers
set number
" Enable syntax highlighting
syntax on
" Highlight current line
set cursorline
" Make tabs as wide as two spaces
set tabstop=4
" Show “invisible” characters
set lcs=tab:▸\ ,trail:·,eol:¬,nbsp:_
set list
" Highlight searches
set hlsearch
" Ignore case of searches
set ignorecase

" Enable mouse in all modes
set mouse=a
" Disable error bells
set noerrorbells
" Don’t reset cursor to start of line when moving around.
set nostartofline
" Show the cursor position
set ruler
" Don’t show the intro message when starting Vim
set shortmess=atI
" Show the current mode
set showmode
" Show the filename in the window titlebar
set title

" Strip trailing whitespace (,ss)
function! StripWhitespace()
    let save_cursor = getpos(".")
    let old_query = getreg('/')
    :%s/\s\+$//e
    call setpos('.', save_cursor)
    call setreg('/', old_query)
endfunction

関連情報