forgecrafted / rulerz

[Looking for maintainer] A simple Atom package to mark your cursor position with a ruler.
MIT License
6 stars 7 forks source link

toggle the ruler by hotkey #18

Closed ghost closed 7 years ago

ghost commented 8 years ago

Hi, thanks for sharing this awesome package.

I'd like to request a feature if possible. I don't want to see rulerz all the time. Only when I want to check if my code is lining up.

I'd really appreciate if rulerz added a function that can be activated by hotkey.

Here's an example

'atom-text-editor':
  'ctrl-q': 'toggle-quotes:toggle'
  'ctrl-r': 'rulerz:2000'
  'ctrl-shift-r': 'rulerz:0'

Where the number provided to rulerz is a timeout in milliseconds. So if I provide a 2 second timeout, then the ruler will disappear after 2 seconds, if I provide zero then it toggles on or off, permanently.

If it's difficult accept an unknown number of milliseconds as a parameter, then options for 1-9 seconds would be a great plan B, like this: 'ctrl-r': 'rulerz:2' meaning 2 seconds, 'ctrl-r': 'rulerz:3' meaning 3 seconds, etc.

cmtonkinson commented 7 years ago

Hi @lope. Thanks for using Rulerz, I'm glad you find it useful. I don't have much time to add new features to the plugin, but if you're passionate about adding a toggle feature (I suspect many other people would use this as well) I'd be happy to work with you on accepting a pull request.