Vim / vi에서 백 스페이스 키가 작동하지 않음
방금 .vimrc
파일과 .bash_aliases
파일 을 약간 변경 했는데 그때부터 백 스페이스 키로 단어를 삭제할 수 없습니다.
내 .vimrc
파일은 다음과 같습니다.
set nocompatible
set number
set incsearch
set autoindent
set ruler
set autowrite
set smarttab
set linebreak
set spell
set et
set title
set mouse=v
set history=50
set tabstop=4
set matchtime=2
set matchpairs+=<:>
syntax enable
filetype plugin indent on
filetype indent on
set sw=4
map <f2> :w\|!python %
hi SpellBad ctermfg=000 guifg=#000
내 .bash_aliases
파일에는 Vim에 대한 두 줄이 있습니다.
alias vim="vim -c 'startinsert' -u ~/.vim/.vimrc"
alias vi="vi -c 'startinsert' -u ~/.vim/.vimrc"
내 ~/.vim
디렉토리에는 플러그인이나 스크립트가 하나도 없으므로 플러그인이이 문제를 일으킬 가능성이 없습니다.
~/.vim/.vimrc
심볼릭 링크입니다. 실제 .vimrc
파일은 ~/vimrc/
git 저장소 인 디렉토리에 있습니다.
삽입 모드 (자동 삽입 들여 쓰기, 줄 바꿈 및 삽입 시작 포함)의 모든 항목에 백 스페이스를 허용하려면 다음 backspace
옵션을 설정할 수 있습니다.
:set backspace=indent,eol,start
또는
:set backspace=2 "compatible with version 5.4 and earlier
기본적으로이 옵션은 비어 있으며 위에서 언급 한 내용을 백 스페이스 할 수 없습니다. 이것이 표준 Vi 동작입니다.
vimrc
Vim이 시작될 때 자동으로 설정되도록 이 줄을 파일에 넣을 수 있습니다 .
set backspace=indent,eol,start " more powerful backspacing
또한 사용자 vimrc 파일이없는 경우 Vim 8.0부터 스크립트 backspace
를로드하여 Vim 이이 값으로 설정 됩니다 defaults.vim
.
내 ~/.vimrc
파일에 내용이 있습니다 set nocompatible
. 백 스페이스가 작동하도록 동일한 파일에 다른 줄을 추가했습니다.
set backspace=indent,eol,start
그리고 그냥 달려
source ~/.vimrc
변경 사항이 동일한 쉘에서 즉시 적용되도록 동일한 터미널에서. vi를 열고 실행할 필요가 없습니다.
:set backspace=indent,eol,start
나에게 (다른 리눅스에서 "Konsole"로 연결된 데비안 서버) vim-tiny 패키지를 제거하고 vim 패키지를 설치 한 후 백 스페이스 키와 화살표 키 문제가 해결되었습니다.
urxvt + tmux의 SSH를 통해 Debian 7.8에서 동일한 문제가 발생했습니다. 나는 vim과 vim-tiny를 설치했습니다.
vim-tiny를 제거하면 문제가 해결되었습니다.
Many a times it is also a function of the getty type selected if one is using an SSH client like Putty or some such. Most preferable would be to use vt100+ as it is the most standard emulation.
I already had :fixdel
which was not working. I had to remove it and replace it with the first suggestion to get it to work
For me,I had the setting below, however the backspace still doesn't work.
set backspace=indent,eol,start
Finally, I found following line led to this problem.
inoremap <expr><C-h> neocomplete#smart_close_popup()
When this setting is deleted, backspace key works well in insert mode.
Reason
: That's because Vim sees CTRL-H as a backspace, and this line makes remapped to neocomplete#smart_close_popup() in insert mode.
참고URL : https://stackoverflow.com/questions/11560201/backspace-key-not-working-in-vim-vi
'Programing' 카테고리의 다른 글
Linux에서 디렉토리의 모든 * .js 파일을 재귀 적으로 찾으려면 어떻게해야합니까? (0) | 2020.11.24 |
---|---|
선택한 열만있는 데이터 프레임에서 고유 (0) | 2020.11.24 |
AngularJS에서 브로드 캐스트 이벤트를 어떻게 테스트 할 수 있습니까? (0) | 2020.11.24 |
상수 및 휘발성으로 선언 된 포인터 (0) | 2020.11.24 |
rxjs에서 Observable을 가져 오는 가장 좋은 방법 (0) | 2020.11.24 |