vim-强制>&燃气轮机;使用空格而不是制表符
我在my.vimrc上有以下设置:vim-强制>&燃气轮机;使用空格而不是制表符,vim,Vim,我在my.vimrc上有以下设置: set softtabstop=4 set shiftwidth=4 set tabstop=4 set expandtab 我也在使用tpope的sensible.vim插件 当我使用>>缩进时,它使用的是制表符而不是空格 如何让>>插入空格 下面是:set的输出 :set --- Options --- ambiwidth=double binary history=1000 nrformats=hex
set softtabstop=4
set shiftwidth=4
set tabstop=4
set expandtab
我也在使用tpope的sensible.vim插件
当我使用>>缩进时,它使用的是制表符而不是空格
如何让>>插入空格
下面是:set的输出
:set
--- Options ---
ambiwidth=double binary history=1000 nrformats=hex scrolloff=1 smarttab tabpagemax=50 ttyfast
autoindent display=lastline incsearch number shiftwidth=4 softtabstop=4 tabstop=4 ttymouse=xterm2
autoread noendofline laststatus=2 ruler showcmd suffixesadd=.js ttimeout wildmenu
background=dark helplang=en nomodeline scroll=20 sidescrolloff=5 noswapfile ttimeoutlen=100 t_Co=16
backspace=indent,eol,start
complete=.,w,b,u,t
fileencodings=ucs-bom,utf-8,default,latin1
fileformats=unix,dos,mac
guioptions=aegimrLt
listchars=tab:> ,trail:-,extends:>,precedes:<,nbsp:+
printoptions=paper:letter
runtimepath=~/.vim,~/.vim/bundle/syntastic,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim74,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,~/.vim/after
sessionoptions=blank,buffers,curdir,folds,help,tabpages,winsize
suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc
tags=./tags;,./TAGS,tags,TAGS
viminfo=!,'100,<50,s10,h
:设置
---选择权---
ambiwidth=double binary history=1000 nrformats=hex scrolloff=1 smarttab tabpagemax=50 ttyfast
自动缩进显示=lastline InSearch number shiftwidth=4 softtabstop=4 tabstop=4 ttymouse=xterm2
自动读取noendofline laststatus=2标尺showcmd SUFFEXESADD=.js ttimeout wildmenu
背景=黑色帮助lang=en nomodeline scroll=20 sidescrolloff=5 noswapfile ttimeoutlen=100 t_Co=16
退格=缩进、下线、开始
完整=,w,b,u,t
文件编码=ucs bom,utf-8,默认值,拉丁文1
文件格式=unix、dos、mac
guioptions=aegimrLt
listchars=tab:>,trail:-,extensed:>,在前面:某物有:设置[local]noexpandtab
。这可以通过插件或文件类型插件实现。您可以通过:verbose setlocal expandtab?
找到(特定缓冲区的)
对于插件,您可以在其获得源代码后重新设置选项:
autocmd VimEnter * set expandtab
对于文件类型插件,您可以覆盖~/.vim/after/ftplugin/.vim
中单个文件类型的设置,或者通过注释~/.vimrc中的:filetype plugin on
来完全关闭它们。您能告诉我们:set
的输出是什么吗?最好是在出现此问题的文件中?当您放弃加载sensible.vim时会发生吗?感谢详细的setlocal expandtab?测试。它说expandtab是在my.vimrc中设置的。关闭vim并重新打开后,它现在开始工作。我想我可能只是找到了文件的来源。事实上,似乎autocmd VimCenter*set expandtab是我的答案。