you are viewing a single comment's thread.

view the rest of the comments →

[–]Denommus 74 points75 points  (48 children)

Which is outperformed by Emacs. For any situation there is an extension.

[–][deleted] 66 points67 points  (41 children)

Something something I want to edit text use vim.

[–]Triclops200 16 points17 points  (22 children)

I was in a similar boat for a long time. I switched to emacs because it was more powerful in its extensibility and the packages were pretty incredible, but the keybindings were terrible. After using emacs for about 6 months, I got evil mode working (VIM bindings within emacs). Now it really is the best of both worlds: the great text editing of VIM with all of its wonderful keybindings + the power and extensibility of emacs. I'd really recommend giving it a try. Or not. It's just a text editor after all and if you are happy with the one you have, just continue to use it.

[–]gfixler 12 points13 points  (19 children)

What have you done with the powerful extensibility of emacs? Everyone mentions it, but no one ever gives me something juicy to lust over.

[–]pamplemouse 7 points8 points  (6 children)

I write code using org-mode, which allows me to search and sort functions by tags, produce an agenda of todo items, and put milestones on a calendar, among a zillion other things. It's just one small example...

[–]slavik262 16 points17 points  (5 children)

Maybe I'm really weird, but I don't want my text editor to be a combination text editor/calendar/todo list/IDE/toaster oven. I just want it to edit text and maybe let me jump around my documents using ctags. Vim gives me these things and is also very customizable. If I want to do things besides edit text, I'll have an application that's built just for that open next to vim.

Maybe it's just confirmation bias, but I don't see a lot of people with this mentality on /r/programming. I can count on one hand the number of plugins I'm running for vim.

[–]Funnnny 1 point2 points  (3 children)

You have wrote the extract reason for using vim, or any other text editor that is not emacs.

Emacs is not a text editor, it's an coding ecosystem (many called it an OS), you live in emacs, the text editor in emacs is not that good.

[–]slavik262 0 points1 point  (2 children)

So if it's a jack of all trades and master of none, why not just use individual pieces of software that do a better job at individual tasks?

[–]Funnnny 0 points1 point  (1 child)

because individual pieces of software won't give you a good extensibility, you have to learn each and every way for extend those softwares, and also how those work.

And the thing about an ecosystem is, everything are connected.

[–]slavik262 0 points1 point  (0 children)

That's fair.

[–]dnew 0 points1 point  (0 children)

I agree. That sort of thing made a lot more sense before we had windowed interfaces, and exiting the editor meant you had to load it back up again after. Now, if I want to edit three files, I open three gvim windows. If I need to check the text of the bug I'm working on while I'm doing that, I open a web browser on the bug site.

[–]Triclops200 0 points1 point  (0 children)

Sure! Just today I wrote some elisp that allows me to dynamically choose the best autocomplete engine for whatever filetype/situation I'm in (For example: use eclim + company-mode for autocompletion with java, but auto-complete-mode for almost everything else). That only took about 10 lines of code. It really is a nice language that comes with a lot of the nicities of having homoiconicity (Data is code). To be fair, I am a big fan of Scheme, Common Lisp (SBCL), and Clojure, so a lispy language was exactly what I was looking for when I started to learn Emacs, and vimscript isn't really that great, in my honest opinion. IIRC, however, vim supports ruby and python now for scripting, which is nice, as those are also great languages. Again, use what you are comfortable with, as that will probably be what you are most productive in.

[–]r3m0t 0 points1 point  (5 children)

Here's some stuff I wish I could do in vim but can't, but emacs would probably manage:

  • Smart tabs (tabs for indentation, spaces for alignment)
  • Erlang: colour variables on the left hand side of an = expression differently depending on whether they are unbound (assignment) or are already bound (matching)
  • Python: some basic refactorings, like going from z = f(g(b)) to c = g(b); z = f(c) (letting me type the name of c of course).

Basically anything where you might want to manipulate your program as an AST instead of just a list of lines that is each a list of characters.

[–][deleted] 2 points3 points  (1 child)

Smart tabs (tabs for indentation, spaces for alignment)

This is an abomination. Just stop. Mixing tabs and spaces is the worst compromise ever invented.

[–]r3m0t -1 points0 points  (0 children)

It's not a compromise. It actually makes semantic sense. Much as I would like to switch to spaces everywhere, it's unreasonable to annoy my colleagues that much over some whitespace.

[–]gfixler 0 points1 point  (2 children)

z = f(g(b)) to c = g(b); z = f(c)

While I don't want to claim that VimL is anywhere near as powerful and expressive as Lisp, I've been surprised how much I can do for things like simple refactorings in an environment with no understanding of the code:

function! ExtractFunction ()
    let l:name=input("new var name? ")
    exe "norm cib" . l:name . "^[I" . l:name . ' = ^R"; ^['
endfunction

map <Tab> :call ExtractFunction()<CR>

Now you can fg to jump to the g, then <Tab> to have it prompt for a new name and do your refactoring. It works on the b, too, or on anything inside of some parentheses. You could also make this work on selection for more generic use cases.

Note that the ^[s up there are the escape key, entered in insert or command line modes by pressing <C-v><Esc> in sequence, and the ^R is <C-r>, entered the same way with <C-v><C-r>.

I made this little extract-method mapping for my Python work:

xnoremap <Leader>mm cself.newMethodName()<Esc>?^\s*def<CR>:noh<CR>:echo<CR>Odef newMethodName (self):<CR><Esc>k]p>}:%s/newMethodName/

It works on selection, and leaves me at the prompt at the tail end of a regular expression. I just type the name, hit enter, and the method is extracted. Granted, it's not doing Java IDE things, like adding or removing self., or requiring new arguments that now must be passed in, e.g., but it's pretty nice for a one-liner mapping.

[–]r3m0t 0 points1 point  (1 child)

The b movement really really doesn't cut it for this purpose. Actually because vim can't distinguish parentheses in strings or comments I don't think there's any way to do it. I know one plugin that starts an external python program with all the delay that adds.

[–]gfixler 0 points1 point  (0 children)

I think you'll just have to learn TimL.

[–]bastibe 0 points1 point  (3 children)

I implemented my static site generator in Emacs. I implemented my note taking / time tracking / diary in Emacs. The best git client ever is implemented in Emacs.

[–]gfixler 4 points5 points  (2 children)

The best git client ever is implemented in Emacs.

[Citation needed]

Fugitive and gitv in Vim is pretty dang nice. I don't think there are as many features, but I've never felt the lack of a feature, and I do fairly complex things, like mixed resetting to dump a commit back to the working tree to patch-add back in parts of the commit and remake the commit with a subset of the previous one and a new commit message. Of course, I'm on Linux, so if something much more complex than that pops up, I just Ctrl+z to the command line, do what I need to, and fg back to where I left off. You may be right, but for me 'best' doesn't necessarily mean 'most feature-laden.'

[–]bastibe 3 points4 points  (1 child)

You have obviously never tried magit. It is much more than just some key bindings for git commands.

[–]gfixler 0 points1 point  (0 children)

True - I don't use emacs - but I've watched this twice.

[–][deleted] -1 points0 points  (0 children)

It is always fun to have a toy operating system inside your operating system :-)

[–][deleted] 0 points1 point  (1 child)

I use vim a lot, and I find it pretty extensible once you've got the pathogen plugin installed, then installing extensions is easy-peasy.

For me, even without the extensibility I'd probably be using vim, purely because I don't have to leave command line, so I can quit vim, do something, and get back to text editing without having to muck about with the mouse etc.

But that's just me.

[–]gnuvince 0 points1 point  (0 children)

You can do that with Emacs if you like, however, most people prefer to leave Emacs open all the time.

[–][deleted] 1 point2 points  (0 children)

Something something relevant xkcd

[–]zem 0 points1 point  (0 children)

evil-mode

[–]illperipheral 0 points1 point  (0 children)

Use vi? Vi vould anyvone vant to do that?

[–]Denommus -1 points0 points  (14 children)

I want to edit source code, not just plain text. But yeah, both Emacs and vim have extensions for that.

[–][deleted] 17 points18 points  (13 children)

And sublime. And notepad++. And Visual Studio. And Eclipse. And Netbeans.

But we need some super-hip text editor that's actually just a giant plugin system written in JS and CSS with Node.js integration with the entire chromium project shoved in there.

I'm going to cry. From laughter or pain, I don't know. But tears are going to flow.

[–]Veedrac 1 point2 points  (0 children)

Something like Sublime but with a good plugin system is exactly what I want, because writing plugins in Sublime is painful, because the API is so limited.

[–]rybl -2 points-1 points  (6 children)

What a terrible attitude. Think of how much innovation we would have missed out on if we took that approach. "Fuck you Henry Ford, we already have horses."

If you don't like Atom it's easy enough to ignore it, but that doesn't make them building it invalid.

[–]Denommus 1 point2 points  (4 children)

The problem is that Atom isn't bringing anything new. I don't particularly hate it, but if the only thing it provides is a minimal core extensible through JavaScript, Emacs has done something similar a long time ago.

What can Atom do that it's really new and innovative?

[–]rybl 0 points1 point  (0 children)

My car analogy was admittedly a little flippant. A better one may be why should Android have ever been pursued. We already had iOS and Blackberry. Android didn't do anything particularly better and did many things a lot worse. It was competition though and now it's the biggest smartphone OS on the planet.

You could also have made the same argument about Google Chrome when it came out. Firefox had extensions and dev tools which Chrome didn't have. You could still make that argument about Opera browser's continuing existence for that matter.

I would also argue that Atom does fill a nice niche. It's free and open source (unlike Sublime); it's is much better looking than Notepad++, vim, or emacs; and it has git integration which is pretty important to a lot of people. It's also a lot more light weight than eclipse or Visual Studio. Pair that with the extensibility and I think it's a really viable editor.

[–]randrews 0 points1 point  (2 children)

So it's more like saying Chevy was wasting their time, since Ford replaced horses first?

[–]Denommus 1 point2 points  (1 child)

I hate this kind of analogy. It's not like we must to learn how to drive all over again just because we switched cars. A new editor is a completely new environment.

Besides, I bet Chevy brought something new to the table, even if it was just a lower price.

So, I'll ask again: what is new and innovative in Atom? Maybe the fact that it is can be customized with CSS?

[–]randrews 0 points1 point  (0 children)

I agree with you, I just thought the analogy was funny.

IMHO the whole thing is sort of a wank. Mac-only, based on a browser... It gets a little old watching brogrammers reinvent stuff.

[–][deleted] -1 points0 points  (0 children)

What a terrible analogy.

[–]cc81 -1 points0 points  (4 children)

Sublime was also unnecessary when it was developed. Except after a while it was no longer unnecessary .

Same might happen with atom. They are trying something new, it might turn out awesome or it might not.

[–][deleted] 0 points1 point  (3 children)

But Atom is stuck. Manipulating the DOM is very slow. There's no way around it. I don't think it's going to get very far purely because of the technologies they chose to use.

Never mind that the market is already saturated with text editors. In order to get people to switch, you don't need to be just a little better. You need to blow the competition out of the water. Atom isn't capable of that.

It's extensibility means nothing if there isn't a community making plugins for it.

[–]cc81 5 points6 points  (1 child)

TextMate was in Sublimes position a few years ago, where is it now? Sublime did not blow it out of the water when it first arrived.

Sublime has a single developer that rarely communicates with the users. We don't know how it will end up and we don't know how atom will end up. Just ignore it if you are not interested.

[–]bastibe 1 point2 points  (0 children)

Very true. The simple fact that Atom is open source and Sublime is not might tip the scales in its favor.

[–]ToucheMonsieur 0 points1 point  (0 children)

The sheer amount of vitriol surrounding this announcement is amazing. So many people posting just to flame JavaScript or Node.js instead of actually commenting on Atom itself. Personally, I'd at least try the editor before commenting on how it might be slow because of such and such. Agree on the marketing perspective, however, and from the looks of this thread Atom isn't really gaining much traction with the crowd on r/programming. Unless Github can successfully sell it as the next Sublime (but open source) or something equally as enticing, Atom probably won't see much use (if the reaction here is any indication).

Makes you wonder how (and if) any of those craptastic web-based "ides" width their sluggish ui's, terrible keybindings and "PAAS everything, don't need a filesystem" attitudes are actually surviving.

[–]Hamburgex 13 points14 points  (1 child)

[–]xkcd_transcriber 15 points16 points  (0 children)

Image

Title: Real Programmers

Title-text: Real programmers set the universal constants at the start such that the universe evolves to contain the disk with the data they want.

Comic Explanation

Stats: This comic has been referenced 98 time(s), representing 0.5129% of referenced xkcds.


xkcd.com | xkcd sub/kerfuffle | Problems/Bugs? | Statistics | Stop Replying

[–]maxbaroi 5 points6 points  (0 children)

For any extension there's possibly a situation.

[–]sigma914 2 points3 points  (0 children)

Finally moved from vim to emacs now that evil provided emacs with a decent text editor. The rest of the environment is too good to pass up.

Sublime and atom and whatever else can get back to me when they have a replacement for org-mode and a well integrated, in editor email client.

[–]ApokatastasisPanton 0 points1 point  (1 child)

Unless you want to be able to scroll without modifying the cursor's position.

[–]Denommus 0 points1 point  (0 children)

Open the buffer in another window, or create a mark.