Vim 7 Released 665
houseofmore writes "After many years of development, Bram Moolenaar, creator of Vim, today announced version 7 of the widely used editor. New features included spell checking in up to 50 languages, intelligent completion, tab pages, extended undo branches and much more. Downloads available here for Unix, Windows, Mac and more."
vim 8 will do email (Score:4, Informative)
On OS X, it's all about SubEthaEdit (Score:2, Informative)
Then i found SubEthaEdit [codingmonkeys.de] for mac os x.
I've really found no need for anything else since. I highly recommend anybody on an apple try it out. I feel like it follows the philosophy of vi (lightweight, responsive, simple, functional), but integrates well with the rest of the OS (uses apple's spell check, plays well with os x services and keyboard shortcuts). and, though i know this isn't for everyone, it follows apple's emacs-style ctrl-f, ctrl-b, etc navigation.
Re:I just can't get the hang of vim (Score:3, Informative)
Vi is simple, elegant, and light-weight. It takes only a few minutes to learn, but years to truly master. Vim is a misguided attempt to add the bloat of emacs to vi.
Other editors like joe may have their uses, but vi has two major advantages:
1.) It has a deceptively simple command set that hides a tremendous amount of power. This is the Unix way.
2.) It's included in virtually all Unix and Unix-like systems, which makes it a vital skill for any sysadmin.
Vim is unnecessary and its "most useful" feature, syntax highlighting, is the first thing I disable whenever I use it, and I use it for development work (on systems where vi has been replaced by vim).
still hungry people in Uganda (Score:2, Informative)
Re:Cut and Paste? (Score:1, Informative)
Re:No Mac Version 7 (Score:5, Informative)
http://macvim.org/OSX/index.php [macvim.org]
Re:Cut and Paste? (Score:2, Informative)
Paste is usual Shift + Insert.
Also you can use -
Esc v -> visual mode - character wise
Esc Cntrl+V -> Visual mode - coloumns
Whatever is in the visual mode also copies. So very easy
Re:waiting (Score:4, Informative)
Re:waiting (Score:5, Informative)
It's especially handy for editing source code. Where you have commands to reformat comments, move between functions, jump to definitions and things like that. I'd rather hit [[ to go to the top of the previous function than have to enter a search for it. This is especially useful when you're going through all your callback routines and adding a little bit of code to them.
The ability to have multiple cut/paste buffers is also nice. The modal behavior makes people think Vi is a throwback, but honestly only a handful of editors are able to provide even 90% of Vi's editing features. And none (not even emacs) can do it with so few keystrokes (that does make the learning curve on Vi rather steep).
The disadvantage to such an effecient input system is when the cat jumps on your keyboard, you can have hours of work erased in Vi.
ps- I have vi-like bindings in my Cocoa windows. you can actually change how the input works and plug in something else. Or you can just tweak it to use Ctrl-vi key without even using a plugin by editing DefaultKeyBinding.dict. The emacs bindings that are there by default are pretty weak anyways.
Re:slightly different paradigm (Score:2, Informative)
Re:waiting (Score:5, Informative)
Now, if I were to start fresh, would I still choose vim? I think the answer is a resounding "probably." Here are some reasons why:
vi[m]'s ubiquity I think is its strongest argument. Other editors exist to satisfy the other requirements, and some of them might even do it in less obscure ways. But if you're the type who needs to bounce around on different systems running different unixes, vi is always just there. And once you become proficient enough, you're really not strongly inclined to use anything else.
Re:waiting (Score:5, Informative)
Re:waiting (Score:4, Informative)
I'll admit the initial learning curve is a pain, but once you've mastered the basic cursor movement/find/save set of commands, vi has an easy learning curve. You can use the basic command set for years and add one or two new commands as you need ("There has to be an easier way to do this..." [reaches for vi reference]).
Efficiency is the main reason, but there are many others. Black backgrounds are easier on my eyeballs; syntax highlighting keeps me from making stupid mistakes; it's on every UNIX box by default; and I've been using it for 17 years -- muscle memory is a good thing.
Re:My history with VIM (Score:2, Informative)
Has anyone who complains about how "difficult" Vim is actually tried it more recently than 1991?
Re:waiting for GVIM (Score:1, Informative)
It's part of the vim 7.0 package, i.e., you get vim 7, you get gvim 7! Cool!
-yagu
Re:slightly different paradigm (Score:3, Informative)
^X^F in insert mode to complete files. Gotta have it. Better than trusting my fingers, and takes less typing.
Re:Why vim is worse than vi (Score:2, Informative)
For vi-compatible mode [sourceforge.net] try or on the command line If it still insists on syntax highlighting type
Re:Cut and Paste? (Score:2, Informative)
2. mx (create mark "x")
3. position cursor on the last line you want to cut/copy
4. y'x (yank from mark "x" to current)
or
4. d'x (delete from mark "x" to current)
x can be any letter from a to z
Re:Cut and Paste? (Score:5, Informative)
That should fix that problem, but it has some other weirdnesses. So, once you're done pasting set it back to nopaste:
You could probably map that to a shortcut if you wanted to make it quicker. I don't need it that often, so I haven't bothered.
Re:Cut and Paste? (Score:2, Informative)
I 3 VIM (Score:5, Informative)
After sitting through a presentation of a heuristic analysis of VIM in one of my HCI classes, where VIM was ridiculed for being the most un-intuitive, un-user friendly pieces of software since MS-DOS, I never thought I'd find myself using this tool... and actually LOVING it.
Well... fast forward a few months... I got fed up with nano's lack of a search-and-replace feature, and didn't feel like learning awk or sed. I finally decided to give vim a serious try. The key was finding this [eriogerg.free.fr] cheat sheet.
Now I love it... I'm cw'ing, y'anking, dd'ing away. Mind you I still prefer Eclipse for full-fledged development, but there's nothign like super quick and efficient scripting with vim.
Learn it. It's worth it.
Re:Ahhhhh.... (Score:5, Informative)
From what I'm reading in the vim7 docs, what *is* new is "omni completion". You press ctrl-x ctrl-o to invoke it. But when I tried that on a Python file with vim 7 installed from their Windows binary, I got "Error. Required vim compiled with +python."
it is what it is (Score:3, Informative)
Re:waiting (Score:3, Informative)
Not so! That's why there's Viper.
I was firmly on the vi side of the argument until I realized that emacs includes everything you could possibly want to edit code, including vi.
Re:Version 7? (Score:2, Informative)
Re:Cut and Paste? (Score:2, Informative)
Just set it OFF.
And try the same.
Re:Cut and Paste? (Score:1, Informative)
Re:The ESC key annoys me (Score:3, Informative)
No praise for Bill Joy? (Score:2, Informative)
http://www.theregister.co.uk/2003/09/11/bill_joys
Re:waiting (Score:3, Informative)
You can have hours of work erased just by forgetting that vim has multi-level "undo", and that instead of being able to undo the undo you just accidentally undid, you'll be undoing something else, maybe even an entire paragraph somewhere else in the file.
Plus, if you count on being able to know where you will start editing a file, vim can be a real surprise when it drops you somewhere into the middle of a file instead of row 1 column 1. If you've not edited that file for months, it is ridiculous for vim to assume that you want to go back to the last place you were. (You can remove this "feature" by making an unwritable .vimrc, I've found. It can't remember where you were in a file, so you start at the beginning.)
And colorized editing!?! What a treat for text to show up as dark blue on black when you've set your xterm colors to white on black.
Yes, I appreciate the work put into vim. I'd appreciate a "strict vi mode" command to tell vim not to do all the extra stuff that gets in the way of fingers that learned vi a long time ago.
Re:waiting (Score:5, Informative)
I'll bite. A little enlightenment on vim can't hurt.
instead of being able to undo the undo you just accidentally undid
Well, almost every text editor and word processor in the world has this. The command for 'redo' (undo the undone) is :red or CTRL+R.
vim can be a real surprise when it drops you somewhere into the middle of a file
set viminfo='0 in .vimrc.
And colorized editing!?!
I'd appreciate a "strict vi mode" command
vim -v
Re:Ahhhhh.... (Score:3, Informative)
Re:waiting (Score:4, Informative)
Ctrl-R to undo undos
Plus, if you count on being able to know where you will start editing a file, vim can be a real surprise when it drops you somewhere into the middle of a file instead of row 1 column 1. If you've not edited that file for months, it is ridiculous for vim to assume that you want to go back to the last place you were.
Put "autocmd BufRead normal gg" in your .vimrc
And colorized editing!?! What a treat for text to show up as dark blue on black when you've set your xterm colors to white on black.
I'd appreciate a "strict vi mode" command to tell vim not to do all the extra stuff that gets in the way of fingers that learned vi a long time ago.
You're welcome :).
Re:waiting (Score:3, Informative)
Re:I HATE VI. Convince me otherwise. (Score:5, Informative)
in a word, yes.
more specifically, Vim can do everything Emacs can do, and has a lot of features i find every other editor lacking in. there's even an IRC client [vim.org].
there are lots of ways [vim.org] to do it. there is also a good deal of built-in support that works with most of what you'd do out-of-the-box. (note: i don't use folding much, but i instead rely on '%' to jump around and '#' or '*' to find definitions.)
in the standard distribution of Vim in Gentoo, that's on by default. as you type, opposing brackets are highlighted and missing pairs are marked with color. elsewise, you can use '%' to find matching parens, brackets, braces, whatever very quickly.
personally, i find sed to be more than adequate for the job. if you want integration in your editor, these commands might work:
:argdo %s/foo/bar/
:bufdo %s/foo/bar/
:windo %s/foo/bar/
:!. of course, being somewhat of a fairly new user to Vim (only been using it for a couple years now), i'm always learning new features.
...although if you want to modify files not already open in the editor, again, sed works just as well and can be run from within vim with
My knowledge of vim... (Score:4, Informative)
Right slash to search
Period to repeat a command
I to insert at the beginning of the line, i to insert at the cursor
yy to copy a line, 5yy to copy 5 lines
dd to delete a line
cw to change a word
ma and y'a or ma and d'a to delete or copy a block
p to paste
u for undo
x to delete a character
% to find a closing bracket or parenthesis
That's really all I've ever learned or needed. It's a pretty small subset (and getting smaller with each release), but I get by on it!
Vim Crash Course :wq (Score:3, Informative)
Once you launch vim, you're in command mode. You do stuff in command mode.
When you need to type something, you need to switch to insert mode. Type i in command mode for that.
Type all of these in command mode to use them. To move from insert mode to command mode, press ESC.
j - move down
k - move up
h - move left
l - move right
i - insert mode
If this was all vim was, nobody would use it. The power comes in the ability to do complicated text manipulations with just a few keypresses. For example, you can do many commands more than once by prefixing them with a number. Typing 25l is equivalent to pressing the right arrow key 25 times in a typical text editor. You just saved 22 button presses.
I would personally recommend vimtutor, as another poster suggested. Just type that at a shell and vim will start with a text file that explains how it works. That's how I learned the basics. It took about 10 hours over the span of five days to go from absolutely no knowledge to being comfortable using vim regularly.
Good luck.
Another Cheat Sheet (Score:4, Informative)
Re:waiting (Score:4, Informative)
This is an effective little program for learning basic vi/vim.
Re:Steep learning curve...? (Score:2, Informative)
Re:My history with VIM (Score:2, Informative)
Append becomes very useful if you're writing a quick macro to tack or change something onto/in a filename and you don't want to bother with a shell script.
Suppose, for example, that you have a few files in a directory:
pic1.gif pic2.gif pic3.gif pic4.gif
And you want to convert them all to PNG. You can do this a few ways, but, these are what I use most commonly:
method 1, with bash)
for i in `ls *.gif`; do convert $i ${i%gif}png; done
method 2, with vim)
bash> ls *.gif > dothis; vim dothis
[now, in vim]
q1 [macro in register 1]
yy [yank this line]
p [paste it below]
k [move back up a line]
J [join the two lines together]
A ["append"]
bksp-bksp-bksp [erase the gif extension]
i ["insert"]
png
esc
0 [go back to the beginning of the line]
j [move down a line]
q [quit the macro]
10@1 [do that ten times]
1G [go back to the first line]
q1iconvert j0q10@1 [insert a bunch of converts]
bash> sh dothis
It looks more complicated than it is. Each step is simple and easy. It's only when you write it all down that it looks hard. The whole point of vi(m) is to stay the hell out of the way and let you move things around as easily as possible.
Re:waiting (Score:3, Informative)
Vim is my first choice for any quick edits. When coding, I like to have the comforting weight of Emacs behind me, but there's no way it's as fast as vim. Maybe it could be almost as fast if you got really quick with c-u.
Re:Vim Crash Course :wq (Score:2, Informative)
"Delete all lines which do not begin with the work 'ERROR'" (for log files):
"Comment out all lines that contain the word 'debug'":
"Indent the whole file":
gg=G
"Sort the file and delete double entries":
etc., etc.
Cream (Score:2, Informative)
Cream [sourceforge.net]
Re:I 3 VIM (Score:3, Informative)
http://limestone.truman.edu/~dbindner/mirror/#Vi-
"The spirit of Vi on one page."
Re:waiting (Score:2, Informative)
I would concur with the latter; indeed, Data General (back in the days of AOS/VS) used to bundle a version of Teco under the name of SPEED. Its only drawback was that the memory usage was quite heavy - but only at the user's end when trying to remember all those commands. ;-)
But, of course, most people these days tend to forget that Emacs started out as a set of macros for TECO (Tape Editor and COrrector).
Re:aside from bash... (Score:2, Informative)
Now I can live without it.
Oh, and remap your caps-lock key to behave as escape too, it's much more comfortable.
In X:
xmodmap -e 'remove Lock = Caps_Lock' -e 'keysym Caps_Lock = Escape'
On the console:
echo 'keycode 58 = Escape' | loadkeys -
On Windows:
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Cont
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,01,0