Fast move between blocks


#1

Hi,
in vi i often use curly brackets to move between “blocks” of code (next / previous empty line). Without having to rely on vi mode, is there any shortcut (or package that implements it) that allows fast-moving between blocks of code?

Thanks


#2

I found this package while poking around:

But looking at the README, it seems like you can do this in Atom if you add some keybindings (/cc https://github.com/efatsi/block-travel#block-travel-package) in your keymaps file e.g.:

'.editor':
  'alt-up': 'editor:move-to-beginning-of-previous-paragraph'
  'alt-down': 'editor:move-to-beginning-of-next-paragraph'
  'alt-shift-up': 'editor:select-to-beginning-of-previous-paragraph'
  'alt-shift-down': 'editor:select-to-beginning-of-next-paragraph'

I wasn’t sure if the commands were for prose specifically but trying it out in a JavaScript file, the behavior seems pretty similar?


#3

This works beautifully, thanks :slight_smile: