115 points · by vishal0123 · 13y ago · 152 comments
That said, I'm a switcher, too. I got fed up with the vaporware situation and moved to vim full-time a few years ago. I couldn't move back now.
But being on Emacs gave me an advantage of persistence. In past I have changed companies, development machines, operating systems and programming languages but never editor. It was always there, available.
``But even if TextMate 2 drops from the sky fully-formed and marveled at by all, Emacs will still be there, waiting. It will be there when the icecaps melt and the cities drown, when humanity destroys itself in fire and zombies, when the roaches finally achieve sentience, take over, and begin using computers themselves - at which point its various Ctrl-Meta key-chords will seem not merely satisfyingly ergonomic for the typical arthropod, but also direct evidence for the universe’s Intelligent Design by some six-legged, multi-jointed God.''
I imagine changing vi to vim would be a bit like changing Emacs to GNU Emacs.
vim pros: syntax highlighting is often nice (though when I really care about highlighting, I usually use Emacs), vim's :help is very nice, vim is usually installed
nvi pros: the small TCB I prefer when I'm root (`find /usr/share/vim -name \*.vim | wc -l` just gave me 1103 results, including hundreds of scripts that might be run without me explicitly asking for them), no splash screen, avoids the autoindenting that is often irritating, bound to vi on FreeBSD
I can't say nvi vs. vim efficiency has been an issue for me, but it has been for some people ... http://www.galexander.org/vim_sucks.html
Ed anecdote: A friend of mine once wanted to make an inverted version of sed, which takes commands on stdin and applies them to a file named in the arguments. I think he called it fsed. I facepalmed and gave him my copy of The UNIX Programming Environment.
I do have Notepad++ installed, and if I had to say, I probably use Beyond Compare for my meager text editing needs.
If I switch to other software stacks, I'll probably use Sublime (although I'd like to keep on using an IDE).
Edit: I'm not the only one
The only time I edit a text file outside my IDE is when I connect directly to a server, and in that case I use vi.
That seems ridiculous to chose Vi as my primary text editor, when 99.9% of my text editing is done in Intellij.
Well I abstained in this case, however where do you draw the limit ? If there was a poll about "What is your primary IDE" would Vim or Emacs not be listed because they are "just text editor" ?
Even the "vi" mode in a lot of distros is vim with a compatibility flag. And people only use it in an unknown system to edit some admin files in a hurry.
Vi in 2013 == Vim.
Try using heirloom vi or Solaris vi sometime. Even nvi adds a lot of convenience.
Odd that TextWrangler is on there but not BBEdit. Maybe could be grouped together like vi/vim.
Notepad replacement: Notepad++
Prolog, Haskell: Sublime Text (thanks to it, I can get rid of emacs completely)
Even when I was full-time in Linux, my go to IDE was KDevelop. And mcedit for simple text editing.
> Visual Studio
(Also don't forget it's coffee time in Europe)
Logically, you'd be right that it wouldn't make much sense. However geographical trends like that do happen. eg SLES tends to have more traction in Europe than in the US (where RHEL is king of the enterprise space). Opera is more widely used in Europe and some eastern blocks than it is in the States. Apple hardware has a lower foothold in Europe than in America. And so on.
Often it's just a case that people will use what they see their peers use rather than what they're told they should use by the internet.
For Android I use Eclipse, but hopefully the new editor from Google will be an improvement.
If you've got time and money to spare, and want to improve the editor you produce (not just use) then learn from the $300 SlickEdit editor. It does a lot of things right. And there's a go package for it.
Under Linux, I use Vim, emacs, and Geany, which is a lightweight IDE also based on Scintilla.
Nower days I mostly work in Eclipse inside a Linux VM (convoluted, but I've found Eclipse in OS X to be severely deficient for python - and I can work on files on my host filesystem via a shared folder.)
When I need to edit in Mac OS I use Textmate 2, but I've never actually used any of the magic of Textmate beyond the syntax highlighting (and the latex compile-to-PDF key shortcut.)
At risk of nitpcking, I think the "other CLI" option should have read "other console based" (that is, unless they were expecting people to answer with the likes of sed hehe).
But re:"other cli" I agree: even ed counts as console-based, not CLI (which would be sed, cat, maybe awk and echo... not fun, but of course real programmers use butterflies)
i'm making something like a transition from vim to sublime, so right now i use both equally.
but it seems to me that using vim on the server in a screen or tmux session is the right thing to do ( no need to leave into bash whatsoever ), while it's extremely pleasant to edit source files over sftp.
so i think i'll choose to use this combination ...
[edit]
Also, one thing that shows how Vim is oriented towards opening and closing it all time is that preventing acidental quitting is quite hard to achieve (only with hacks..)
I've rebound the arrow keys to switch and move tabs and buffers.
* up/down: previous/next buffer
* left/right: previous/next tab
* shift left/right: move tab to left or right
inoremap <Up> <esc>:bprev<cr>
inoremap <Down> <esc>:bnext<cr>
inoremap <Left> <esc>:tabprev<cr>
inoremap <Right> <esc>:tabnext<cr>
noremap <Up> :bprev<cr>
noremap <Down> :bnext<cr>
noremap <Left> :tabprev<cr>
noremap <Right> :tabnext<cr>
nnoremap <silent> <S-Left> :execute 'silent! tabmove ' . (tabpagenr()-2)<CR>
nnoremap <silent> <S-Right> :execute 'silent! tabmove ' . tabpagenr()<CR>
As for working with multiple files easier when vim's already open, it's a combination of Command-T, Buffer Explorer, and NERD tree.With a few mappings:
noremap <leader>b :ls<cr>:buffer
noremap <C-a> :b#<cr>
noremap <C-h> :bprev<cr>
noremap <C-l> :bnext<cr>:bn is mapped to backslash on my installation.
:b <tab> for a list of all open files where you can pick the one you want to switch to. Mapped to ",." on my machine.
vim might have its problems. But buffer switching isn't one, for me.
Just kidding, I've only used it in dire emergencies too.
When I worked at Google, I did all my coding in a custom version of nano which I'd hacked up to show an 80-column marker.
very lightweight yet super-flexible!
I consider Aquamacs's stated goal to be a worthy goal, but Aquamacs does not actually change Emacs's behavior to be more like an ordinary GUI app in situations I care about.
For example, in Emacs, if you use the pointing device to select an extent of text then hit the right (left) arrow key, the selection is increased in size by one character to the right (left). In contrast, the vast majority of GUI apps on Windows, OS X and Linux inactivate the selection leaving the insertion point at the right (left) edge of where the selection was (and you can get the behavior that Emacs uses by modifying the right-arrow key press with the shift key). Aquamacs chose the Emacs way of behaving here.
In summary, most of the choices Aquamacs made for when to do things the Emacs way and when to do them the standard GUI way differ from the choice I would have made.
P.S. In the situation examined above, the behavior of Acme (tested on plan9port on OS X) also differs from standard GUI behavior, but in a way different from how Emacs differs: Acme inactivates the selection, but then moves the insertion point one character to the right of the right edge of where the insertion point was, which makes some sort of internal logical sense (if the selection is considered to be a sort of insertion point that has temporarily stretched to be n characters wide) but is a poor design decision for Acme users that have to switch back and forth between Acme and other GUI apps.