neovim:写 ^I 而不是 tab

neovim:写 ^I 而不是 tab

我尝试了插件vim-indentguides但效果不佳,所以我决定使用删除它插头。卸载后是nvim写入^I而不是tabs。我该如何解决它?

这是我的 init.vim 和问题的演示:

" PLUGINS
call plug#begin()
^IPlug 'vim-airline/vim-airline'
^IPlug 'vim-airline/vim-airline-themes'
^IPlug 'SirVer/ultisnips'
^IPlug 'honza/vim-snippets'
call plug#end()
 
" TABS
set tabstop=4 shiftwidth=4^I" set tab size to 4 spaces
set autoindent smartindent ^I" make intending a bit more clever
filetype plugin indent on
 
" UI
set cursorline  ^I^I^I" highlight the current line
set nu ^I^I^I^I^I^I" line numbering
" set signcolumn=numbers^I^I" merge number and signs in to one column
set scrolloff=4^I^I^I^I" show at least 4 lines above or below
set list!^I^I^I^I^I" visualize tabs
"set listchars=tab:>-^I^I" set tabs to >--- a
set listchars=trail:~" ^I^I" trail spaces to ~
 
" CODING
syntax on^I^I^I^I^I" highlight syntax
set colorcolumn=88  ^I^I" ruler python convention
 
" EDITOR BEHAVIOR
"set nowrap       ^I^I^I" disable word wrapping
set linebreak    ^I^I^I" break on words only if wrap is enabled
set breakindent  ^I^I^I" indent broken lines only if wrap is enabled
nnoremap j gj
nnoremap k gk
 
" PERFORMANCE AND SECURITY
set lazyredraw  ^I^I^I" redraw only when it is necessary
set ttimeoutlen=0  ^I^I^I" set delay after exiting visual mode to 0
set autoread  ^I^I^I^I" automatically read files when reloaded outside Nvim
set autochdir ^I^I^I^I" automatically change directory to current file
set undofile^I^I^I^I" undo backup

" COMMANDS
set showcmd   ^I^I^I^I" shows last issued command
set wildmenu  ^I^I^I^I" show command suggestions

" SPELL CHECKING
command Sc   :set spell spelllang=cz,en_us
command Sccz :set spell spelllang=cz
command Scen :set spell spelllang=en_us
command Scno :set nospell

感谢您的帮助

答案1

从您的配置文件:

set list!^I^I^I^I^I" visualize tabs

如果您不想可视化选项卡,请不要设置该list选项。要关闭当前会话中选项卡的可视化,请:set nolist交互使用。

相关内容