By the way: you don't have to start coding this thing in c
You can write this in some vim script lines (however it'll start
searching after pressing enter and not on the fly)
By the way: Have a look at :h pattern.
There is \s and \S and such which makes life easier..
Try this:
noremap <F11> :call<space>feedkeys('/'.substitute(input('smart search'),'\(\S\+\)\s*','\\<\1\\S*\\>\\s*','g').nr2char(10))<cr>
Another tip: If you're trying to match text within a block. Don't search
for "If you're" but try "'re t" or "ch te" instead of "match text".
In most cases this is uniq enough.
Marc Weber
By the way: you don't have to start coding this thing in c
You can write this in some vim script lines (however it'll start
searching after pressing enter and not on the fly)
but maybe I need another feature...
we have cmdline complete now, but why we can't have search complete?
just C-X_C-N for buffer complete, and C-X_C-V for vim complete. is it
difficult?
--
I don't know about completion in / ? buffers etiher so it I'd say it
doesn't work. Again patching it and getting in the patch will take time.
(I'd rather see someone spend the time making vim threadsafe by adding
some locking .. :-)
So what can you do instead?
You've seen that you can feed arbitrary text to the / command.
And the input() function supports completion. See :h complete()
If that's not enough you can open a temp buffer and add a on buffer
write hook to start the real query. Eg the tlib has some support for
this. So this is a convinient workaround as well.
Maybe you can give more details about which completion is missing so
that the list can help you find the right answer?
Sincerly
Marc Weber
your item
* include an option similar to :set ignorecase :set ignorewhitespaces,
that would allow search accross multiple line, whery usefull when
viewing/editing text
Again: :h pattern : look for this line:
|/\_.| \_. \_. any single character or end-of-line
Thus you can already search across line boundaries. But it might be more
difficult to write the search pattern.
So maybe you want to refine your idea taking into account the existing
solutions. Example: search for more\_.difficult to match the
word wrap in the previous paragraph. By the way: #vim on
irc.freenode.net is your friend in such simple cases..
your item
* i new tool, eventually in C++, with very good plugin mechanism
the main point would be the possibility to add plugins, that is to
add/extend/change functionality at "insertion points", this a feature
that is missing in vim... Vim is great, but to change anything you have
to "pray" to the master :)
probably this will never happen, there are others who tried to do that
maybe it would be easier to hack other editors to add vim like
capabilities
some other short ideas at vim+
I feel the same. That's why I did start tovl
http://www.github.com/MarcWeber/theonevimlib
But again you should do more research and ask long time vim users
because:
* vim *is* extensible. Eg you can extend it using python, perl, ruby,
php, .. ( Have a look at the configure flags)
you can even load .dlls or such (but they will be reloaded again and
again)
Editors which have vi-like key bindings: Eclipse (you have to pay some $
for the plugin officially), Netbenas (great support, even v then o
works!) and probably some more. However it's hard to define the set of
"vi(m)" like features an editor must support because reading the help
pages of vim alone takes ages.. Even emacs has a vi like mode called
viper.
So without telling the list what you want to do and which plugins you
want to write it's hard to help you showing you the existing solutions.
If you want to code Java best you can do is either use Eclipse IDE or
Eclim (run vim and connect to headless Eclipse?) Why ? Because recoding
the incremental compiler which does already exist in Eclipse and is
maintained is insane. If you seach www.vim.org you can even find a Java
parser which has been written in vim script however it was not updated
for over a year.
So don't try to ask questions like "How can I make vim do this meta
thing". Rather ask: I have this use case: .... Which is the vim way to
handle this, how do you do this?
You'll get much better results. So after all don't try to use vim for
everything. Use the tool which is best for a given task (vim happens to be the
tool of choice for many of my tasks..).
Marc Weber
I don't know about completion in / ? buffers etiher so it I'd say it
doesn't work. Again patching it and getting in the patch will take time.
(I'd rather see someone spend the time making vim threadsafe by adding
some locking .. :-)
Again: :h pattern : look for this line:
|/\_.| \_. \_. any single character or end-of-line
Thus you can already search across line boundaries. But it might be more
difficult to write the search pattern.
I feel the same. That's why I did start tovl
http://www.github.com/MarcWeber/theonevimlib
* vim *is* extensible. Eg you can extend it using python, perl, ruby,
php, .. ( Have a look at the configure flags)
you can even load .dlls or such (but they will be reloaded again and
again)
So don't try to ask questions like "How can I make vim do this meta
thing". Rather ask: I have this use case: .... Which is the vim way to
handle this, how do you do this?
You'll get much better results. So after all don't try to use vim for
everything. Use the tool which is best for a given task (vim happens to be the
tool of choice for many of my tasks..).
I'd like to see some more development on vim as well.
> symbols for the script etc. The same with python. I doubt that the
> functions available to the python interface would allow me to implement
> the previously presented smartsearch for example
There is another way: Implement kind of event loop listening for
keyboard input using getchar() replacing the search pattern on the fly?
Here is an implementation which might just work for you without patching
C code, source the file and press F2, then type ba to match "bar\napple"
fun! CharsToPattern(list)
let pattern = ''
let spaces='\%(\n\|\s\)\+' " newline or space at least once
for i in a:list
let pattern .= '\<'.i.'\S*'.spaces
endfor
return pattern
endfun
" starts an event loop polling for keyboard input
" type esc to abort, <cr> to accept smart search
" TODO: don't use cursorline but use regex to highlight match
fun! SmartSearch()
echo "smart-search, type some chars"
" FIXME: turn it off again conditionally
set cursorline
let oldpos = getpos('.')
let typedchars = [] " keeps a list of characters
while 1
let c = getchar()
if index([13,10],c) >= 0
" pressed enter, keeep position
call feedkeys("/".CharsToPattern(typedchars)."\n")
return
elseif index([27], c) >=0
" esc, abort
call setpos('.', oldpos)
return ""
elseif c == "\<bs>"
" backspace, remove last item
let typedchars = typedchars[:-2]
else
call add(typedchars, nr2char(c))
endif
" reset cursor pos cause we want the next match
call setpos('.', oldpos)
let g:pattern = CharsToPattern(typedchars)
call search(g:pattern, 'w')
redraw!
echo join(typedchars,'').' press esc to exit, <cr> to accept'
endwhile
endf
noremap <F2> :call SmartSearch()<cr>
> Look, I think I am enough mature and have years of IT, I know how to
> attack a problem.
Sure. I didn't want to say you can't solve problems. Sure you can.
I want to show you that vim is its own world and has its own solutions.
So do me a favour and judge the solution above and tell how distinct is
it from a real acceptable solution ?
> Of course I will try to use it for everything. I had few month ago an
> experiment
> to go back a bit to Eclipse, but the first time I had to move my hand to the
> mouse, I was sick :)
So eclim is for you. There are some use cases using a mouse is faster.
Eg renaming keywords in Java files using Eclipse IDE cause Eclipse is
Java aware and will do a perfect job an many files. You can't get that
speed by using dozens of mappings using vim, can you?
(Of course I miss idutils and I grep code using vim far more often than
using Eclipse IDE). Another thing I'd cosider using Eclipse is debugging
PHP, Python, Java Code. There are some debuggers for vim. But they lack
some important features such as clicking on the stack trace and
exploring vars at that point of the trace. Yes, you have to leave the
keyboard.. But you can set breakpoint properties and such more easily
(IMHO).. That's what I meant by using the right tool for a task.
So for Debugging I'd vote for Eclipse. For code I know very well I'd use
vim.
> But I would not give up with the idea to search efficiently in 2GB text
> data.
2GB text data? Is it one file? Yes, you're right vim can be a good
solution for this problem (maybe switching of syntax highlighting etc..)
> you would rather smartsearch, than writing hierogliphs in your search
> commands :)
I agreed and gave you a very first proof of concept implementation. I
gave you a much smarter second one now. So judge it again and let's
see..
About locking and making vim threadsafe: I don't want to make the whole
vim code thread safe. I don't have that much time and probably I'm not
smart enough to finish that task in reasonable time.. So I'd try getting
a lock when vim runs any action (eg due to keyboard input) or a python
thread calls vim.eval. This might be doable. If you really want to have
this stuff have a look at tovl. I used vim server features to talk back
to vim using another thread. That works only when running X but it works
:)
By the way: Nice to meet you!
Marc Weber
Maybe the "accents" keymaps would help you. After ":set keymap=accents",
hit 'e for e-acute, `o for o-grave, :u for u-umlaut, ^i for
i-circumflex, 'c for c-cedilla, ~n for n-tilde, etc. Romanian
(t-cedilla, s-cedilla, etc.) doesn't seem to be included, also not
Hungarian (double-acute-accented vowels), the Latin-Slavic (Polish
l-bar, Czech, Slovak, Croatian consonants with acute or caron), the
Scandinavian languages (o-slash, ae-digraph, a-ball, edh, thorn),
Catalan (l with middle dot) or Esperanto (consontants with circumflex,
u-breve) but once you've understood how the system works, save the
keymap under another name in ~/.vim/keymap (Unix) or ~/vimfiles/keymap
(Windows) and edit it there.
Use Ctrl-^ (in Insert/Replace or Command-line mode) to toggle the keymap
on and off.
Also:
* searches forward for the word under the cursor
# searches backward for the word under the cursor
q/ and q? open the search history in a window (where you may do any
edits without leaving the window; Enter executes the line under the
cursor as a search command and closes the search history; :q closes it
without any other action and goes back to where you were before)
Best regards,
Tony.
--
Expense Accounts, n.:
Corporate food stamps.
Oh, so you know better what Vim release 11 should include? Well, go
ahead, take the sources (they're there for anyone to look at) or start
from scratch, and come back 5 years from now (or somesuch - when Bram
will be releasing _his_ Vim 11.0) to put Bram's nose in his shit by
showing thim that he had it all wrong and how vim 11 REALLY should behave.
Good luck!
Tony.
--
hundred-and-one symptoms of being an internet addict:
75. You start wondering whether you could actually upgrade your brain
with a Pentium Pro microprocessor 80. The upgrade works just fine.
eg do match Straße I use Stra.e . Yeah, again a workaround ;-)
Anyway tell me how my other solution works for you.
Marc Weber
> On 15/07/09 14:43, mobi phil wrote:
>> Look, I think I am enough mature and have years of IT, I know how to
>> attack a problem.
Considering that you seem to have posted your first message to this
list about one week ago, yes, that seems about right.
>> I have these ideas for years now, I wanted to be sure
>> that they are useful. And now I am convinced that they are useful. What
>> you say depends on what does it mean "vim way". You mean vim way of
>> vim 3.7 or vim way of 10.11? There is a difference. I think you got the
>> point.
> and come back 5 years from now (or somesuch - when Bram
> will be releasing _his_ Vim 11.0) to put Bram's nose in his shit by
> showing thim that he had it all wrong and how vim 11 REALLY should behave.
Jesus, that’s harsh.
>>> Of course I am not pretending to add a c++ compiler for the highlighting.
>>> That would be against the basic principle "vim is the fastest editor". Any
>>> feature
> no, IMHO vim is not the fastest editor. you can try use Vim open a 2GB
> size
> text. UltraEdit or even emacs is far more fast than Vim.
Can you please do something about your line wrapping? Trying to read
your messages is getting rather annoying.
Anyway, where are you getting these “statistics” from? I just ran a
simple test, opening a 185 MB text file in both editors. Vim took 7
seconds, Emacs 14 seconds. I don’t know about UltraEdit, but it’s
going faster as it doesn’t need to load the whole file, last time I
checked. (Things may have changed to accomodate variable-width
encodings, which are always going to be an issue.)
Just to be clear, I’m not trying to bash Emacs, I’m trying to bash you.
> Vim just can
> fast
> boot and fast when you edit small texts, maybe some lazy-eval tricks
> and good
> algorithm will make Vim more fast. that's my goal.
Goal? Have you thought this through further than writing this email?
“Good algorithm”? Do you know anything about implementing a text
editor? Let me tell you, as someone who has written two and devoted
two years of research into the matter for my master’s thesis, that
writing a text editor is fucking hard. Vim’s method of reading and
managing a buffer may not be optimal, but it’s pretty good and writing
something that’s better will require a lot of work. A big whole
shitload of work.
> and, add a c++ compiler is not slow. you only need parse current
> function,
> other informations can obtain in tag files. and you can do a lazy
> parse. I
> mean, if you want Vim fast and expendable (not just compatibles with
> Vi),
> you can do a lot of work :-)
What are you talking about here? A C++ omni-completer? When did we
begin discussing something like that in this thread? Right now? I’m
not following.
If this is in regard to the suggested C++ rewrite of Vim, then wow, just wow.
Further, what the hell would rewriting Vim in C++ gain? Why is
everyone’s who’s clearly slightly insane’s solution (to problems that
often don’t even exist), ”Hey, have you considered rewriting it in
C++”?
What Vim needs is a clearer separation of concerns in the source code.
Different subsystems depend too much upon each other. The overuse of
#ifdef’s also makes the code rather hard to understand. What it
doesn’t need is a rewrite.
About your long line use case: I don't think you have to edit this kind
of files very often. In fact I never did. So I consider this being a
corner case I'm not interested in. I could use bvi for such files.
If you're that good at C I'd write a short C app which splits the long
lines
LLONG LONGLONG LONGLONG LONGLONG LONGLONG LONGLONG LONGLONG LONGLONG LONGLONG LONGLONG LONGLONG LONGONG LONG
into
LLONG LONGLONG LONGLONG LONGLONG LONGLONG LONGLONG
== AUTO SPLIT ===
LONGLONG LONGLONG LONGLONG LONGLONG LONGLONG LONGONG LONG
so that you can join them again later.
Yeah it's a workaround. but you can open the file in vim then and it
will take less time than rewriting parts of vim.
I don't want you stopping your work on improving vim.
But I don't think this use case in particular is that important.
I wish you good luck, some help provided by this list
and ... much spare time..
Yours
Marc Weber
> On 7月17日, 上午12时11分, Nikolai Weibull <n...@bitwi.se> wrote:
>> Anyway, where are you getting these “statistics” from? I just ran a
>> simple test, opening a 185 MB text file in both editors. Vim took 7
>> seconds, Emacs 14 seconds. I don’t know about UltraEdit, but it’s
>> going faster as it doesn’t need to load the whole file, last time I
>> checked. (Things may have changed to accomodate variable-width
>> encodings, which are always going to be an issue.)
>>
>> Just to be clear, I’m not trying to bash Emacs, I’m trying to bash you.
> OK. but do you know how Vim hand memory and how Vim read a file?
Yes. Did you read my whole mail?
> what text file you use? I tell you: yes, if it's a "normal" text, Vim is
> fast than most of editor, but, you can try use Vim to open "test" file
> generated by this simple C program:
> #include <stdio.h>
> #include <stdlib.h>
>
> int main(void)
> {
> int i = 10000000;
>
> freopen("test", "w", stdout);
> while (i--)
> printf("this is a fucking long line?");
>
> return 0;
> }
See, that’s sort of the problem. When you could use something simple like
% repeat 10000000; do echo "this is a fucking long line?"; done > test
you’re already thinking of a C program, 13 lines long.
> yes, it's a big long line. and you know what Vim do? in my Vim
> 7.2.228, it dead. just lost respond. and take 100% CPU usage.
> just add a \n at the end of string, Vim can open this file in 7s. Why?
> because Vim reads logical line, not block, it makes Vim obtain memory
> unlimitly when it meet a long line. this is just one thing I want
> change. in a lot of fucking fact of Vim.
”Logical”? Am I getting my terminology mixed up or isn’t a logical
line what you get when you enable word wrapping?
By the way, Emacs has the exact same issue with this sort of file.
> What good algorithm? the algorithm Linus write in a OS.
I don’t follow this line of reasoning.
> IMHO, I want a new text editor, it has multithread, do on-the-fly
> service background
This is a desirable goal, yes. Having an editor support transactions
is a good goal and would allow background processing.
> it manage memory fast and clever, all of memory
> are have ref-count and copy-on-write.
Now you’re losing me again. What does this matter? Copy-on-write?
It seems that you’ve just read a book on operating-system design or
something and want to, ahem, rewrite Emacs.
> yes, I'm not thinking about to
> write a editor, I'm thinging about to write a Operation-system based
> on Vim.
Ah, there it is.
> that's my private hobby, I'm not beg you to join me.
May I then beg you to create a separate mailing list where discussion
revolving around this operating-system Vim can be had instead?
> Yes. A omni-completer for C++ language. just like VisualAssist on
> Visual Studio, that's one of my plan. but must after I finished my
> prefect Vim (in my mind), so maybe you can use it after 5 years.
...
> My Plan: port a fast reguiar expression to Vim (Vim's current regex
> module is hell terrible)
I thought this had already been done?.
> make a middle level script language (not a
> macro language in current Vim now, but current Vim-script will hold
> in, for the big amount of scripts avalible now)
Hasn’t this also been done?.
> a better memory manager as the subordinate of the script system.
Memory manager for what memory use?
> and a better undo system (since history issue, Vim's undo system
> is more or less terrible)
Huh? What’s wrong with Vim’s undo?
> and a flesh new parser-base highlight system.
This I can live with.
By the way, I still haven’t written the article I was going to write
on this, but Vim’s current :syntax command is powerful enough to parse
LALR(1) grammars, and perhaps others as well, in a recursive descent
fashion.
> all in all,
> what I should do is just invente a new language for Vim. that's all
> (maybe with a little other things.)
You’re tone suggests that this is easy. Invent a language? And how
does that solve all the “problems” listed above?
Can you give the list a chance discussing these issues by providing
examples what doesn't work? Eg can you prepare a sinmple (real world)
example which causes problems to you?
I don't consider a 268MB file containing one line a real world example.
Also what bothers you about syntax highlighting most that you want to
enhance it?
If the list can't find solutions for you I guess some people will try to
help you fixing the issues?
By the way I've tried some more editors forcing them to open your 280MB
file:
less: seems to be a way.. However I don't know whether you can scroll
horizontally.
mc (midnight commander)
F3 view: seems to work. But updating the display
takes more than 7sec here (dual core 2.4Ghz)
F4 (edit): message "File is too large"
Eclipse: Exception:
Unable to create editor ID org.eclipse.ui.DefaultTextEditor: Editor could not be initialized. Java heap space
Netbeans: No error. It hangs for 2 sec. But it doesn't open the file.
nano: Don't know, does no longer react to keyboard input
jedit: No message, no content ? (probably some Exceptions, I didn't
check)
nvi: Works fine! But it doesn't support even the gj command
I repeated the test using a 30MB file only.
vim : works but sluggish (syn off)
mc : same
emacs : I couldn't scroll, it seems to be slower (?)
Eclipse: I killed it. It took more than a couple of minutes - still no result
netbeans: I got a warning that a 30MB file might cause a memory out of
bounds exception this time. I killed it after some minutes -
no result
jedit: I killed it. > 30sec - no
Java heap space exceptions.
oowriter (insert -> file).. I killed it. No sucess within 30sec.
So may I conclude that you should try nvi or use bvi for now?
If you want to view the file maybe even try a browser such as Opera or
Firefox (don't open FireBug ..).
> contains BASE64 line for icons, and my Vim crashed... I had to use
> notepad to do some work, that makes me thought about how to prefect
> Vim.
>
> Maybe rewritten is just some kinds of over excitation. but the really
> thing I want is to change the philosophy of current Vim, just solve
> out
> the history remain issues, remove the parts that Vim had to hold, and
I asked about making set nocompatible the default once (minor change)..
And some people don't want to change their minds.
So maybe it's best to fork for that reason?
Marc Weber
On the contrary, recursion is the right way to evaluate expressions,
because any expression may include full-fledged expressions as
part-results, if only within (). _Not_ using recursion to evaluate
expressions would be difficult to program, bug-prone (which rates as
"dangerous" to me) and not necessarily faster.
Regards,
Tony.
--
I value kindness to human beings first of all, and kindness to
animals. I don't respect the law; I have a total irreverence for
anything connected with society except that which makes the roads
safer, the beer stronger, the food cheaper, and old men and women
warmer in the winter, and happier in the summer.
-- Brendan Behan
> On 7月17日, 上午5时17分, Nikolai Weibull <n...@bitwi.se> wrote:
>> Now you’re losing me again. What does this matter? Copy-on-write?
>> It seems that you’ve just read a book on operating-system design or
>> something and want to, ahem, rewrite Emacs.
> OK. it's very important, for me. yes. I really just read a book on
> operating system and found that I can use these tech to improve Vim.
I don’t see how.
> IMHO, Vim has several issues:
> - it has separate Eval system and Inner implement. so you can't
> simply use script to hand all state of Vim.
It’s not as flexible as elisp, no.
> - it has memory leaks ( a dozen of patch are made for it), and it
> waste of memory (copy lines for undo, for submatch(), etc).
This I have a hard time believing.
> - it isn't thread-safe. so you can't load service while loading
> file.
True, but, as already stated, fixing that is going to basically
require a complete overhaul of the Vim source code.
> - it has a weak language, can't handle all functional of Vim, and
> slow.
True, but this isn’t anything new and I don’t see how what you’re
proposing (still unclear on what it is that you’re actually proposing,
though) solves that.
> - it had s weak reguiar expression module, just can handle context
> free pattern.
Um, what?
The problem with Vim’s regular expression implementation is that it
uses backtracking to match. This is more or less required, as Vim’s
”regular expressions” include backreferences, which, as it turns out,
aren’t regular at all.
Regular expressions can’t match context-free grammars. That’s
basically the whole point of regular expressions. NFAs, TFAs, and
regular expressions are deeply intertwined, just as context-free
grammars and NDPAs are deeply intertwined. Irregular expressions are
not as clearcut, but they certainly can’t match context-free grammars.
> and file pattern & text pattern has different format.
So? That’s to be expected.
> - it writes repeat code for same function. in writefile/readfile,
> the IO is just rewrite, so we can't hand file encoding, file
> information, etc. with it. there are amount of switch block in
> code, they just for the same purpose. just use a thread-safe mode
> invoke function to replace them will offer flexable and space.
I don’t see how lack of reuse, which does exist, yes, has much to do
with being thread safe.
> then, you see, the regex module is the part of service. I prepare made
> it more powerful, complete, just like perl regex (can you write a Vim
> regex to handle paren-match?).
Yeah, that’s not the problem. Again, don’t use regular expressions to
match nested structures.
>> By the way, I still haven’t written the article I was going to write
>> on this, but Vim’s current :syntax command is powerful enough to parse
>> LALR(1) grammars, and perhaps others as well, in a recursive descent
>> fashion.
> can you use :syntax to write a real "syntax" highlight script? in:
> (foo)*bar
> can you make foo highlight as a type when there is:
>
> typedef int foo;
> before, and highlight foo as a variable when I delete the typedef
> line?
No, but that’s because the C grammar isn’t context-free. And, by the
way, syntax is not the same thing as semantics, which is what you’re
looking for.
> Vim syntax command is great, but it can't handle informations in
> parsing. one reason is VimL is so slow, another reason is it can't
> avoid parsing error.
:syntax being slow or not has nothing to do with VimL being slow.
> Emacs is more flexable than Vim, that's my goal -- one of my goals.
> IMHO, Vim has several issues:
> current Vim script is just something like macro, not a real fast
> middle-level script language (middle-level means, Vim implement by
> this language, not use this language as plugin). we can even compile
> it into C code, for speed. it has syntax like VimL, but has features
> like perl/python/ruby. this idea just mixup Vim and emacs.
Indeed Emacs is more flexible and open system, hence a better platform
for modifications and extensions. Your plans for Vim are so ambitious
that I honestly think that nothing will concrete will ever come out of
them. Sure I may be wrong, and I really _hope_ that I'm wrong.
Anyway, in my opinion it would be better to join forces with some
existing projects. If you feel that Vim's design, goal or development is
stuck and not suitable for the kind of improvements that you would like,
then maybe Yi editor project has similar goals to yours. I think Yi is
the most interesting "next generation programmer's editor" project. It's
written in Haskell language and follows the Emacs-like idea of making an
open, interactively modifiable system. Maybe you want to check Yi
project:
> On 7月17日, 下午4时39分, Nikolai Weibull <n...@bitwi.se> wrote:
>> On Fri, Jul 17, 2009 at 01:00, StarWing<weasley...@sina.com> wrote:
>> > IMHO, Vim has several issues:
>> > - it has separate Eval system and Inner implement. so you can't
>> > simply use script to hand all state of Vim.
>> It’s not as flexible as elisp, no.
> But it can be.
No, not really. Not until it gets things like real anonymous
functions, access to a lot more low-level stuff, and so on.
I once wrote a patch to add a getpwnam() wrapper. Bram rejected it on
the basis that it wouldn’t be useful enough to warrant the addition.
I don’t agree, as I needed it for ftplugin/changelog.vim, but I
respect his view on it.
>> True, but, as already stated, fixing that is going to basically
>> require a complete overhaul of the Vim source code.
> that's really a long boring job, is it?
Yes?
> But Why you can use perl patterns to match paren? because it support
> recursive in pattern, and you can integration codes into patterns.
You’re talking about Perl 6’s grammar functionality. They’re
definitely not regular.
>> > and file pattern & text pattern has different format.
>>
>> So? That’s to be expected.
> That makes code complex, maybe a interchangeable flexable regex engine
> is better?
How much code can there be that handles the file pattern stuff?
Matching file patterns is easy.
> Is it important in your mind? I think it's funny and powerful.
Without semantics, syntax is unimportant.
> I want something mixed Vi & ruby. to make a ruby-like language to fit
> Vim, mix it into Vi's lower level implement. that's all.
I'd be glad if an existing language (ruby, perl, python, ..) fits your
needs. Because learning yet another language to script vim is bad IMHO.
Marc Weber
IOW, the reason you're trolling here rather than there is because we're
too friendly? Maybe that's something we ought to remember...
Yes, you're English is bad, and that may sometimes make it harder to
understand what you really mean, but the problem (IMO) is not so much
with the language as with the ideas... Maybe I'm a fossilized
dinausaurus though, unable to see progress when it stares me in the
face... Well, time will tell.
Regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
79. All of your most erotic dreams have a scrollbar at the right side.
You can find a git mirror here: http://repo.or.cz/w/vim_mainline.git
Using top-git is most convenient (IMHO) for keeping patches up to date.
Contact me if you want to know more about top git topic branches.
Marc Weber
> On Jul 17, 9:39 pm, Tony Mechelynck <antoine.mechely...@gmail.com>
> wrote:
>> the problem (IMO) is not so much
>> with the language as with the ideas...
> Why you think I'm trolling here? I just show what I think and wait the
> idea from other people. to find how we do the work better. Do you
> think I just like a clown, raise argument and run away?
Because you’re basically saying that you’ve just read a book on
operating-system design and that you have a couple of things that you
want to change with Vim to make it more like an operating system and
that your comments suggest that you think this will be an easy task.
Oh, so you know better what Vim release 11 should include? Well, go
ahead, take the sources (they're there for anyone to look at) or start
from scratch, and come back 5 years from now (or somesuch - when Bram
will be releasing _his_ Vim 11.0) to put Bram's nose in his shit by
showing thim that he had it all wrong and how vim 11 REALLY should behave.
Excerpts from mobi phil's message of Wed Jul 15 12:21:44 +0200 2009:
> pure my soul I am confused about the spelling of a word, so the trick aboveI use . for those "unwritable" chars and go on. I agree that I don't
> does not work.
have to do that as often as you.
eg do match Straße I use Stra.e . Yeah, again a workaround ;-)
Anyway tell me how my other solution works for you.
Marc Weber
Considering that you seem to have posted your first message to thislist about one week ago, yes, that seems about right.
Can you please do something about your line wrapping? Trying to read
your messages is getting rather annoying.
Anyway, where are you getting these “statistics” from? I just ran a
simple test, opening a 185 MB text file in both editors. Vim took 7
seconds, Emacs 14 seconds. I don’t know about UltraEdit, but it’s
going faster as it doesn’t need to load the whole file, last time I
checked. (Things may have changed to accomodate variable-width
encodings, which are always going to be an issue.)
Goal? Have you thought this through further than writing this email?“Good algorithm”? Do you know anything about implementing a text
editor? Let me tell you, as someone who has written two and devoted
two years of research into the matter for my master’s thesis, that
writing a text editor is fucking hard. Vim’s method of reading and
managing a buffer may not be optimal, but it’s pretty good and writing
something that’s better will require a lot of work. A big whole
shitload of work.
If this is in regard to the suggested C++ rewrite of Vim, then wow, just wow.
What Vim needs is a clearer separation of concerns in the source code.
Different subsystems depend too much upon each other. The overuse of
#ifdef’s also makes the code rather hard to understand. What it
doesn’t need is a rewrite.
>> Can you please do something about your line wrapping? Trying to read
>> your messages is getting rather annoying.
> if you are reffering to me I do my best with manual wrapping, I can use for
> the moment only the web browser to write email, and nothing else.
No, I wasn’t referring to you. Do you know how quoting in emails
work? You managed to remove the line where it said that I was quoting
StarWing. Jesus.
> again data types used for view mode should not be the same as for editing
> mode.
God.
>> If this is in regard to the suggested C++ rewrite of Vim, then wow, just
>> wow.
> I think you mixed the two things. StarWing was referring to better syntax
> parsing.
Why are you replying to this? StarWing already responded to my question.
> Rewrite in c++ would be an option... But why not create a C++ wrapper
> around the existing VIM functionality and and and ... imagination
And the holy spirit.
>> Considering that you seem to have posted your first message to this
>> list about one week ago, yes, that seems about right.
> sorry, but do not understand your comment
Precisely my point.
I am afraid you confuse the email list with a church. Don't you thin
you need to see a priest :)
mobi phil <m...@mobiphil.com> dixit:
> So dear vim_dev, and especially I am asking Bram, pleas tell us if you
> feel ofended, or unconfortable about discussions related to how to
> make vim even better. Are you open for "other" views or not.
I don't think anybody is feeling offended here. And I don't think
Nikolai acted "extreme", IMHO he was just amazed.
I don't know if you've realized that Vim is open source. That means that
you can fork Vim or even make your own vim-like editor, using Bram's
sources as a base, without needing Bram's approval or implication (and
the same applies to the rest of the members of this list). To me, it
looks like you and Starwing are looking for cooperation, which is good
but you have to understand that maybe nobody wants to help you with your
ideas, or you are looking for approval and some kind of compromise of
accepting your patches. That's up to Bram, of course, and you have to
understand that probably he won't be involved in any way until you show
a bit more of code.
Again: Vim is open source, so feel free to roll your own version. You
can't expect a lot of replies to your ideas encouraging you to make them
real. That seldom happens: for it to happen you need a whole lot of
people thinking like you, and that's not common. Believe it or not, many
many people like Vim like it is, and even though may value your work,
they may not encourage you to do it. You have to understand it ;)
> I think it is waste of energy and time for everybody if one gives
> hours of his life to present/discuss/try/etc. about fantastic ideas
> and others jus come with "Jesus", "God",
In my humble opinion, using "Jesus", "God" or something like that is a
very english way of showing amazement, and your "fantastic" ideas are a
bit amazing, yes. Please, don't feel offended by that ;)
> "you are on the list for 1 week so shut up" etc.
Nobody has told that...
--
Raúl "DervishD" Núñez de Arenas Coronado
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!
I don't think anybody is feeling offended here. And I don't think
Nikolai acted "extreme", IMHO he was just amazed.
That's up to Bram, of course, and you have to
understand that probably he won't be involved in any way until you show
a bit more of code.
Again: Vim is open source, so feel free to roll your own version. You
can't expect a lot of replies to your ideas encouraging you to make them
real.
That seldom happens: for it to happen you need a whole lot of
people thinking like you, and that's not common. Believe it or not, many
many people like Vim like it is, and even though may value your work,
they may not encourage you to do it. You have to understand it ;)
In my humble opinion, using "Jesus", "God" or something like that is a
very english way of showing amazement, and your "fantastic" ideas are a
bit amazing, yes. Please, don't feel offended by that ;)
> "you are on the list for 1 week so shut up" etc.
mobi phil <m...@mobiphil.com> dixit:
>> I don't think anybody is feeling offended here. And I don't think
>> Nikolai acted "extreme", IMHO he was just amazed.
>
> Nikolai's comments are just disgusting.
I don't think so...
> Why would it be a problem of rewriting vim in c++? Why should one call
> sthg. like that insane idea?
Because it is, maybe. I mean, I find that an insane idea too. Rewriting
Vim is already an insane idea, but doing it in C++... And no, I'm not
discussing about C++ here, that's way off-topic.
> why would you make comments like "Jesus" or "god" on ideas like
> different datatype for view mode would be beneficial.
You make such comments out of amazement.
>> That's up to Bram, of course, and you have to understand that
>> probably he won't be involved in any way until you show a bit more of
>> code.
>
> To be honest I did not participate in too many open source projects as
> I did not have too much time.
If you don't have too much time you shouldn't start the project you have
in mind. Any serious modification in Vim code will take a very big
amount of time, so take it into account before starting.
> One guy has ported for example vim 6.0 to windows mobile, but for one
> or other reason his changes were never integrated. If they would, I
> would not need to spend that much time with that.
Again: Vim is OPEN SOURCE. You don't need Bram to integrate anything he
don't want to integrate because you can do it in your own copy of Vim
and release your own version of Vim with the changes you want.
Asking why some change was not integrated is not fair. In fact I find it
a bit rude because nobody has the right of asking for anything in an
open source project. In Vim, only the sponsors have a little right of
asking for features, and even them shouldn't do it because they are not
paying for Vim, they're just making the life of poor children a bit
better.
>> That seldom happens: for it to happen you need a whole lot of people
>> thinking like you, and that's not common. Believe it or not, many
>> many people like Vim like it is, and even though may value your work,
>> they may not encourage you to do it. You have to understand it ;)
>
> I know, but why "may not encourage". They do not want to have pain
> with that? They do not want the tool to evolve?
They may like Vim like it is now. What you consider evolution some
others may consider otherwise. Your opinion is not the absolute truth.
>> > "you are on the list for 1 week so shut up" etc.
>
>>>>Nobody has told that...
>
> Not you for sure... look back to Nikolais useless emails, and you will find
> the sentenc.
I've read the message and he didn't include the "so shut up"...