当前位置: 技术问答>linux和unix
vim 编辑makefile文件时,怎么才能让tab不要被转换为空格呢?
来源: 互联网 发布时间:2017-01-28
本文导语: 在vimrc里了加了这一行 autocmd FileType makefile set noexpandtab 为什么编辑makefile时输入tab还会被转成空格。 Here is my .vimrc: set nocompatible source $VIMRUNTIME/vimrc_example.vim source $VIMRUNTIME/mswin.vim "behave mswin syntax on set expa...
在vimrc里了加了这一行
autocmd FileType makefile set noexpandtab
为什么编辑makefile时输入tab还会被转成空格。
Here is my .vimrc:
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
"behave mswin
syntax on
set expandtab "使用空格代替tab.
set tabstop=4
set shiftwidth=4
autocmd FileType makefile set noexpandtab
set autoindent
set cindent
set nu
set diffexpr=MyDiff()
set nobackup
let &termencoding=&encoding
autocmd FileType makefile set noexpandtab
为什么编辑makefile时输入tab还会被转成空格。
Here is my .vimrc:
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
"behave mswin
syntax on
set expandtab "使用空格代替tab.
set tabstop=4
set shiftwidth=4
autocmd FileType makefile set noexpandtab
set autoindent
set cindent
set nu
set diffexpr=MyDiff()
set nobackup
let &termencoding=&encoding
|
autocmd FileType make set noexpandtab
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。