Giter Site home page Giter Site logo

Comments (8)

RickStrahl avatar RickStrahl commented on June 6, 2024

No there's not at the moment. Only on the context menu.

There's no really a menu that works for this because the option is only conditionally available when you are already sitting on a table and it's very expensive to check whether you are (a bunch of parsing has to happen).

I think what I will do though is an entry in the Control Palette so you'll be able to use Ctrl-Shift-P - Format Table to get to it. Currently there's only Insert Table on the Command Palette and it probably needs Edit Table and Format Table to be added.

from markdownmonster.

bcmadsen avatar bcmadsen commented on June 6, 2024

Finding an entry in the ctrl-shift-p list seems like more keystrokes than the options I already have now. Are we sure that adding accelerators (that is, underlining one of the letters) to the Shift-F10 popup menu isn't a possibility? That really seems like the quickest way to get to where I want to go, to be honest. Shift-F10 then F (or whatever other letter you think makes the most sense), would work really well, I'd say.

image

from markdownmonster.

RickStrahl avatar RickStrahl commented on June 6, 2024

Command Palette is pretty quick once you start using it more often. These days I use only core shortcuts (ctrl-b/i etc.) for everything else that's more complicated I go straight to the Command Palette. Between the Hot Key a few letters for hotkeying and downarrow to nav, it's very quick. Certainly quicker than trying to remember or work with complex key chords (which unfortunately don't work very well due to WebView keyboard handling issues).

Here's what the Format Table functionality looks like using the Command Palette:

CommandPaletteFormatTable

This update's in 3.1.17.1+

from markdownmonster.

RickStrahl avatar RickStrahl commented on June 6, 2024

I've just added improved support for custom keybindings that can be mapped against commands that aren't explicitly mapped into the keybindings manager. This basically allows mapping any commands that exist.

For example, in 3.1.17.3 and later you can add commands like this in MarkdownMonster-KeyBindings.json:

  {
    "Id": "FormatTable",
    "Key": "Ctrl-Shift-Q",
    "CommandName": "FormatTable",
    "CommandParameter": null
  },
  {
    "Id": "EditTable",
    "Key": "Ctrl-Shift-W",
    "CommandName": "EditTable",
    "CommandParameter": null
  }

This will allow you to map a direct keyboard shortcut and it works for the two commands above.

The trick is finding key combinations that are available and that you can actually remember (I used arbitrary keys here in order to avoid interference with existing commands).

from markdownmonster.

bcmadsen avatar bcmadsen commented on June 6, 2024

Thank you so much!

I ended up using keys F9 and F10, because I don't see those used anywhere else, and it's working splendidly.

(My only bit of possibly negative feedback: I noticed that editing the MarkdownMonster-KeyBindings.json file inside MM doesn't seem to stick at first, which came as a surprise. At first, I made the changes you discussed above but with F9 and F10, then thought I had closed and saved them, and was surprised to find that the KeyBindings file reverts to what it was before I made changes to it. I found myself needing to open that JSON file in another editor, other than MM, and then I needed to continually save it in its changed form while I opened a Markdown text file in MM and closed both the document and MM again, in order to get the change to stick. Otherwise that keybindings file would revert against my wishes. With this subterfuge, I have succeeded in getting the file to stay changed, and now I love being able to format my tables this way. Thank you again!)

from markdownmonster.

RickStrahl avatar RickStrahl commented on June 6, 2024

Yeah I noticed that as well, and I have it on my list to try and pin that down. In theory, keybindings should load when the application starts and immediately save to root out any non-matching or invalid entries. So in that case editing and saving should just save and then load on the next restart.

Somehow though it appears that the keybindings are saving at another time...

from markdownmonster.

RickStrahl avatar RickStrahl commented on June 6, 2024

Take a look a 3.2.1.

You should now be able to make a key binding change and see that change immediately applied - assuming you use a key that's not already in use.

Save now:

  • Writes the file
  • Clears existing bindings
  • Reloads and applies all bindings from saved file

from markdownmonster.

bcmadsen avatar bcmadsen commented on June 6, 2024

Thank you for all of that. I have 3.2.1 now, and I am happy to confirm that it resolves the issue I was having with the earlier build.

Thank you again.

from markdownmonster.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.