Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Function SeparatorsNew to Visual Studio Code? Get it now.
Function Separators

Function Separators

eridien

|
5 installs
| (0) | Free
Add simple comment line separators above each function to make them stand out. Also jump between the separators.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Overview

This extension adds simple comment line separators above functions to make them stand out. You can also jump between the separators which gives you an easy way to visit just the important functions.

Intro GIF

Separator Appearance

The settings allow for highly customizable separator appearances. Here are some examples. They were generated for this function: function setSelLimits (editor) {...}.

//​​​​‍================= Set Sel Limits ==================

//​​​​‍((((((((((((((((( SET SEL LIMITS ))))))))))))))))))

//​​​​‍ => => => => => => SET SEL LIMITS <= <= <= <= <= <= 

//​​​​‍>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Set Sel Limits

           //========= Set Sel Limits =========

//​​​​​❌❌❌❌❌❌❌❌ SET SEL LIMITS ❌❌❌❌❌❌❌❌

Languages Supported

Currently Javascript, Typescript, Python, C, C++, Java, C#, Go, and Rust are supported. Put in your vote for new languages to add in the repo issues.

Functions are found for a language using a syntax tree generated by the tree-sitter module. They can be functions, function expressions, methods, even arrow functions. Classes are also supported like functions.

Commands

  • Insert separators: Adds separators to functions inside the selections. If the selection is zero-width then all functions in the file are marked. The default keybinding is ctrl-alt-shift-/.

  • Remove separators: Removes separators inside selections. If the selection is zero-width then all separators in the file are removed. The default keybinding is ctrl-alt-shift-'.

  • Jump to next separator: The separator below the current one is shown at the top of the window by jumping. This shows as much of the function as possible. It optionally will jump to the next file when passing the bottom. The default keybinding is ctrl-alt-shift->.

  • Jump to previous separator: Also jumps but to the previous separator. The default keybinding is ctrl-alt-shift-<.

Separator Magic

There are invisible zero-width chars hidden immediately after the comment marker like //...===== xxx ===== where ... are invisible characters. This enables several features ...

  • The extension is able to tell separators apart from existing comments. This makes it possible for the remove command to delete only comments that were added by the extension and not old ones. Also if editing corrupts the separator the resulting garbage is automatically removed.

  • Those invisible characters also encode the height of the blank area that was replaced by the separator. This means that the delete command restores the original text and any git diff is cleared.

Settings

  • Minimum Function Height: Only add separators to functions with at least this many lines of code. Default: 3.

  • Include Nested Functions: When enabled, add separators to nested functions. Default: false.

  • Blank Lines Above: Number of blank lines to add above the function separator. Default: 1.

  • Blank Lines Below: Number of blank lines to add below the function separator. Default: 1.

  • Separator Left Fill String: The string repeated to the left of the function name. It may be multiple characters. Default: "=".

  • Separator Right Fill String: The string repeated to the right of the function name. It may be multiple characters. Default: "=".

  • Separator Indent: Number of spaces to indent the function separator. -1 means match the function's indent. Default: 0.

  • Width of Separator: Total width of the function separator including indentation. -1 means match the widest line in the file. Default: 80.

  • Split Function Name: Split the function name into multiple words by _ and camelcase. Default: true.

  • Function Name Case:

    • Original: Keep the original case of the function name.

    • Lowercase: Convert entire function name to lowercase.

    • Capitalize: Capitalize each word in the function name.

    • Uppercase (default): Convert entire function name to uppercase.

  • Jump Between Files: Jump to the next file when passing the end of the current file instead of wrapping to the top of the current file. Default: false.

Author: Mark Hahn (eridien)

Marketplace: https://marketplace.visualstudio.com/items?itemName=eridien.vscode-function-separators

Open VSX: https://open-vsx.org/extension/eridien/vscode-function-separators

Repo: https://github.com/mark-hahn/vscode-function-separators.git

Original Release: September 2025

License: MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft