Sublime Forum

Edit gitignore in merge?

#1

hi,

Is there currently a way to edit .gitignore from within Sublime Merge? I have some folders to ignore, I can see modified files, untracked and staged ones.

0 Likes

#2

There is a Tools > Edit .gitignore... menu entry that will open the file in your editor so you can edit it.

2 Likes

#3

There is no valid context key listed in the documentation (click me).
I need this very often. Is there a way to map this to a key binding or command palete?

[
    {
        "caption": "GitIgnore: Edit",
        "command": "...?"
    }
]
0 Likes

#4

From Default/Main.sublime-menu, the menu entry is defined as:

{
    "caption": "Edit .gitignore…",
    "command": "open_in_editor",
    "args": {
        "path": "$working_dir/.gitignore", "line": "$line", "col": "$col",
        "default": "# Specify filepatterns you want git to ignore.\n\n"
    },
},
3 Likes