IntelliJ/GoLand Keymap设置:如何实现向上/向下跳转x行?
How to Set Up "Jump X Lines Up/Down" in GoLand (and IntelliJ IDEA)
Hey there! Since you're switching from Sublime to GoLand, I totally get how crucial it is to bring over those time-saving shortcuts you rely on. Let's break down exactly how to set up this line-jump functionality—since GoLand shares the same keymap system as IntelliJ IDEA, these steps work for both:
Step 1: Open the Keymap Settings
- Launch GoLand, then head to
File > Settings(useCtrl+Alt+Son Windows/Linux,Cmd+,on macOS for a quicker shortcut). - In the settings window, either navigate to the
Keymapsection manually or type "Keymap" in the top search bar to jump straight to it.
Step 2: Locate the Built-In Line-Jump Actions
- In the Keymap search box, type
Move Caretto filter relevant actions. You'll immediately see two key options:Move Caret X Lines UpMove Caret X Lines Down
These are exactly the actions you need—they let you jump a fixed number of lines in either direction, just like Sublime's equivalent shortcut.
Step 3: Assign Your Preferred Shortcuts
- Right-click on
Move Caret X Lines Up, then selectAdd Keyboard Shortcut. - A small input window will appear. Press the shortcut combination you want to use (for example, if you used
Ctrl+Upin Sublime, you can set that here). If the shortcut is already in use, GoLand will warn you—just pick another free combination or reassign the conflicting shortcut if you don't need it. - Click
OKto save. Repeat this process forMove Caret X Lines Down(e.g.,Ctrl+Down).
Step 4: Customize the Default Jump Count (Optional)
- If you want to change how many lines the shortcut jumps by default, go to
File > Settings > Editor > General(or search for "Caret Movement" in the settings search bar). - Look for the option labeled
Number of lines to move when using Move Caret X Lines Up/Down—adjust this number to your preference (5, 10, or whatever fits your workflow best).
Quick Note for Older Versions
- In rare cases, if you're using an older GoLand/IntelliJ build, these actions might be named slightly differently. If you can't find them, double-check your search terms or ensure your IDE is updated to the latest version—most recent releases include these built-in actions.
内容的提问来源于stack exchange,提问作者oren
相关产品推荐
相关产品推荐

