삽입 모드로 들어갈 때 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

관련 정보