我使用Netbeans 8.2进行PHP编码已有很长时间了。现在,我再次在新笔记本电脑上进行设置,并且再次陷入禁用智能缩进的困境。我在Netbeans中找不到任何选项,也在网络上找不到任何提示。
我的目标:我需要自动缩进(在换行符后插入制表符),而不是“智能”缩进,有时会在行首吃掉制表符。
示例:
我在编辑器中键入以下内容(管道|是插入号):
>
当我现在键入结尾的<div>
<?php if(true) { ?>
<div>|
<?php } ?>
</div>
时,智能缩进会在行上执行向后缩进:
11:37:14 AM: Build ready to start
11:37:15 AM: build-image version: 9e0f207a27642d0115b1ca97cd5e8cebbe492f63
11:37:15 AM: build-image tag: v3.3.2
11:37:15 AM: buildbot version: ef8d0929ed0baabafd8bbb7d0b021e1fc24180c0
11:37:16 AM: Fetching cached dependencies
11:37:16 AM: Failed to fetch cache, continuing with build
11:37:16 AM: Starting to prepare the repo for build
11:37:16 AM: No cached dependencies found. Cloning fresh repo
11:37:16 AM: git clone https://github.com/ocebeki/transmess
11:37:18 AM: Preparing Git Reference refs/heads/master
11:37:19 AM: Starting build script
11:37:19 AM: Installing dependencies
11:37:20 AM: Downloading and installing node v10.16.0...
11:37:20 AM: Downloading https://nodejs.org/dist/v10.16.0/node-v10.16.0-linux-x64.tar.xz...
11:37:21 AM:
########################
11:37:21 AM: 34.2%
11:37:21 AM:
########################################################
11:37:21 AM: ################ 100.0%
11:37:21 AM: Computing checksum with sha256sum
11:37:21 AM: Checksums matched!
11:37:23 AM: Now using node v10.16.0 (npm v6.9.0)
11:37:23 AM: Attempting ruby version 2.6.2, read from environment
11:37:25 AM: Using ruby version 2.6.2
11:37:25 AM: Using PHP version 5.6
11:37:25 AM: Started restoring cached node modules
11:37:25 AM: Finished restoring cached node modules
11:37:25 AM: Installing NPM modules using NPM version 6.9.0
11:37:28 AM: npm
11:37:28 AM: ERR!
11:37:28 AM: failed during stage 'building site': Build script returned non-zero exit code: 1
11:37:28 AM: code EINVALIDTAGNAME
11:37:28 AM: npm
11:37:28 AM: ERR! Invalid tag name "^4.12.": Tags may not have any characters that encodeURIComponent encodes.
那是我尝试禁用的烦人行为。
答案 0 :(得分:0)
我不太清楚您所说的“智能”缩进的含义,因此这可能不会达到答案的水平,但是无论如何它太大了,无法发表评论,并且可能会为您指明正确的方向
要为NetBeans上的PHP代码调整缩进设置,请执行以下操作:
然后可以使用各个字段的设置,并查看所做的更改如何影响显示在 Options 屏幕右侧的示例代码。例如:
注意: