[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Text Editor Indecision
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 16
Thread images: 1
File: emacs-vim-icons.png (106 KB, 471x381) Image search: [Google]
emacs-vim-icons.png
106 KB, 471x381
Post your stories:

I've used Vim, Emacs, Joe, Nano, ne (nice editor) and mg (the editor formerly known as micrognuemacs) to various degrees and always found something that annoyed me.

Vim:
+ modal
+ many useful plugins
+ visual block mode
+ leader key "reserved" for end user is a nice touch
- VimL is awful. my .vimrc just consists of useful snippets stolen from various places on the net. I'm afraid to touch most of it and have almost no ability to debug anything I didn't write myself.
- terrible buffer management. I don't get the whole buffer/window/tab thing, I just want something kind of like the emacs model where I can perform splits and summon buffers by name.
- mark and kill ring is not as intuitive as emacs.
- POSIX regular expression instead of Perl-compatible ones

Emacs
+ Decent extension language (elisp). We already have lexical scope now we just need modules.
+ extensive in-language documentation.
+ tramp-mode and various niceties for working with remote files
+ mark and kill ring
+ generally easy to customize and hack packages at a fairly deep level.
+ some modes have realtime feedback mechanisms, though still not quite at IDE level.
- default keybindings suck.
- no level of indirection between modes and keybinding. You can't rebind C-c for instance because the various minor modes will add mode specific keybindings and trample your binding.
- startup time is terrible if you use something big like evil-mode (very short if you don't)
- managing rectangles could be easier.
- regexes suck. Seriously they're just bad. The rules about when metacharacters have their literal value are really counterintuitive (especially when you take character classess into account).

My experience with Joe, Nano, Ne, and Mg have been similar enough to each other to lump together. In some ways they're really nice because they have minimal clutter and everything you need to know is on the man page. Oftentimes there'll be a bit of functionality you are used to that isn't there.
>>
>>55150439
I used vi for a long time, but now I use Kate.
Good default key bindings if you don't want vi mode, no unique features, but nothing I have used is missing.
Still use vi for server and when I need root.
>>
- terrible buffer management. I don't get the whole buffer/window/tab thing, I just want something kind of like the emacs model where I can perform splits and summon buffers by name.

what? Vim has really similar buffer management with Emacs. :vsp <filename> vertically splits your buffer and opens a file in the new one.
>>
In a small editor like joe, nano, ne, or mg some bit of functionality you're used to will be missing. Mg for instance, doesn't have rectangle mark mode and cannot generally store multiple markers on a page. Not being able to easily navigate to locations I had previously visited in a file like in vim (marks, <c-i>/<c-o>) and emacs, (registers, C-u C-SPC) is frustrating. The lack of completion is also frustrating. The Vim and emacs systems may not be perfect (C-n and C-p cannot complete multiple words in vim and emacs doesn't give you an easy way to abort a hippie-expansion if none of the expansions are right, you have to undo them one at a time).

The main upside is that it doesn't take long to learn the editor inside and out and if you make a change the change takes effect everywhere. There aren't any hidden downsides so rebinding keys because the tool simply isn't that complex.
>>
>>55150439
Started off on IDEs. Visual Studio to be exact. Grew out of that and began my search for a text editor proper.

Started off with Vim.
- wasn't so bad.
- lots of plugins.
- used macros a ton.
- basically got the job done.

Tried Emacs once and it didn't work out between us.

Stumbled upon sublime text 2 and used that for a semester or so, but it felt a bit weird. I liked it, but I think it still felt weird.

Tried emacs again and again it didn't workout. Went back to vim.

Tried emacs AGAIN and it actually stuck and I've been using it ever since. It was right around the time I switched to slackware too.
>>
>>55150536

I'll try to explain what I mean in a bit more detail, so you can tell me what part of vim I'm not understanding.

So vim vs emacs is a bit like tmux vs screen.

In Emacs and screen, you manage geometry and buffer contents independently. I really like this. It's very intuitive. C-x 0 closes the current window (in emacs terminology), C-x 1 makes the current window the only window in the frame, C-x 2 does a horizontal split and C-x 3 does a vertical split. There's fancy stuff with C-x 4 and C-x 5 that I never use. You can use C-x b to change the buffer that is shown in the current window.

The vim interface, as far as I can tell, is not as orthogonal. I have a list of buffers. I can create new tabs, I can manage splits inside my tabs. However tabs and splits are not ephemeral things. I build up a whole bunch of state about which buffer is where and it seems like I spend a lot of time navigating to the right buffer.

In vimland there is, as far as I can tell, no direct equivalent of C-x 1 which maximizes the current window and leaves the other buffers hidden but not modified. I'm probably wrong about what vim can do, but that's been my experience with it so far.
>>
>>55150604
evil-mode, emacs-prelude, spacemacs, or vanilla emacs?
>>
>>55150675
Vanilla emacs.

I tried evil-mode, but it just seemed horrible. So I decided to quit vim cold turkey. As long as I remember the basics in navigating and saving, I'm fine. As emacs isn't installed on every system.
>>
>>55150439
>regexes suck. Seriously they're just bad. The rules about when metacharacters have their literal value are really counterintuitive (especially when you take character classess into account).
Have you seen Vim's regexes?

3. Magic                            */magic*

Some characters in the pattern are taken literally. They match with the same
character in the text. When preceded with a backslash however, these
characters get a special meaning.

Other characters have a special meaning without a backslash. They need to be
preceded with a backslash to match literally.

If a character is taken literally or not depends on the 'magic' option and the
items mentioned next.
*/\m* */\M*
Use of "\m" makes the pattern after it be interpreted as if 'magic' is set,
ignoring the actual value of the 'magic' option.
Use of "\M" makes the pattern after it be interpreted as if 'nomagic' is used.
*/\v* */\V*
Use of "\v" means that in the pattern after it all ASCII characters except
'0'-'9', 'a'-'z', 'A'-'Z' and '_' have a special meaning. "very magic"

Use of "\V" means that in the pattern after it only the backslash and the
terminating character (/ or ?) has a special meaning. "very nomagic"
>>
>>55150745
cont

Examples:
after: \v \m \M \V matches
'magic' 'nomagic'
$ $ $ \$ matches end-of-line
. . \. \. matches any character
* * \* \* any number of the previous atom
~ ~ \~ \~ latest substitute string
() \(\) \(\) \(\) grouping into an atom
| \| \| \| separating alternatives
\a \a \a \a alphabetic character
\\ \\ \\ \\ literal backslash
\. \. . . literal dot
\{ { { { literal '{'
a a a a literal 'a'

{only Vim supports \m, \M, \v and \V}

It is recommended to always keep the 'magic' option at the default setting,
which is 'magic'. This avoids portability problems. To make a pattern immune
to the 'magic' option being set or not, put "\m" or "\M" at the start of the
pattern.
>>
>>55150643
No. tmux and screen are basically the same thing.

Emacs and vim are polar opposites.
Emacs: shitty out of box defaults, easy to customize
Vim: great out of box defaults, hard to customize

It's easier to implement Vim in Emacs than Emacs in Vim (which is impossible).
>>
>>55150773
What's so shitty about Emacs defaults?
>>
>>55150773

I don't disagree with you that emacs could emulate vim easily. (Evil-mode already exists).

I meant exclusively their approach to idk let's call it geometry management.

Screen and emacs have one model. You have a totally flat collection of named buffers (in screen it's a shell session but you get the idea). Each buffer has no idea whether it's visible or invisible.

You also have a frame (you can more in graphical emacs if your application has multiple windows, but w/e), which is organized into windows. You have some primitive operations for creating, resizing, and destroying splits. These operations have no impact on the collection of buffers, they only affect what buffers are visible and where they are in the frame.


I use vim more than I use emacs, but I couldn't describe its approach to geometry management in a simple way, so I will speculate wildly instead. Ignoring vim tabs for the moment, there is, as far as I know, no easy way to take a buffer currently in a split and hide it without closing the buffer (the emacs equivalent of C-x 0) There also isn't an easy way to take a buffer that is currently in some split, possibly deeply nested in the split tree, and make that buffer the only one visible (the equivalent of C-x 1), again without closing the buffers that were previously visible but no longer are.


The distinction I'm trying to make is also similar to the differences between ratpoison and, say, xmonad or i3. Ratpoison does not have virtual desktops/workspaces. You have a bunch of windows. They're all hidden by default. You can perform splits and manage the geometry independently.

In XMonad and i3, buffers are intimately tied to their location within a workspace. In XMonad the contents of workspaces are ordered and a geometry is imposed on that linear order. In i3 you perform splits and resizing manually within your workspace, the windows within a workspace or organized in a tree.

Ratpoison is like emacs. XMonad/i3 are like vim.
>>
>>55150745
>>55150753

Yes I have and they are lacking many of the Perl/PCRE regex features. As far as I know you can't do named capture groups or lookaround, for instance.
>>
>>55150439
SpaceMacs aka eMacs with Vim mode
>>
>>55150959
Emacs being Emacs, if you really miss it that much, you can always implement it yourself in Emacs Lisp.

http://stackoverflow.com/questions/9118183/
Thread replies: 16
Thread images: 1

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.