Save All command in Almighty-Toolbar Button?


#1

Hi,
I’m using Almighty-Toolbar and would like to create a button to SAVE ALL…

I already have the following button which saves a single file, but am not sure what code I need to save all?

@toolBar.addButton
        'icon': 'check'
        'callback': 'core:save'
        'iconset': 'fa'

I have already tried:

'callback': 'core:saveall'
'callback': 'core:save-all'
'callback': 'core:saveAll'

Can anyone help?

Thank you all in advance.


#2

Try 'callback': 'window:save-all'.

Explanation of how I found this:
‘Save All’ is available in the File menu and shows it has a keybinding, Ctrl+Alt+S in my case. I opened the Key Binding Resolver (Ctrl+. on Windows) and pressed the keys corresponding to the ‘Save All’ keybinding. The first column in the panel shows the command.


#3

Thank you - that worked :slight_smile:


#4

I’m trying to do the same - add a save-all button. I tried to add the button per the description on the readme file. I’m new to this so I know I don’t know what to do.
I created the file “custom_entries.js” (also tried “custom_entries.coffee”), in a folder in the .atom folder.
The file contains:

module.exports = [
  {
    type: 'button',
    tooltip: 'Save All',
    callback: 'window:save-all',
    icon: 'archive',
    iconset: 'ion'
  }
]

I added the folder path to the custom entries file setting.

The new button does not show up.

Thanks for any help.


#5

FWIW, my package command-toolbar let’s you put any command in a new small toolbar. It’s not pretty but very useful. You can also put files in it.


#6

Thanks for the suggestion Mark. I like your package and will keep it in mind. It turns out that I figured out how to add the save-all button and get it placed in the right location. I just need a good “save-all” icon. I could not find one of them in the icon sets that tool-bar provides.