Re: mcedit bug
- From: Matthias Urban <murban mail CS Uni-Magdeburg De>
- To: mc-devel gnome org
- Subject: Re: mcedit bug
- Date: Tue, 11 Dec 2001 15:15:13 +0100
Hi Steef,
> By the way, optimally, I would like it to add something like this:
> #if FAST_COPY_TECHNIQUE
> .
> .
> .
> #endif /* FAST_COPY_TECHNIQUE */
>
> where "FAST_COPY_TECHNIQUE" is given as the argument of the user
> function.
This is quite better, of course. By the way, what do you think about the
`turn to uppercase' command? Ok, it is designed for german, but there is
also a problem: `sed' doesn't know `\U' (turn to _U_ppercase) in
contrast to `ex'. And `awk' has a function `toupper()'. But only `sed'
seems to handle the input as a stream, so that newlines can be part of a
match. The problem is, that using `ex' or `awk' always results in a
trailing newline or newlines are cutted :-(. The `awk' script would look
about like this:
---
awk "{ print toupper($0); }" inputfile
---
and the `ex' script like this:
---
ex "+:s/.*/\U&/g" "+:w! outputfile" "+:q" inputfile
---
Does you know a better solution than the `sed' script? Because I really
think that `turn to uppercase' is a useful thing.
> No, it's better to insert a newline, but only if the cursor is not on
> the start of the line. The problem is, that you cannot know this from
> the $TEMPFILE
> ...
> Exactly! This should work. However, if started on empty lines, there
> will be a couple of unnecessary empty lines.
> Also, putting them in, is easy. But how do you get the extra "\n"'s out?
> There is off course no telling whether the original file had these extra
> "\n"'s....
That's right, I also saw this problem, and I think that inserting a
newline
if the cursor is not on the start of a line is the best solution,
because on the other hand, removing an unwanted newline should be no
problem for the user ;-)
> > PS: Is `word completion' within the editor a subject for you at all?
> ? what do you mean by `word completion` do you mean that when I type
> ret<ALT-TAB>
> I get
> return
> when editing c-files?
Nearly, I rather mean names of functions, variables, classes etc. than
keywords; in fact, every word _I wrote_ (and not only in .cc files),
like the emacs does, you know!? Example: Somewhere in the document
(above my current position) there is a function `void
resolve_function_name ()' and now I want to insert a call to it at the
current position. But the name of the function is sooooo long, so that I
type in the first characters of the function name and press <ALT-TAB>
and the word is completed, and I am happy :-). I think, you don't need a
database of the words I wrote; a search about the text from the current
position to the start of the document (maybe in this direction?) should
be enough (like a `grep "resol*"'). What do you think? I think it could
be also a good feature when writing a scientific paper with lots of
looong complicated words :-)
Best regards,
Matthias Urban
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]