xahlee / xah-fly-keys

the most efficient keybinding for emacs
http://xahlee.info/emacs/misc/xah-fly-keys.html
469 stars 80 forks source link

`xah-beginning-of-line-or-block': tabs/spaces #148

Closed ghost closed 1 year ago

ghost commented 2 years ago

Don't skip over tabs/spaces, when they are the only things on that line.

This shows why I think it should be like this. Have your cursor under "Fifth line." and run `xah-beginning-of-line-or-block'. The cursor will now move under "First line.", skipping all the lines in between.

First line.

Second line.

    Third line.

    Forth line.

Fifth line.
xahlee commented 1 year ago

the current code always does what your explaination above do. Namely the current code (with \n\n+) will find backward on two empty lines.

the code you added, which is the way it was, will not skip multiple empty lines that has a tab or space in them. This is not in your example.

anyway, going to merge ur code.