Well, here goes:
vi sucks!
I'll get to the arguments later... meanwhile, what do you think?
Moderators: phlip, Moderators General, Prelates
phlip wrote:Ha HA! Recycled emacs jokes.
enk wrote:Dunno if this has been done before, because when I searched topic titles for "vi", I was told that each word must consist of at least 3 characters![]()
Well, here goes:
vi sucks!
I'll get to the arguments later... meanwhile, what do you think?
zenten wrote:I agree, vim is way better. Vi? Old and busted. Vim? New hotness.
Pobega wrote:Was this even worth making a topic for?
phlip wrote:Ha HA! Recycled emacs jokes.
phlip wrote:Ha HA! Recycled emacs jokes.
3.14159265... wrote:What about quantization? we DO live in a integer world?
crp wrote:oh, i thought you meant the entire funtion was f(n) = (-1)^n
i's like girls u crazy
adlaiff6 wrote:I would choose vim over vi, simply because on my school's solaris machine that they give everyone ssh access to, vi ends up being this shitty little program that is one row tall and only displays the line you're on (but otherwise acts exactly like normal vi), while vim is actually the program we all know and love that takes up the whole terminal and actually looks like a normal text editor. I realize the above description of vi is confusing as all get up, but that's only because the program itself that they claim to be vi is at least as confusing.
P.S. - Cheers, enk!
xyzzy wrote:Out of vi and vim, I actually tend to prefer vi, but using either is rather appealing.
phlip wrote:Ha HA! Recycled emacs jokes.
davean wrote:Used ed?
3.14159265... wrote:What about quantization? we DO live in a integer world?
crp wrote:oh, i thought you meant the entire funtion was f(n) = (-1)^n
i's like girls u crazy
phlip wrote:Ha HA! Recycled emacs jokes.
adlaiff6 wrote:I would choose vim over vi, simply because on my school's solaris machine that they give everyone ssh access to, vi ends up being this shitty little program that is one row tall and only displays the line you're on
ashram wrote:adlaiff6 wrote:I would choose vim over vi, simply because on my school's solaris machine that they give everyone ssh access to, vi ends up being this shitty little program that is one row tall and only displays the line you're on
Surely that's just the term type not being set? Happens all the freaking time if you ssh from linux to solaris; the ssh sends the TERM value and there isn't an entry for "linux" or "i386" or whatever it is that linux sends in the solaris terminfo database. Easy fix is set + export TERM to something it does know about, eg TERM=ansi.
illuminati1113 wrote:I know that this topic is old, but I can't help but express my love of moded input. At least for text editing. That fact that i can perform complex manipulations of text without even moving from the alphanumeric keys is awesome.
zenten wrote:illuminati1113 wrote:I know that this topic is old, but I can't help but express my love of moded input. At least for text editing. That fact that i can perform complex manipulations of text without even moving from the alphanumeric keys is awesome.
What letter/number do you use to switch modes?
semicolon wrote:question: why would i, a windows user, need to use either of these programs? if i need syntax highlighting i can just use notepad++ or something, right? why is vi/vim/emacs (i know emacs and vi are totally different) so special?
with vi, your keyboard becomes a huge specialized text-editing gamepad with almost a hundred buttons. Each of them has at least two functions, shifted and unshifted, so you have almost two hundred functions at a single keypress (not counting Shift). Commands are incredibly powerful for text editing, and you can even combine them to obtain the best results. While typing some text, it is a regular keyboard, but when you're back to normal mode you have the best-designed text-editing machine there is, and it shows.
phlip wrote:Ha HA! Recycled emacs jokes.
semicolon wrote:why is vi/vim/emacs (i know emacs and vi are totally different) so special?
struct state;
void stateDoOperation1(state* state, int param1);
int stateDoOperation2(state* state, int param1);
int stateDoOperation3(state* state, int param1, double param2);doOperation1(int param1);
doOperation2(int param1);
doOperation3(int param1, double param2);qqdfe~fsdf,x^Mq2@q
qq start recording macro to register 'q'
dfe delete to next 'e' (the end of "state")
~ invert case of letter under cursor (the 'D' in "Do")
fs move cursor to next 's' (the beginning of "state")
df, delete to next ','
x delete (the space after the ',')
^M move to beginning of next line (it's a return)
q stop recording
2@q replay macro q two times
void stateDoOperation1(state* state, int param1);
int stateDoOperation2(state* state, int param1);
int stateDoOperation3(state* state, int param1, double param2);
doOperation1(int param1);
doOperation2(int param1);
doOperation3(int param1, double param2);
s/\v^.{-}e(.*\().{-}, (.*)$/\l\1\2
phlip wrote:Ha HA! Recycled emacs jokes.
You, sir, name? wrote:While on the subjects, there is a firefox extension that allows you to control it like vim.
vimperator.mozdev.org
It's not perfect. Unfortunately you don't get a vim window in the text boxes. But it's a hell of a lot better than regular firefox.
You, sir, name? wrote:You can control the vimperator without ever letting go of the home row, let alone touching the mouse...
phlip wrote:Ha HA! Recycled emacs jokes.
hotaru@olorin$ ls -ShrlL `which vi` `which nvi` `which elvis` `which vim` < ~ >
-rwxr-xr-t 1 root wheel 186K Jun 13 02:40 /usr/local/bin/vi
-r-xr-xr-x 6 root wheel 305K May 12 06:23 /usr/bin/nvi
-r-xr-xr-x 1 root wheel 473K Apr 24 21:43 /usr/local/bin/elvis
-rwxr-xr-x 1 root wheel 1.6M May 1 22:29 /usr/local/bin/vimhotaru@olorin$ rm empty_file.txt < ~ >
rm: empty_file.txt: No such file or directory
hotaru@olorin$ touch empty_file.txt < ~ >
hotaru@olorin$ /usr/bin/time -h vi +q empty_file.txt >/dev/null < ~ >
0.01s real 0.00s user 0.01s sys
hotaru@olorin$ /usr/bin/time -h nvi +q empty_file.txt >/dev/null < ~ >
0.01s real 0.00s user 0.01s sys
hotaru@olorin$ /usr/bin/time -h elvis +q empty_file.txt >/dev/null < ~ >
Read empty_file.txt, 0 lines, 0 chars
0.06s real 0.03s user 0.02s sys
hotaru@olorin$ /usr/bin/time -h vim +q empty_file.txt >/dev/null < ~ >
Vim: Warning: Output is not to a terminal
2.14s real 0.03s user 0.06s sys#include <stdio.h>
int main()
{ struct { unsigned a:3, b:3, c:2; } n = {0};
do do printf("%hhu\n", *&n);
while(!(n.a-- && !++n.b));
while(++n.c);
return 0; } phlip wrote:Ha HA! Recycled emacs jokes.
Rysto wrote:hotaru, if you want to debate software licenses, there's a thread for that(and if there isn't, then start it).
enk wrote:First, I'd say sizes alone are irrelevant today when they are that small, only loading time matters. And your benchmark doesn't reflect a real usage scenario (apparently the redirect confuses vim, but you don't do that much in real usage anyway). Try time vim +q empty_file.txt instead, that is what it actually feels like when using it - and below one second on most machines. I don't find that a problem compared to the extra features I get in vim over vi (multiple documents, undo history, syntax highlighting...). And on newer machines it's <100 msek anyway.
0.13s real 0.04s user 0.05s sys"UnicodeData.txt" 19336 lines, 1117369 characters
0.20s real 0.09s user 0.05s sys 0.10s real 0.03s user 0.05s sys#include <stdio.h>
int main()
{ struct { unsigned a:3, b:3, c:2; } n = {0};
do do printf("%hhu\n", *&n);
while(!(n.a-- && !++n.b));
while(++n.c);
return 0; } phlip wrote:Ha HA! Recycled emacs jokes.
enk wrote:Advantages of using multiple documents over multiple vi instances in screen:
- :argdo / :bufdo / :tabdo / :windo
- Vertically split screen (with synchronized scrolling if you'd like - useful for diffs) (actually, you can have as many windows in a tab as you'd like, but more than two are rarely useful).
- Word completion reads other opened files as well (never mind... vi doesn't do word completion at all)
enk wrote:I find syntax highlighting makes it easier to spot control flow statements and declarations (maybe that makes up for the 0.2s I lost while opening vim?(but that is another religious war altogether)).
enk wrote:Other stuff I use regularly, that vi doesn't have (in order of importance):
- command line history
- visual mode
- word completion
- * and # search commands
- command line completion
- scripting/plugins
enk wrote:Stuff I use once in a while, that I'd also miss in vi:
- regexes
- built-in help system
- macro recording
- code folding
#include <stdio.h>
int main()
{ struct { unsigned a:3, b:3, c:2; } n = {0};
do do printf("%hhu\n", *&n);
while(!(n.a-- && !++n.b));
while(++n.c);
return 0; } phlip wrote:Ha HA! Recycled emacs jokes.
edge walker wrote:semicolon wrote:why is vi/vim/emacs (i know emacs and vi are totally different) so special?
It can’t really be explained convincingly. If you can, find someone who’s been a heavy user of one of those for a while and watch him work over his shoulder. You’ll understand immediately.
Users browsing this forum: cjmcjmcjmcjm, Fekeenuisance and 3 guests