[PATCH]: ':marks' implementation
Hi all, Here is implementation of '(evil-show-marks)', hence ':marks'. Seems like there is ex command declared for some time, but without implementation. '(evil-show-marks)' follows Vim-like look displaying mark character, row/column and filename for every buffer. Result will be shown in temporary, *evil-marks* buffer. Although I tested it, another pair of eyes for review and testing will be highly welcome :) Best regards, Sanel
Attached is updated patch: done small formatting fixes and added sorting mark characters. Best, Sanel
Am 02.02.2014 21:48, schrieb Sanel Zukan:
Attached is updated patch: done small formatting fixes and added sorting mark characters.
Thanks. I'm not sure if your implementation does the same as Vim's. AFAIK only capital letters denote global marks and the :marks command should only show those marks that are accessible from the current buffer, i.e. local marks set in the current buffer and global marks. Your implementation collects all marks from all buffers. This means if one has a large number of open buffers then the list would be cluttered with a lot of marks that are local to each buffer, e.g. the '^' mark. Furthermore you do not show global marks at all. I've adapted your patch accordingly and hope it does the right thing. But please check again and change whatever you like ;) You may even consider to support the (optional) ex argument (using (interactive "<a>"), which restricts the list of marks to be shown. Best regards, Frank
Hi, On Mon, Feb 3, 2014 at 8:11 AM, Frank Fischer <[email protected]> wrote:
Thanks. I'm not sure if your implementation does the same as Vim's. AFAIK only capital letters denote global marks and the :marks command should only show those marks that are accessible from the current buffer, i.e. local marks set in the current buffer and global marks.
Yes, you are correct; Vim indeed displays only buffer specific marks. Looks like I overlooked documentation, but also ':help :marks' in Vim is pretty shy about details.
Your implementation collects all marks from all buffers. This means if one has a large number of open buffers then the list would be cluttered with a lot of marks that are local to each buffer, e.g. the '^' mark. Furthermore you do not show global marks at all.
True.
I've adapted your patch accordingly and hope it does the right thing. But please check again and change whatever you like ;)
Just applied and works perfectly! +1 to go.
You may even consider to support the (optional) ex argument (using (interactive "<a>"), which restricts the list of marks to be shown.
Ahh yes, that will make :marks 100% Vim compatible. Can you please add it, just to reduce this patch noise? In case you are busy, I'll send fixed code.
Best regards, Frank
Best, Sanel
participants (2)
-
Frank Fischer -
Sanel Zukan