WezTerm Horizontal/Vertical Split Shortcut on macOS

Abstract: Resolve missing split shortcuts in WezTerm on macOS by adding custom keybindings to wezterm.lua.

Created: 2026-08-04 by

To enable horizontal and vertical splits in WezTerm on macOS, you must define custom keybindings in the wezterm.lua configuration file. The default configuration does not assign these shortcuts, so you need to explicitly map keys like Cmd+Shift+H for horizontal and Cmd+Shift+V for vertical splitting using the launch_split action.

Understanding WezTerm Configuration

WezTerm is highly configurable through a Lua script located at ~/.config/wezterm/wezterm.lua. Unlike many other terminal emulators that rely on hardcoded defaults or simple toggle switches, WezTerm requires explicit definition of actions and their associated key combinations. This approach provides flexibility but means that users cannot expect split functionality to work out of the box without adding specific lines to their configuration file. If you are new to configuring WezTerm, it is helpful to understand that the file is loaded every time the terminal starts. You do not need to restart the application manually after saving changes; WezTerm detects updates automatically. However, if your syntax is incorrect, the terminal may fail to launch or display errors in its log output. Always validate your Lua syntax before applying changes. For more complex configurations involving remote editing or advanced keymaps, understanding the underlying structure is crucial. See our guide on Vim/Nvim: Setting Up Remote Editing for a Project on a Remote Machine for insights into managing complex terminal workflows.

Editing the Configuration File

Open your terminal and navigate to the WezTerm configuration directory. If the file does not exist, create it using a text editor such as nano, vim, or your preferred GUI editor. mkdir -p ~/.config/wezterm nano ~/.config/wezterm/wezterm.lua Once opened, ensure you have the basic initialization code. Most configurations start by requiring the wezterm module and defining an initial configuration table. Your file should look similar to this foundation:
local wezterm = require 'wezterm'

return {
  -- Your configuration options go here
}
This structure is mandatory. Any additions must be placed inside the returned table. Do not place code outside this return statement, as it will not be processed by the terminal emulator.

Defining Split Actions

To create the shortcuts, you need to add two specific actions to the keys array within your configuration table. WezTerm provides built-in actions for splitting panes. You do not need to write custom scripts for this; the library handles the pane management logic. Add the following lines inside the main return table:
keys = {
  {
    key = 'H',
    mods = 'CMD|SHIFT',
    action = wezterm.action{SplitHorizontal={domain='CurrentPaneDomain'}},
  },
  {
    key = 'V',
    mods = 'CMD|SHIFT',
    action = wezterm.action{SplitVertical={domain='CurrentPaneDomain'}},
  },
}
Let's break down what each part does. The key field specifies which character triggers the action. Here, we use 'H' for Horizontal and 'V' for Vertical. The mods field defines the modifier keys required. On macOS, CMD|SHIFT translates to holding down Command and Shift simultaneously. The action field calls the specific WezTerm function to perform the split. SplitHorizontal divides the current pane into top and bottom sections, while SplitVertical divides it into left and right sections. The domain='CurrentPaneDomain' ensures that the split happens relative to the pane you are currently focused on, rather than affecting the entire window layout in unexpected ways. It is important to note that WezTerm does not use mouse-based splitting by default in most standard setups, nor does it reload configuration with F5. Relying on visual cues or keyboard shortcuts defined in the OS level rather than the app itself can lead to confusion. Ensure you are editing the correct file and that your syntax is valid Lua.

Alternative Key Combinations

Some users prefer different shortcuts to avoid conflicts with existing system commands. For example, you might choose CMD+B for vertical and CMD+D for horizontal. To change this, simply modify the key values in the table above. Be cautious when choosing common letters like 'C' or 'V' as they may conflict with copy and paste operations unless you also override those bindings. If you find yourself needing to manage multiple terminal sessions or connect to remote servers frequently, having efficient split navigation is vital. While this article focuses on local splitting, the principles of keybinding customization apply equally to remote workflows. For deeper insights into terminal automation, you might explore how others handle API integrations in their daily command line tasks, as discussed in Can Anyone Use Google API for MacOS Terminal Command Line?.

Verifying the Setup

After saving the wezterm.lua file, open a new instance of WezTerm. Try pressing Command+Shift+H. You should see the current pane divide horizontally. Press Command+Shift+V to split vertically. If nothing happens, check the WezTerm log for syntax errors. You can view logs by running wezterm debug-log in another terminal session or checking the console output if launched from a shell. Common issues include typos in the key names or missing commas between table entries. Lua is sensitive to syntax, so even a small error can prevent the configuration from loading. If you encounter persistent issues, try resetting your configuration to the minimal example provided earlier and gradually re-add your settings to isolate the problem.

Advanced Pane Navigation

Once you have created splits, navigating between them efficiently is just as important as creating them. WezTerm allows you to switch focus between panes using additional keybindings. You can add commands to move left, right, up, or down.
  {
    key = 'LeftArrow',
    mods = 'CTRL',
    action = wezterm.action{ActivatePaneDirection='Left'},
  },
  {
    key = 'RightArrow',
    mods = 'CTRL',
    action = wezterm.action{ActivatePaneDirection='Right'},
  },
Combining split creation with rapid navigation creates a powerful workflow for developers who need to monitor logs, run tests, and edit code simultaneously. This setup eliminates the need to constantly adjust window sizes or switch tabs manually.

Frequently Asked Questions

Why doesn't my config change take effect immediately?

WezTerm typically auto-reloads the configuration file upon saving. If it does not, ensure there are no syntax errors preventing the file from parsing. Check the debug log for specific error messages indicating where the syntax failed.

Can I use mouse clicks to split panes instead of keyboard shortcuts?

While WezTerm supports some mouse interactions, relying on them for splitting is not standard practice and may be disabled by default. It is recommended to stick to keyboard shortcuts for consistency and speed across different environments.

What if I want to close a split pane?

You can close the active pane by pressing Ctrl+D (or Cmd+D if mapped) to send the exit signal, or by using the CloseCurrentPane action in your keybindings. This removes the pane and redistributes space among remaining siblings.

Does this configuration work on Linux and Windows?

The Lua configuration file is cross-platform. However, the modifier keys differ. On Linux, use ALT|SHIFT or SUPER|SHIFT depending on your desktop environment. On Windows, use CTRL|SHIFT.

How do I reset my keybindings to default?

To revert to defaults, simply delete or comment out the keys array in your wezterm.lua file. WezTerm will then fall back to its internal default mappings for splitting and navigation.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More