#9 make bracket jumping/highlighting more like GNU Emacs

已關閉
nuclearkev1 年之前創建 · 2 條評論

In GNU Emacs, you jump to a bracket by having the cursor after it when on the closing bracket. C-M-f/C-M-b also perform wright/wleft if no bracket is nearby.

In GNU Emacs, you jump to a bracket by having the cursor _after_ it when on the closing bracket. C-M-f/C-M-b also perform wright/wleft if no bracket is nearby.

Also, jumping to matching bracket should take you after the closing bracket as well.

Also, jumping to matching bracket should take you _after_ the closing bracket as well.
nuclearkev1 年之前 重新開啟

I've decided to instead do something else for this. I only highlight pairs of brackets when you're on the matching pair - I think this is less confusing than the Emacs way. The same goes with the jump to bracket - only jump to the matching pair. The only thing that I added in to close this issue is that if there is a region marked (curbp->b_mark != NOMARK) that it will go 1 point past the closing bracket. This is because 99% of the time when I have a region selected I want to cut or copy the entire thing, including the brackets. (Commit 0ec0fef74a)

I've decided to instead do something else for this. I only highlight pairs of brackets when you're on the matching pair - I think this is less confusing than the Emacs way. The same goes with the jump to bracket - only jump to the matching pair. The only thing that I added in to close this issue is that if there is a region marked (`curbp->b_mark != NOMARK`) that it will go 1 point past the closing bracket. This is because 99% of the time when I have a region selected I want to cut or copy the entire thing, including the brackets. (Commit 0ec0fef74a388c2557eca7d245e4e2c73f147197)
登入 才能加入這對話。
正在加載...
取消
保存
尚未有任何內容