You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在Visual Studio Code中设置COBOL的tabStops?

Configuring Multiple Tab Stops for COBOL in VS Code

Hey there! I totally get this frustration—COBOL’s fixed format relies on those specific tab stops (6,7,8,12,72) for proper alignment, and it’s annoying when the default single tabSize setting doesn’t cut it. Let’s walk through exactly how to set this up, depending on the COBOL extension you’re using:

Step 1: Identify Your COBOL Extension

First, confirm which VS Code COBOL plugin you have installed—most popular ones support multi-column tab stops, but the setting names vary a bit:

For IBM Z Open Editor (Most Common for Enterprise COBOL)

  • Open VS Code settings (press Ctrl+, on Windows/Linux, Cmd+, on Mac)
  • In the search bar, type ibmz-open-editor formatting tab stops
  • You’ll see a field labeled IBM Z Open Editor > Formatting: Tab Stops—enter your desired values as a comma-separated list: 6,7,8,12,72
  • Save the settings, and open a fixed-format COBOL file to test: pressing Tab should jump to the next specified column.

For Micro Focus COBOL Extension

  • Open settings and search for cobol editor tab stops
  • Look for the COBOL > Editor: Tab Stops setting, then input your comma-separated values: 6,7,8,12,72

Step 2: Manual JSON Configuration (If You Prefer)

If you’d rather edit the settings.json file directly (sometimes faster for power users):

  1. Open the command palette with Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac)
  2. Select Preferences: Open Settings (JSON)
  3. Add the appropriate line based on your extension:
    • For IBM Z Open Editor:
      "ibmz-open-editor.formatting.tabStops": [6,7,8,12,72]
      
    • For Micro Focus COBOL:
      "cobol.editor.tabStops": [6,7,8,12,72]
      
  4. Save the file, and your tab stops will take effect immediately.

Important Note: Fixed Format Mode

Make sure your COBOL file is set to Fixed Format (not Free Format)—multi-column tab stops only apply to fixed-format COBOL. You can check/switch this in the bottom-right corner of the VS Code window (look for the file format label, e.g., COBOL (Fixed)).

If You Still Can’t Find the Setting

  • Update your COBOL extension to the latest version—older versions might not have this feature.
  • Double-check that you’re looking in the extension-specific settings, not the general VS Code editor.tabSize (which only controls single-tab width, not multi-column stops).

内容的提问来源于stack exchange,提问作者Morepork

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 09:36:19