FW: saving file position, bracket matching extension



Hi!

[posting without the patches - patches are larger than 40kB, so the
posting was not allowed - during the time it will be enabled to post to
the list, you can download it from: http://www.wish.hu/mc_patch.tar.gz]

I've attached my patches. The archive contains the files have been
patched (both the original and the patched version), an udiff file for
the difference, and two other separated by functions (saving file
position, bracket matching).

The original files are based on the "2002-11-20-17" snapshot, except the
edit/editoptions.c file that based on the CVS version (Pavel told me to
do this way). Actually, I used to compile the snapshot version with the
CVS-editoptions.c and it worked (the changes was just optimizations).
I'm using the pathed version during my daily work, and I expected no
problem with them.

The new functions (both extends editor's funcionality):

--
Bracket matching extended version:
--
The new bracket matching, if you are on or after a bracket, highlights
the opening and closing brackets, too.   By the new way, it helps you to
find the opening bracket during you type your program, you don't have to
go back to the closing bracket you have typed if you are after it.

A future extension can be to highlight the brackets always, if you are
somewhere between two brackets (just the two brackets you are most
closer to). An other way to extend it a key-combination that selects
everything from the opening bracket to the closing bracket, if you are
between two brackets and press the key. (Alt-B can work like this, if
you are not on a bracket?).

--
File position saving:
--
When you are developing, and you should edit several files, you have to
leave and enter again into files. It can be a lot of time to go back to
the position where you were, when you reenter into the file you would
like to edit again. This option (you can set/unset in editor's
configuration) turns on file position saving, so if you reenter a file,
your cursor will be at the position where you were last time.

The positions are saved in the file "EditPos" in you mc configuration
dir (~/.mc/). The last 1024 file's full name, x;y position is stored on
each line. When you leave the editor, this file will be modified. When
you edit the file, it will be opened again. Locking not necessary, just
if more than one person using the computer at the same time with the
same user. You are unable to do exiting two editor at the same moment.

If you have any other question or wish that helps these functions to
include into the CVS, please tell me!

Bye,
  Andras





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]