Sublime Forum

Allow organizing User files in sub directories

#1

I’m pretty sure this has been asked already in the past, but I couldn’t find anything via the forum search, so here goes. My User directory has grown quite a bit, to the point that it’s getting difficult to manage. As of today it consists of 95 files (and still growing)!

~/svn/sysconf {dev}$ ls home/.config/sublime-text/Packages/User/
__pycache__                        git_log.py                                          quick_find.py
ANSIescape                         git_show.py                                         refresh.py
Log Highlight                      git_squash.py                                       reindent.py
Projects                           git_stash.py                                        rm_comments.py
snippets                           git_status.py                                       save_cursor_positions.py
tests                              GitGutter.sublime-settings                          scroll.py
__init__.py                        github.py                                           selection.py
Adaptive.sublime-theme             goto.py                                             sidebar.py
builds.py                          increase_decrease.py                                Side Bar.sublime-menu
C.sublime-settings                 INI.sublime-settings                                SingleTrailingNewLine.sublime-settings
clear_console.py                   linters.py                                          smart_goto.py
Color Highlight.sublime-settings   list_all_cmds.py                                    smart_paste.py
create_snippet_from_sel.py         LSP-bash.sublime-settings                           smart_wrap_text.py
Default (Linux).sublime-keymap     LSP-pyright.sublime-settings                        status_bar.py
Default.sublime-commands           LSP.sublime-settings                                SublimeLint.sublime-settings
Default.sublime-theme              Monokai.sublime-color-scheme                        SublimeLinter.sublime-settings
Default Dark.sublime-theme         Monokai.tmTheme                                     Tab Context.sublime-menu
Distraction Free.sublime-settings  Monokai Pro (Filter Spectrum).sublime-color-scheme  tabs.py
edit_settings.py                   move_focus.py                                       Terminus.sublime-settings
events.py                          Origami.sublime-settings                            toggle.py
exec_last_cmd.py                   OverrideAudit.status                                TOML.sublime-settings
file.py                            Package Control.sublime-settings                    unittesting.json
FileHistory.sublime-settings       Package Control.user-ca-bundle                      utils.py
find_results.py                    PanePane.sublime-settings                           utils_base.py
Flake8Lint.sublime-settings        Preferences.sublime-settings                        utils_command.py
Git.sublime-settings               prettify.py                                         utils_db.py
git_branches.py                    pydoc.py                                            utils_git.py
git_checkout.py                    Pylinter.sublime-settings                           utils_input.py
git_commit.py                      pylinters.py                                        utils_settings.py
git_diff.py                        pypaths.py                                          utils_ui.py
git_files.py                       Pytest This.sublime-build                           utils_view.py
git_grep.py                        Python.sublime-settings                             

It would be nice if ST allowed to organize User files in sub directories. I suppose this could be achieved via a new setting/preference such as:

    // A list of sub-directories relative to the User/* directory where
    // ST will look for plugins, themes, settings, etc.
    "user_sub_directories": [
        "keymaps",
        "settings",
        "color-schemes",
        "themes",
        "plugins",
        "builds",
        "menus",
    ]

It must be noted that ST already allows to put snippets in a separate directory (e.g. User/snippets/*).

Thoughts?

0 Likes

#2

Settings, keymaps, … are picked up from sub directories, too.

It’s just the plugins which may require some extra work to expose all API classes to ST. Or maybe just create a “User Plugins” package to group them. I have a “Default Extended” for instance, which contains everything which should be default behavior.

The main issue is location of settings, keymaps, mousemaps and various other package/plugin related resources is controlled by plugins themself. And those put all user relevant files directly into User package. There’s little ST core can do about it.

0 Likes

#3

You can put all of your plugins in a separate folder in the Packages/ directory (That’s what I do). As long as they are at the top level, everything will still continue to work.

1 Like