Vim编辑器缩进问题,当行的第一个字符是一个锋利的#字符
发布时间:2020-12-16 01:24:56 所属栏目:安全 来源:网络整理
导读:自从第一天使用Vim 3年以来,这个天堂一直在欺骗我.每当我尝试通过Shift当该行的第一个字符以“#”开始时,无论文件类型(.php,.txt等)如何,都不起作用.因为#用于 PHP中的评论,我也用它来装饰文本文件,如: # This is a comment### 1. Instruction one# -------
自从第一天使用Vim 3年以来,这个天堂一直在欺骗我.每当我尝试通过Shift>当该行的第一个字符以“#”开始时,无论文件类型(.php,.txt等)如何,都不起作用.因为#用于
PHP中的评论,我也用它来装饰文本文件,如:
# This is a comment ### 1. Instruction one # ------------ this is an sample -------------- 我在Ubuntu中使用Vim 7.2,使用以下.vimrc设置 syntax on set t_Co=256 set incsearch set hlsearch set number set nowrap set nowrapscan set ignorecase set et set sw=4 set smarttab set smartindent set autoindent set textwidth=0 set noequalalways set formatoptions=1 set lbr set vb set foldmethod=marker 谢谢!
在.vimrc中插入以下内容:
set nosmartindent 这是smartindent,导致以#开头的行不要缩进.您可以通过键入以下内容了解更多信息:help smartindent.如果您使用缩进文件进行python脚本(或任何其他语法),还包括以下内容. filetype indent on (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |