在 BlueJ 中使用硬制表符而不是空格
Use hard tabs instead of spaces in BlueJ
在BlueJ, if a file is using hard tabs BlueJ will automatically convert the entire file to use spaces instead of hard tabs。我正在寻找一种方法来告诉 BlueJ 不要将硬制表符转换为空格。
根据 Replacing Tabs with Spaces(由 BlueJ 的开发者 Michael Kölling 发表),在您第一次输入制表符时,制表符会在默认设置下转换为空格。
If your preference is set to use spaces (i.e. the TAB key is bound to
the 'indent' function, not to the 'insert-tab' function) -- this is the
default -- then the first hit of a TAB key in a newly opened file will
replace all TABs in that file with spaces.
In other words, if you get a file that contains TABs, editing this file
with the BlueJ standard settings should remove TABs from that file. (I
did not want to change the TABs on file-open, because I did not like
the idea of the file changing on disc if you do not actively edit it.)
要更改此设置以便您可以输入实际的 TAB 字符,请转至 选项 > 键绑定,然后 select 编辑功能 从类别下拉列表中。您必须进行两项更改。
向下滚动到缩进。默认情况下,它应该设置为 Tab 键。此设置是默认情况下插入软空间的内容。单击键绑定下的选项卡,然后单击 'Delete Key' 按钮。
向下滚动到 insert-tab。删除现有的键绑定并在此处添加 Tab 键,以便按下该键将插入一个 TAB 字符。
默认设置下的屏幕显示如下。
在那里你可以看到Tab键被设置为'indent'功能,它插入了软空格。进行上述更改将防止这种情况发生。
在BlueJ, if a file is using hard tabs BlueJ will automatically convert the entire file to use spaces instead of hard tabs。我正在寻找一种方法来告诉 BlueJ 不要将硬制表符转换为空格。
根据 Replacing Tabs with Spaces(由 BlueJ 的开发者 Michael Kölling 发表),在您第一次输入制表符时,制表符会在默认设置下转换为空格。
If your preference is set to use spaces (i.e. the TAB key is bound to the 'indent' function, not to the 'insert-tab' function) -- this is the default -- then the first hit of a TAB key in a newly opened file will replace all TABs in that file with spaces.
In other words, if you get a file that contains TABs, editing this file with the BlueJ standard settings should remove TABs from that file. (I did not want to change the TABs on file-open, because I did not like the idea of the file changing on disc if you do not actively edit it.)
要更改此设置以便您可以输入实际的 TAB 字符,请转至 选项 > 键绑定,然后 select 编辑功能 从类别下拉列表中。您必须进行两项更改。
向下滚动到缩进。默认情况下,它应该设置为 Tab 键。此设置是默认情况下插入软空间的内容。单击键绑定下的选项卡,然后单击 'Delete Key' 按钮。
向下滚动到 insert-tab。删除现有的键绑定并在此处添加 Tab 键,以便按下该键将插入一个 TAB 字符。
默认设置下的屏幕显示如下。
在那里你可以看到Tab键被设置为'indent'功能,它插入了软空格。进行上述更改将防止这种情况发生。