Hacker News new | past | comments | ask | show | jobs | submit login
Vim After 11 Years (2013) (statico.github.io)
107 points by mparramon on Nov 1, 2014 | hide | past | favorite | 132 comments



I'd add to that to try and start using neovim. I've switched to it on Mac without a hitch and we (Floobits) have already moved our vim plugin to use the new neovim python-client plugin for much better async behavior. Making an async plugin for NeoVim is pretty trivial, here's a clock in your status bar:

https://gist.github.com/btipling/0d6faa80b24ccee5caea

Note this requires +python, :he nvim-python for how to get that (involves pip install neovim)

You can't do something like this clock in vim without the feed keys cursorhold hack that breaks using leader keys. Otherwise I'm still using vundle and have made 0 changes in my .vimrc other than move it all to .nvim and .nvimrc. All my plugins and vundle worked out of the box.


I had put neovim out of mind and settled for emacs/evil, but seeing an actual use case for the new plugin system makes me hopeful for it's fast growth and adoption.


Remember that floobits are the people that threw a tantrum when upstream vim wouldn't accept their patches, and have a vested ego interest in pushing a vim fork.


Source?


Eh... unless there's more to the story that I'm missing out on, I don't think it's fair to say they "threw a tantrum".

Basically, that company has a service that lets developers do real-time collaboration. Like working on a Google Docs document... except that it's for code, and collaborators can all use whatever supported editors they like. When they went to add support for Vim, they ran into problems with the "real-time collaboration" part... because Vim is single-threaded and doesn't have a non-blocking event loop:

https://news.floobits.com/2013/09/16/adding-realtime-collabo...

So they kinda hacked together the means for a non-blocking event loop, and submitted it as a patch to Vim:

https://news.floobits.com/2013/09/17/adding-settimeout-to-vi...

The Vim maintainers kept rejecting it, for different reasons each time. After two months of back-and-forth, the Floobits guys asked the Vim guys to either give a comprehensive list of things in the patch that need to be different... or else acknowledge that they simply don't want the event loop thingy merged at all, and that Floobits should move forward with their own fork of Vim instead:

https://groups.google.com/forum/#!topic/vim_dev/-4pqDJfHCsM[...

Personally, I don't have an opinion one way or the other on the merits of that patch. However, I think the Floobits guys were justified in feeling frustrated about the Vim guys dragging their feet and not being completely forthcoming.

Either way, if you do some quick web searching, you'll notice that Floobits became pretty big fans and online promoters of NeoVim from that time forward! So much so that you kinda have to take it with a grain of salt.

I'm not exactly sure what to even think about NeoVim. They've been plugging away for over a year, their GitHub repo has over a hundred contributors and two-thousand commits, and yet it's still pre-alpha? Also, the primary purpose seems to be allowing people to write Vim plugins in any programming language. However, it's not like the Vim ecosystem is hurting for plugins today. Besides, the whole point of "vimscript" is that it's self-contained and baked-in as part of the editor. Totally cross-platform, and always there. If I install a NeoVim plugin, then I have to make sure I have the right version of Ruby or Python or whatever on my box to support it? Yuck, no thanks.

As near as I can tell, any real value-prop for NeoVim is using it as an embeddable component. Like the Cloud9 guys' cloud-based Ace editor (http://ace.c9.io), or as something that IDE makers could bake into their desktop IDE apps. I don't really see what's compelling about it head-to-head with standard Vim, assuming it ever fully ships.



You're the one whose bad patches were rejected, you just dug through a year's worth of my comment history, and you're constantly and heavily promoting a terrible-design-and-still-no-beta-even-after-a-year-and-a-lot-of-donated-money fork of someone else's open source project ...

... and I'm the one with an axe to grind?


Neovim will have Lua (and LuaJIT) baked-in too, so Lua will always be there.

In my opinion initially there might be many different languages used by developers as they try out the new versatile plugin infrastructure. But after a while only a few languages should emerge as the dominant ones, because developers have the desire to help as many people as they can by making their plugins easy to be deployed and configured. I would guess Vimscript and Lua(both baked in), Python(nowadays it's practically ubiquitous) are the more popular choices. Personally I like Go (fast, easy concurrency, and single executable deployment).


Imagine that one day you want to use 10 plugins and have to setup all 10 language environments to use those plugins, and you have to set the whole thing on Windows...


You make a good point, and maybe nvim's decision to open up plugin languages will come back to bite it in the ass. It is a form of fragmentation in a sense, but I'm hoping the benefits will outweigh the drawbacks.


Does vanilla neovim offer anything that a vanilla vim user might like? I imagine I will make the switch at some point, I just wonder if there's any compelling reason to do so sooner rather than later.


It's pretty much still the same experience. Once plugins that take advantage of the async and when gui's take advantage of the API I'm pretty sure neovim will not just be equal, but far superior.


"It’s so useful that I’ve bound it to ; (and nobody remembers what ; does anyway)."

The original binding of ; is super useful, and I would argue it should not be rebound.

; repeats the last f, t, F or T command.

There's also , which is the same as ; but in the opposite direction.


I agree. I initially found many recommendations to bind "," as leader, and it was convenient, but after learning what ";" and "," do, I've changed my leader to <space>.


SPACE is good as leader, and also as :

But I've found it to be most useful as page-down (with BACKSPACE as page-up).


I'm also using <space> as my leader. In case anyone else wants to try it, and struggles to make it work, I had to do the following to make it work:

    map <space> <leader>
rather than simply setting mapleader to space directly. If someone else knows why, I'd be interested to know!


What's a leader?

Googling some, it seems to mean a backslash in the vimrc... but I don't really understand what you mean.


It's a way of namespacing commands—if you install NERDCommenter, for example, <leader>cc comments out the current line (whereas cc by itself changes the current line). It's traditionally bound to backspace, which is actually-free, but many people bind it to keys that are free but never used personally.


Yes! Glad I'm not the only one who uses ;.

The only thing I never understood was why ; doesn't go beyond the current line (n does). Is there a way to make it?


I have always just used / and n N. What is the difference with f and t?


f jumps to the next occurrence of a particular character on the same line. F jumps to the previous. t and T do the same thing, but jumps to the character immediately before.

For example, if you were at the beginning of the following text:

foo(bar, baz);

Typing f,dt) would change it to:

foo(bar);


I have a hard time understanding vim users. All the cool features listed in this article exist in any modern text editor. I personally use Notepad++, but I'm sure the same goes for Textmate, Sublime Text and many others.

The only advantage I can see in Vim over a modern solution is that it runs in the terminal (which I guess is useful if you like to remotely modify files in your production environment?). Is it that after they have spent so many years learning the arcane controls, users feel obligated to stick with it in order to justify all the time they've already invested?

I must say I've only spent ~2 months of my life using vim before giving up, which I think is already pretty long for an evaluation. I have never experienced or even witnessed the productivity gains you're supposed to get from mastering vim. All I've seen is very unintuitive shortcuts for Ctrl+Backspace advertised as unique features in the world of text editing.

I would be very happy if someone could point out to me the elephant that I am not seeing here.


The stuff listed in this article are the places where Vim was trying to catch up with modern editors, not where Vim excels. Vim is an old editor, for modern features, Vim has been the one that's catching up, and luckily it did. But that has nothing do with why people love Vim.

Vim, in pure code editing sense, has two unique advantages that no other editors have or dare to have: modal editing and ubiquity.

Modal editing makes code editing absolutely DRY, as users can avoid any repetitive typing/clicking that they wish to avoid. It doesn't necessarily increase your code throughput much as a lot of the time you'll be thinking instead of typing, but it reduces the frustration of editing to almost zero when you do have to type, hence reducing distractions and cognitive load. Once you are familiar with Vim, its commands have close to one-to-one mapping to ANY ways you want to edit code.

For example, you want to change the html text two lines above? kkcit. Then come back to the place where you left? g;g;. Re-indent the lines? =ip. They look foreign and unintuitive to non-vim users, but are actually muscle memories for vim users. This is probably why vim users swear by it, but non-users find it hard to love.

Ubiquity is something you can only appreciate when you have to. If your work environment is Windows, this probably won't occur to you. But if you have to code in different OSes, or in SSH sessions, or in git commit, or in less/man commands, you'll find vim invaluable.

After all, Vim is just a tool, a very good one. But if your work doesn't have the need for it, you won't find it useful.


There is no elephant in the room. Vim will not make you more productive, period. Vim unequivocally takes the fewest keystrokes to effect changes, but its certainly not the fastest editor. At Floobits, we sometimes have 3 devs working on the same code at the same time (normally when something goes really wrong). When ggreer is around, he is always the fastest to edit text bar none. He uses ST3 and a trackpad. If someone is using some Intellij (PyCharm, Idea), that person is the fastest and safest at refactoring bar none.

It may be true that some magical Vim invocation is the fewest key strokes in any text editor to edit text. In practice real world Vim users probably lose just as much time as they save trying to find the magical incantation. Beyond saving a few keystrokes, consider how wasteful it is to devote months of effort learning a new text editor when editing text is such a small fraction of the time we spend programming. Are programmers ever limited by how quickly we can type? No, we are limited by how quickly we can think!

Having said that, NeoVim is a fairly decent choice for a text editor. It is open source, runs in a terminal, is actively developed, and (vim) is installed on nearly every *nix by default.


Great point - the editors still can't process code as well as compilers. This should be hapenning already.


(quotes paraphrased for brevity)

  Vim will not make you more productive.  At [gratuitous company plug!], the
  dude with Sublime is the best touch-typist, and the guy with an IDE is
  good at refactoring.
These are false comparisons, and have absolutely nothing to do with Vim.

Does your Sublime guy code fast because he's an amazing touch-typist, or because he has better command over Sublime's shortcuts and special features than your Vim guys do? If it's the former, then it's irrelevant. If it's the latter, then it clashes with the point you tried to make in the next paragraph.

Of course your IDE guy is better at refactoring code. (S)he's using an IDE. That's what they do, better than any text editor. Comparing editors to full-blown IDE's is fairly "meta" to the topic at hand. However, it should be noted that almost every major IDE has built-on or plugin support for popular editor keybindings. I use Vim keybindings with IntelliJ... and even with my fairly baseline Vim familiarity, I'm able work several times more fluidly than on vanilla IntelliJ.

  It may be true Vim requires the fewest key strokes to edit text.  In practice,
  you'll lose more time finding those ideal keystrokes.  It's wasted effort to
  learn a text editor, because programmers are not constrained by typing speed.
This is just outright nonsense, and tells me that you personally have never learned to use any text editor well. Sure, I would agree that it's unproductive to scour StackOverflow for a magical one-step incantation for EVERY thing you ever do. However, that is not what being proficient with Vim (or any other text editor) means. It means you organically pick up on things over time, such that you aren't having to think about it when using them.

If you pick up Drew Neil's book "Practical Vim", it's structured around 121 "tips". Each one is short, clear, and something that you can pick up and internalize in an hour. After the first 24 or so, you will absolutely be more productive that you would be with "Windows Notepad" bindings in the same situation.

It's not about crazy incantations that refactor your entire codebase in one keypress. It's about simple little things, that add up:

* I want to add an extra parameter to this method I just wrote. So rather than taking my hand off the keyboard and clicking there with my mouse (or hitting the arrow keys over and over), I just press "f)" to jump to the closing parentheses and start adding text.

* I want to replace everything on the current line, starting from my cursor position somewhere in the middle of that line. Rather than moving my hand to the mouse and dragging a selection, or holding <Shift> while hitting the arrow keys over and over, I instead just press "c$" and start adding text.

Sure, commands can be a bit arcane, but I learned them organically over a period of time... and these are real-world things that I do many times almost every single day as a coder. I probably only use 10% of Vim's available functionality, and that's enough to make my coding a much more fluid experience than it was before. Until you've experienced it first-hand, it's hard to grasp just HOW DISRUPTIVE it is to your flow and thought process to move your hand from the keyboard to mouse and back!

I don't care which editor (or IDE keybindings) you use. Vim, Emacs, Sublime, whatever. But you will absolutely be a more productive programmer if you pick one and dig into it over time. You ARE limited by your typing flow, and just don't realize it. If anyone really believes that isn't the case, then why bother to learn touch-typing? Take your two index fingers and try coding with the "hunt-and-peck" method, and see how it doesn't limit your thought process.


Great post, thanks for writing it.

Since you mentioned you're using vim keybinding yourself, I thought I'd mention that any time you type x$ (where x stands for delete, change, yank, etc), it's better expressed as X[1]. You mentioned c$, but C is the same thing.

[1] - Vim actually breaks this pattern on y—Y is the same as yy out of the box. But almost every vimrc I've seen remaps Y to y$ for consistency.


If I understand, your statement that X is better than x$ is based on keystrokes.

But there are other ways to look at that.

x$ is more consistent with the general idea of verb object. If part of your memorized subset of Vim includes xiw (do x In Word), xe (do x to the End of the current word), x) (do x to the end of the current sentence), etc, then x$ fits in with that. In fact for this reason (not consciously decided), I almost never use X variants.

For me personally, there is also less wrist-twisting if I don't use X, which involves moving my pinky down to the shift key; that always feels like I'm walking up to the edge of carpal tunnel.

But bottom line, none of those and similar choices are objectively superior to the others. What matters most is how much of what you do can be done with no conscious thought, that it just happens. The best parts of vim for me are the ones I no longer know how to do, the ones that are in muscle memory and that I have to stop and think about after someone asks "how did you do that?"

From that point of view, YVSANMVSBYVSAOK[1].

[1] Your Vim Strokes Are Not My Vim Strokes But Your Vim Strokes Are OK.


Hmm, wouldn't you have to use the shift key anyway for the $ part of c$?


Hmm, you're right. Just goes to show that I don't think much about what I do in Vim. :)

But the consistency of combining known verbs with known objects still holds. If I know a verb I can operate on any object. If I know an object (motion) I can use any operator on it.


Wow, thanks! This is exactly what I'm talking about, with organic learning over time. Just about every week, I pick up some little tidbit like this, which makes my editing flow a little bit smoother than it was the week before. I doubt that I'll ever know EVERYTHING, and that's okay.


I'm the guy kansface mentioned. I've spent a decent amount of time figuring out how to make my programming experience better.

I've tried almost every editor out there: Vim, Emacs, Sublime Text, Textmate, Visual Studio, IntelliJ, and Atom. I've customized them all with plugins. I've even written plugins for most of them. My first editor was pico, quickly followed by Vim.

My toolsmithing goes beyond editors. I've tried different keyboard layouts to improve typing speed, settling on dvorak with qwerty shortcuts. I even gave chording keyboards a shot. I built Ag[1] to search code faster.[2]

I don't own a mouse. If I want to point at something, I use a trackpad. Switching to/from it is much faster than grabbing a mouse.

People don't want to hear this, but I could not be as fast in Vim. Even if Vim had every feature in my current setup, it would still be slower because Vimscript executes synchronously. Executing plugin code blocks Vim's UI. If a plugin spawns a subprocess, the UI will be blocked until it exits.

With Vim, you can't start a search and examine another file while it's running. This problem can be worked-around by using multiple Vims or searching from the command line, but then you lose quick opening/replacing of results. You can also abuse certain AutoCmds and updatetime to get a sort-of working async execution, but it requires each plugin have its own event loop.

I agree with kansface: Vim users may type less, but they don't move faster. I have yet to see a Vim user who has impressed me with their speed. I typically see wasted motion, waiting for commands to finish, and fixing mistakes in regexes. Even your example invocations are as good or better in Sublime Text.

I want to add an extra parameter to this method I just wrote. ... I just press "f)" to jump to the closing parentheses and start adding text.

That does not jump to the end of the function definition. That does a search for ) on the current line. If your cursor isn't on the right line, you're SOL. Also, ) shows up in many places. It may not be part of a function definition in the language used. In my setup, "cmd + r, up" goes to the previous function definition no matter the language. If I want to go to the end, that's ctrl + m.

I want to replace everything on the current line, starting from my cursor position somewhere in the middle of that line. ... I instead just press "c$" and start adding text.

For me, that's ctrl + shift + e, (start typing). Unless you have a $ key, both are three keystrokes.

If you use Vim and you're happy with it, great. But I would heavily discourage anyone from switching to Vim. Editors and UIs have come a long way in the past 25 years. Even with nerdtree, YCM, and other plugins, Vim can't catch up. NeoVim looks promising, since it fixes Vim's architectural problems.

1. https://github.com/ggreer/the_silver_searcher/

2. http://geoff.greer.fm/2011/12/27/the-silver-searcher-better-...


I understand that your company butted heads with the Vim maintainers last year (as discussed elsewhere in this comment thread), and that an asynchronous plugin architecture would be super-helpful to your company's integration needs.

However, if you are announcing with a straight face that Vim slows you down because of synchronous regex scans, then that is flatly ridiculous. Are you editing terabyte-sized source files? Because if so, then perhaps some refactoring is in order (get the PyCharm guy to do it)! My mind is boggled by the number of plugins one would need to install in any text editor for the difference between synchronous and asynchronous execution to even be perceptible on a contemporary laptop with a typical file.

I mean, if you are happy with your text editor of choice, then godspeed and enjoy ("editor wars" are always a bit tongue-in-cheek). However, if you're adding a slew of IDE-like plugins to Vim (especially a pig like NERDtree), then beyond a certain point it makes more sense to just install the JetBrains product relevant to your language, and use whatever keybindings you like from within that.

The way you guys all keep plugging NeoVim (which doesn't even have an alpha release yet) definitely smells fishy, a transparent axe to grind. The Vim guys didn't want your patch. Sorry.


I point out an architectural shortcoming, explain how it affects me, and you say the real problem is that I have too many plugins, the files I edit are too big, or my computer is too slow? Whose mind is boggled now?

The way you guys all keep plugging NeoVim (which doesn't even have an alpha release yet) definitely smells fishy. The Vim guys didn't want your patch. Sorry.

There's nothing fishy about our support for NeoVim. We don't know the authors (though I, personally, did throw some money at the Bountysource). There are a few reasons why we like them:

1. They share our pain. Thiago de Arruda (main author of NeoVim) tried to add a similar patch to Vim. Like us, he spent months trying to work with the Vim community before being rejected.[1]

2. We like NeoVim's architecture. If we had infinite time, we'd be writing a very similar editor.

3. NeoVim makes our product better for Vim users. They get the UI they love, but without a broken leaderkey or other annoyances.

While the readme says it's alpha-quality, it works fine. It can be used with current Vim plugins and performs better than Vim.

1. https://groups.google.com/d/msg/vim_dev/65jjGqS1_VQ/fFiFrrIB...


The "effect" that you described was being unable to work at a normal speed, because you browse directories faster than NERDtree can display them. Because you can't start a text search in a background thread, and work with other files while that's running. Etc.

You know, about once or twice per day I have to do a text search through a 750,000-line codebase. IntelliJ blocks also, but it completes in 3 to 4 seconds... and Vim searches a hell of lot faster than IntelliJ. In two decades of working with vi/Vim, I've only experienced UI sluggishness when working with log files that were each hundreds of megs in size.

So to be clear, when I suggested that you might use too many plugins, that was sarcasm. To be even more clear, I was flatly calling you a liar about your original premise.

Synchronous vs. asynchronous plugin execution is not an "architectural shortcoming". It's an "architectural decision". An architectural shortcoming is something that two separate submitters can't each resolve with a single patch. Right or wrong, the Vim maintainers were given the option... and apparently made the conscious decision that the benefits of asynchronous plugin execution aren't worth the risk of plugin authors doing dumb things with it.

I do wish that they had been more forthcoming with your company in how they did (or didn't) convey that decision, but ultimately it's their call. Creating or supporting a fork is likewise your call. But at least be honest about the agenda. You guys take an active interest in criticizing Vim, and promoting NeoVim, because the Vim maintainers rejected a patch that would help your startup company integrate with them. Not because the syntax highlighter can't keep up with your Warp 9 typing.


Former longtime emacs (and previous to that, vi) user here.

vi and emacs seem like magic if you're coming from something like SublimeText. Compared to modern IDEs like VisualStudio or IntelliJ products, however - not so much.

vi users tout the rapid text editing features, but you can generate and navigate code just as fast with an IDE - out of the box - no configuration incantations or third party packages required.

Until very recently (early to mid-2000s), IDEs for open source web frameworks were non-existent, unaffordable, or slow. Once you have a working vi or emacs setup, there's a lot of inertia in place that discourages switching.

That explains the continued popularity of vi, imo.


> vi users tout the rapid text editing features, but you can generate and navigate code just as fast with an IDE - out of the box - no configuration incantations or third party packages required.

You can navigate code and you benefit from powerful autocompletion (well, depending on your language, because it may quickly degrade to "laughable" with something a bit dynamic). However, the pure text editing experience with vanilla Eclipse/VS is rubbish compared to Vim. In addition, there are languages for which IDE-based code generation/autocompletion is not that interesting due to the language being a lot more compact. And with something like syntastic + the right language plugin, a strongly-typed language gets syntax checking, a description of the type of a variable, and possibly autocompletion. I use both Eclipse (with a Vim plugin) and the real Vim, and it feels much nicer not have to deal with the resource and mental overhead of a full-blown IDE. I think the only feature I really miss when working OCaml/Merlin in Vim is being able to get a list of call sites of a given function in the current project.


This. Java with a great IDE is like a half-assed Smalltalk environment (with the notable exception that editing Smalltalk as text is trivially simple compared to java). Java+IDE gives you a kinda-sorta-macros (were macros are defined as code that write code - only the IDEs use some form of simplistic text-replacement code-generating stuff, not true macros), and kinda-sorta "smart" code (but you're not actually modifying objects in memory via a text view, like Smalltalk).

So the IDEs make it feasible to manage all the poor horizontal "abstractions" (complections, really) with all the different files and paths and whatnot. But they're much inferior to vi(m) for editing text.

Granted, if you don't do much text editing (writing, modifying, moving lines around) - the work you actually do do ("programming") - won't benefit much from a great text editor.

I used vim for small java projects before inner classes (massive spill of code/classes across files and folders) -- and it was pretty painful. When I changed to use Literate Programming - and could easily work on one file, letting the system generate the arbitrary structure java needed -- things went much more smoothly.

So, yes, YMMV - but if what you do is write/edit stuff that fits in a sane text format, a great editor is a great help. If what you're doing is composing objects from a large standard library of objects, you probably want an object editor like a visual, image-storage (as in vm image) based system like Smalltalk.


You can easily have that if someone builds a starter kit specific to your workflow with all necessary packages. But then, when you want things your way, at least Emacs allows you; for Eclipse, better use the default one. Maybe you are not up to date but Emacs has features like code navigation/completion for many languages. Emacs's file navigation is superb that I could not find elsewhere: http://tuhdo.github.io/helm-projectile.html

See all my guides for more demos: http://tuhdo.github.io/


> Compared to modern IDEs like VisualStudio or IntelliJ products, however - not so much.

Those IDEs only work on some languages, and force you into their workflow. Emacs and vi are both more all-encompassing and less restrictive.


That's true.

However all the major languages and frameworks are covered by IDEs, and the workflows they enforce are good enough for 99% of developers.

Programmers who are working in a fringe language or who need a specific workflow - vi and emacs are great options - but these days it's a disservice to recommend those out of the gate to a new developer.


This is just wrong. Eclipse is an IDE to some languages that it supports, but an average editor to everything else. Have you tried editing configuration files, shell scripts or patch files in it. Eclipse or similar things are terrible when you work in multi-language environment. And look at my other answer that has many demos to see many things your IDE has not yet satisfied me.


I use JetBrains products, so I can't speak to Eclipse.

I edit shell scripts, config files, and a host of other non-.rb files all the time in RubyMine, for example. Many of the features, particularly the code navigation, that you demo on your site are available in JetBrains IDEs.

(ps: your demos are awesome - great resource.)

It looks like you do a lot of C/C++ systems programming. That's one area where I would recommend trying emacs or vi before an IDE. The language and editors have grown together over 30+ years. That's not the case for things like Rails and Java.


> I edit shell scripts, config files, and a host of other non-.rb files all the time in RubyMine, for example. Many of the features, particularly the code navigation, that you demo on your site are available in JetBrains IDEs.

Is it available for shell scripts? When I write shell scripts in Emacs, press TAB and it shows me a list of available shell commands in my editing file. You can also jump around function/variable definitions in your shell scripts.

> (ps: your demos are awesome - great resource.)

Thanks :)

> That's one area where I would recommend trying emacs or vi before an IDE

Well, Emacs is also an IDE of its own language, Emacs Lisp. You have code navigation/completion, functional debugger, profiler and byte compiler all it one. Emacs is not merely an editor, it's an environment for people write programs to run in it. That's why you see IDE features in the demos I posted there. And those demos shows that Emacs also evolves itself over 30 years.

And for dynamic language, Cider for Clojure https://github.com/clojure-emacs/cider can compete with any Clojure IDE. In fact, I don't see anything better.


> Is it available for shell scripts?

Tab complete and jump to definitions are available in shell scripts.

> Well, Emacs is also an IDE of its own language, Emacs Lisp.

IntelliJ is too :) although I will say that I'd rather write editor extensions in Lisp over Java.

I also used to think only emacs had this stuff but since switching to JetBrains IDEs a couple years ago, I've been pleasantly surprised.


Yeah, the learning curve is steep. Also, if you're using a common productivity setup like vim + iTerm2 + tmux + zsh, it takes way too long IMO to both figure out how they work together and configure them (with both plugins and editing config files—do I use Pathogen? Or do I use vundle? Should I dive into oh-my-zsh, or prezto?). But once you do get it set up...wheeee! You can really be efficient in ways that just aren't possible with non-modal, not-in-the-terminal editors.

I hope Neovim is a pathway out of that, and makes configuration a breeze.


IDEs are great for development. All they need now is decent editors.


The VsVim plugin for Visual Studio gives you the best of both worlds! https://github.com/jaredpar/VsVim/


I second that. I'm so used to VI that I literally felt like a fish out of water when editing code with 'vanilla' Visual Studio. VsVim has saved my butt; I'd be lost without VsVim.

Now, with VsVim, I get the best of both worlds: IDE functionalities like refactoring, and excellent code completion, and the familiar VI key-bindings to edit the code.


> I personally use Notepad++

Vim is a Linux/Unix text editor used via the terminal. Notepad++ is for the Windows GUI environment. Apples and Oranges.

Why is a good terminal text editor important? When you are SSH'ed into your server and you need to adjust a configuration file, you require a good terminal text editor. It also is very good for C programming, and a lot of C programmers use it extensively. There are many other reasons. From a Windows GUI environment, you won't really be able to compare or relate, or understand why vim is so good.


Actually, vim is a cross-platform editor.

You can use it on Linux, MacOS, and Windows (among many other operating systems).

vi is even more ubiquitous. Even if one doesn't use vim as one's primary editor, it would behoove one to learn the basics of vi, as it's available on virtually every operating system.


> Vim is a Linux/Unix text editor used via the terminal.

Vim in specific actually has a rather nice GUI called gVim. It's what I used when I used vi-style editors, which overlaps with the last time I used Windows seriously. So, yeah, gVim works on Windows and has for well over a decade now.


I know Vim well enough to use it for this kind of thing but, IMO, if you find yourself doing a lot of hot edits on live servers you're doing it wrong.

Almost all of the editing I do is in a consistent environment on my development machine and I don't see the point of using a lowest-common-denominator tool when I don't have to. I'm sure with some work you can bend Vim into something approaching the power of an IDE but why would you bother? Text editing is a pretty small part of the work of development, after all.


Text editing is certainly a small part of development, but if you're in a dev role where your job involves writing a lot of code, you actually are spending a lot of time in editing mode. I spend quite a lot of time in Vim now because I'm doing a lot of programming, and that's why it's worth spending the time to both learn Vim and configure it to taste. Most of the time what I need to get the job done is a great text editor, and Vim scratches that itch. If, for instance, I was doing massive code refactoring instead I can see why an IDE would be the right tool to use.


> When you are SSH'ed into your server and you need to adjust a configuration file

This is pretty much exactly what you're not supposed to do in any form of modern system administration. How would you rebuild that server, or move it to a different provider?

Edit a local definition of your server for Ansible or Salt or Puppet or whatever else, and let those systems deal with making the server match your definition.


this heavily depends on the scale of the server of course. not everyone has clusters. your VPS that hosts your blog is an example of something where Salt or Puppet would be WAY overkill.


> your VPS that hosts your blog is an example of something where Salt or Puppet would be WAY overkill.

I've used Salt for this in the past - it's not overkill, and it's good practice. Ansible is even more lightweight. You can set up a blog, an IRC bouncer, and whatever else, in practically no time. Then, when you inevitably mess it up, you can wipe it and have it running again in 10 minutes.

(At the moment, I use CoreOS on my server, so my configuration is just a bunch of Dockerfiles and fleetd unit files that I can edit locally.)


Almost any sane programmer editor/IDE allows for remote editing.


That's not comparable, when the file you want to edit is only writable by root and you have to go through a jumphost to get there.


Ok, that is actually case where text editors are better.


"I would be very happy if someone could point out to me the elephant that I am not seeing here."

The one thing where vim beats hands down any vanilla text editor, such as you have listed, is the speed of text editing facilitated by its mode-based usage paradigm. It's not the number of features, but the pure effortlessness of the frequently used editing actions vim offers.

The technical details are detailed in many vim tutorials. The speed comes from the fact that for a large set of common non trivial operations there is a one or two key sequence that establishes the precise edit you wanted.

The way to discover these actions needs a bit of self conscious learning: You notice you do something repeatedly (sometimes painfully obviously) and figure out if there is a quick set of operations in vim to do the thing you wanted to do.

To get the full power of vim you need to spend enough time with it so the frequent editing actions you want to achieve are automatically decomposed in your backbone to vim operations, at which point you can edit text at the speed of tought.

Also, the split window dual or triple document editing combined with fast commands for switching to different places in the documents is really nice.

Notepad++ is my second editor of choice as well.


Once you're good at vim you can edit at the speed of thought. Not really much better way to put it. Watching non-vim users edit text is eternally frustrating.


I'd say it's mostly busywork and the placebo effect of thinking it took less time to type a Vim text-editing command than do it in another editor.

And that's for a marginal use case programmers don't fall much into (if you're frequently re-arranging lines or performing the same actions of blocks of text, then you aren't exactly programming).


I'd believe this if it was coming from a vim programmer, but generally speaking this claim does not come from someone who uses vim so doesn't carry much weight. Are you highly proficient at vim and still believe it is a placebo effect?

Even a small improvement in iteration time has a dramatic effect in the way you approach problems. Vim lightens the mental overhead on making text manipulations so that you simply think about what you want to do and your fingers do it.


Totally have to agree with this. I've tried a lot of other editors, but keep coming back to Vim. Drew Neil's "Practical Vim" really helped me increase my leverage on using it well, and its tag line is of course, "Editing Text at the Speed of Thought."

Whenever I find myself repeating something painful, it is almost always solved by searching the resources in the Vim community for solutions.


One famous answer to this is: Your problem with Vim is that you don't grok vi. http://stackoverflow.com/questions/1218390/what-is-your-most...


It doesn't increase throughput much because most of the time editing/typing is not the bottleneck. Thinking is.

But it is frustrating to reach for mouse and click several times for a task that can be easily done quickly with keyboard. In another words, it interrupts the flow.


> The only advantage I can see in Vim over a modern solution is that it runs in the terminal (which I guess is useful if you like to remotely modify files in your production environment?).

ssh -X host

Then remotely run whatever tool you want, including Sublime or Geany or Kate or even Wireshark if you wish.

> I must say I've only spent ~2 months of my life using vim before giving up, which I think is already pretty long for an evaluation.

Hmm yeah that is pretty long, you should see the advantage of it by then. Have you used it a lot in those two months? Because I've alternated between Geany and vim for like 6 months before being fluent enough in vim that I could get work done at the speed I could in Geany (or Notepad++ for that matter). But if I had seriously used vim for everything that I used Geany for, I think I would have easily gotten there in 2 months.

> I would be very happy if someone could point out to me the elephant that I am not seeing here.

Beyond that it's simply faster in text editing (code, plain text, or something like Markdown for that matter), I guess it's also a way of using a computer. I've never liked the mouse for anything besides games or GIMP and even navigate many websites by keyboard in Firefox. Ideally I'd spend all my time in a terminal, typing away with my hands almost never leaving the home row. But that's just me, I know noone else who is so fond of their keyboard vs. a mouse or touchpad.


The hippopotamus in the room you are missing is vi.

http://www.viemu.com/a-why-vi-vim.html

http://stackoverflow.com/questions/1218390/what-is-your-most...

The elephant you are missing is UNIX itself. The best IDE ever made.


This is coming from someone that used IntelliJ before moving to Sublime Text 3 before moving to vim for Python development.

I am by no means a master of vim's varied features but the best productivity gain for me is vim running in the terminal. I use a lot of command line tools (grep still beats most things for search and the git command line tool is still better than any editor plugins), it's just much more convenient for me when it's all in the terminal and I can switch between them seamlessly with keyboard commands especially when using something like tmux.


Much as I like vim, I think IntelliJ is still better than whatever tools one can cobble together for pure Python development.


I recognize editor preferences is a deeply personal taste but it's been very different for me. :) I used to swear by IntelliJ but after taking a day to configure Sublime Text (and then vim), I very much prefer them.


Pycharm has automatic formatting, much better autocompletion (it deduces type based on context), continuous PEP8 check, class hierarchy, refactoring support and a terrific debugger.

Don't get me wrong. I am not trying to bash your choice. I am merely curious how to achieve the similar in vim, because I have some urges to switch as well.


Mostly through plugins really.

Jedi is really awesome for autocomplete: https://github.com/davidhalter/jedi-vim

This plugin really helps in formatting code: https://github.com/hynek/vim-python-pep8-indent

There's another plugin that helps with PEP8 linting: https://github.com/nvie/vim-flake8

I just use a combination of print statements and pdb for debugging, I don't trust automatic re-factoring for Python though, so I tend to do them manually with regex.

What really helps vim beat PyCharm/IntelliJ for me is the fact that I work with a lot of C code as well as Python. IntelliJ's C support sadly isn't quite there yet.


I agree.

I used vi, vim and was an Emacs user between 1996 and 2005 when coding on UNIX platforms.

But I have came to UNIX from the home computers, so I was already spoiled with Borland IDEs and Amiga editors before my first UNIX experience.

Got to experience Smalltalk and Oberon environments as well.

Always looked for IDE experiences in UNIX land, and since I moved 100% into JVM/CLR land, I only use Emacs or VIM for editing configuration files or when on systems where my beloved IDEs aren't available.

Even for C++, thanks to LLVM work, IDEs can offer much more that vi or emacs do, even with CEDET.


Your knowledge about Emacs was outdated then. And what make you think that Emacs cannot use Clang and LLVM? Currently, there's already rtags that uses Clang for live analysis: https://github.com/Andersbakken/rtags. Here are some nice features that Emacs provide:

- Powerful automatic indentation: https://raw.githubusercontent.com/Bruce-Connor/aggressive-in.... It does not only indent the current line, but the whole Semantic context around your cursor.

- Live grep: http://tuhdo.github.io/static/live_grep.gif

- Access to a list of project with a few key strokes: http://tuhdo.github.io/static/helm-projectile/helm-projectil...

- Quickly access any file in your project, as large as Linux kernel, instantly, regardless of where you are in the project, and within a few keystrokes: http://tuhdo.github.io/static/helm-projectile/helm-projectil....

- Jump to any file depends on context, even if the file path is in a plain ASCII text file: http://tuhdo.github.io/static/helm-projectile/helm-projectil...

- Copy files from anywhere to anywhere: http://tuhdo.github.io/static/helm-projectile/helm-projectil....

- Delete files anywhere; files are always at your finger tip to do whatever with them: http://tuhdo.github.io/static/helm-projectile/helm-projectil....

- Switch between other files with same names but different extensions: http://tuhdo.github.io/static/helm-projectile/helm-projectil.... Work not only for C/C++ but other languages, and is customizable. You don't have to configure anything, like adding include paths for the command to search. Everything is automatic. Just use it as it is.

- Jump to tag definition, from Emacs's own parser or external parser like GNU Global: http://tuhdo.github.io/static/c-ide/helm-gtags-jump-dwim.gif

- Jump to any definition from a list of definitions in source tree, even for Linux kernel: http://tuhdo.github.io/static/c-ide/helm-gtags-select.gif

- Jump up to parent: http://tuhdo.github.io/static/c-ide/senator-go-to-up-referen....

- Do you like outline tree?: http://tuhdo.github.io/static/c-ide/sr-speedbar.gif

- Interactive outline tree: http://tuhdo.github.io/static/c-ide/helm-semantic-or-imenu-w...

- Easily move back and forth using the interactive outline tree: http://tuhdo.github.io/static/part3/helm-semantic-or-imenu-2...

- References retrieved from its Emacs internal parser: http://tuhdo.github.io/static/c-ide/semantic-symref.gif.

- Beautiful compile output: http://tuhdo.github.io/static/c-ide/compilation-compile.gif

- Frontend support for GDB: http://tuhdo.github.io/static/c-ide/gdb-many-windows.gif

- Code completion: http://tuhdo.github.io/static/c-ide/semantic-boost-demo.gif.

- Open man page for symbol at cursor: http://tuhdo.github.io/static/part3/helm-man-woman.gif.

- Emacs open 39MB C file: http://tuhdo.github.io/static/performance.gif

- Emac opens multi-gigabtye file: http://www.emacswiki.org/VLF

- Emacs is a bit torrent client: https://bitbucket.org/ukaszg/aria2-mode/

You can see more demos in:

+ Emacs Mini Manual: http://tuhdo.github.io/emacs-tutor.html + C/C++ Development Environment for Emacs: http://tuhdo.github.io/c-ide.html + A Package in a league of its own: Helm: http://tuhdo.github.io/helm-intro.html + Exploring large projects with Projectile and Helm Projectile: http://tuhdo.github.io/helm-projectile.html

Note that in the demos you may see me type in the commands. You can think of it like the start menu in Windows, but actually those commands can be executed quickly with a shortcut. I type in the commands for demonstration purpose to Emacs users.

Those demos are just tip of the iceberg.


Now show all those demos, without relying in clang.

We in the real world have to use compiler toolchains specified by our customers.

Do you also have demos for:

- Navigate in binary files

- Semantic refactory

- Background compilation

- Debug unit tests

- Cross reference to source control checks and software tracking issues

- Parallel code debugging

- Visualization of C++ data structures

- Semantic code navigation

- Database integration

- UML diagrams with two way code editing

- UI design

- Integration with application servers

- Graphical visualization of profiling data

- ...

Emacs is a fine software, but it is stuck in the past.


None of those relies on clang. And why do you think that it's ok for an IDE to use Clang, and Emacs is not?

You misunderstood what Emacs is really. It's an environment for creating programs to run in it. At its core, Emacs is just Emacs Lisp interpreter. The editor frontend is for users to interact with this core, by directly using Lisp code or just using editing commands. Comparing Emacs to IDE is just like comparing Python interpreter to IDE; but the former has more potential to be anything it wants.

> Navigate in binary files

Yes. You have Hexl mode for editing binary files, ages ago: https://www.gnu.org/software/emacs/manual/html_node/emacs/Ed...

You can even open files with gigabytes size to edit: http://www.emacswiki.org/VLF

> Semantic refactory

Fine. This can be done if someone puts the effort into making it. But text replace in whole project is good enough. Even so, things like that won't work with project like Linux kernel. Parsers in IDEs like Eclipse or VS just can't handle such complex project, so those IDEs are also useless.

> Background compilation

Yes. Emacs can do perform asynchronous operation. M-x compile and type in compilation command, then either do something else or see it display beautiful output: http://tuhdo.github.io/static/c-ide/compilation-compile.gif. In Eclipse, even for debugging a simple binary file, you have to create a project. This is absurd.

> Debug unit tests

What's the problem? If you write unit tests in a language, use that language debugger. Emacs has an integrated interface for many debuggers, even for Bash and Make.

> Cross reference to source control checks and software tracking issues

Why is this essential? If you want, you can write one in Emacs. However, use a proper bug tracking software, like BugZilla and use your browser.

> Parallel code debugging

Yes, GDB provides that, so Emacs has that too. See this screenshot again: http://tuhdo.github.io/static/c-ide/gdb-many-windows.gif. Notice the bottom right. You have a tab "Threads" in there. Clicking on a thread in the list will switch other windows (i.e. registers, stack frames) to the context of that thread.

> Visualization of C++ data structures

Yes, you have Ebrowse: http://www.gnu.org/software/emacs/manual/html_mono/ebrowse.h..., that lists an index of classes in tree format. For example, if class is a child of a class, it is display as a child of that class in tree format. You can click on each class, you view all the member functions and can switch between declarations and definitions.

Or use Doxygen: http://www.stack.nl/~dimitri/doxygen/

> Database integration

Non-essential. I don't work with database. But, you can use Emacs as a database client if you want: http://truongtx.me/2014/08/23/setup-emacs-as-an-sql-database... and it's better than many crappy database clients out there.

> UML diagrams with two way code editing

Non-essential. Again, use Doxygen if you want.

> UI design

Can your IDE work on multi-hop remote machines?

> Integration with application servers

So, is running a terminal emulator inside Emacs and run commands to control the servers enough?

> Graphical visualization of profiling data

Non-essential. Use a separate profiler.

And please don't say that those IDEs are better because it can run some programs inside the same window, while Emacs relies on external programs. It's like saying Eclipse sucks and is not a real IDE because it uses gcc to compile code, not providing its own compiler. "IDE" is just a bunch of programs wired together.


I guess you missed the part I have spent 10 years using it.


You also missed the part that you stopped using it for almost 10 years. It is very different now. For example, I can now jump to anywhere in the kernel source tree instantly, jump to any definition or reference instantly. The new features make navigating Linux kernel source like a small project. I cannot do this with Eclipse.


I did not stop using it completely.


You never said this. And even if you did not stop, you answer strongly suggest that you do not use Emacs for serious development anymore, and was out of date with current state of Emacs. If you actually use it, you would know that none of my demos use Clang.


Correctly, as I am a GUI oriented person and no longer see a strong value in Emacs vs InteliJ|Netbeans|Eclipse(CDT)|Visual Studio|KDevelop.


Yes, since you spread failed information, and I had to post to correct it. There are many things that could not be done in those IDEs you listed, i.e. to debug random binary outside of a project. Did you tried it Ctrl + H for finding files? Completely unnecessary complicated with tons of checkboxes, and slow to search. It does not show me result instantly; meanwhile in Emacs, I could do this: Open file at point anywhere, even in plain text file: http://tuhdo.github.io/static/helm-projectile/helm-projectil...

In debugging, Eclipse is no difference than Emacs; both use GDB. For compiling, Eclipse also uses external debugger. The only thing that makes it an IDE is its internal parser, that is broken for large projects and Emacs also has a C/C++ parser anyway. What make Emacs less IDEish than Eclipse?


> In debugging, Eclipse is no difference than Emacs; both use GDB

Except I only use CDT with Android. GDB is no match to Visual Studio debugging capabilities.


In what aspect it is no match? Feature-wise, not GUI; GUI is non-factor here. People wrote a kernel without a debugger after all.


Flexibility, configurability, work in the terminal, oh... and did I mention snipmate?

That's just scratching the surface. I've been using VIM for around 3 years. Most of the day almost every day. And I feel like I'm barely acquainted with what it can do. Still, it is one of the most important and vital work tools and its hard to imagine life without it. I'm pretty sure I would leave any job I wasn't allowed to use it.

Admittedly I went through a rough month or two getting started, but I could see right away that the potential gains in productivity were worth the cost and I'm glad I did. Sort of like learning to type which some people refuse to do because hunting and pecking is faster and easier short term. I'm sure you have seen people like this. And some actually type at amazing speeds for two fingers, but it doesn't compare with what they could do if they took the time to retrain themselves.

The problem now is that Vim is so ingrained in muscle memory I type splotch all over any other editor and web browser I touch. Hold on a second, I need to arrow back and clean up this comment... bbbbhhh


I absolutely hate having to lift one of my hand off the keyboard to grab the mouse. Vim's text navigation is the top killer feature that all modern editor are lagging behind.

The second one is modal mode (editing and navigating/command).

I am trying to warm up to ST and the vim plugin is okay but some things are really missing (capital R)


It's not about speed. It's about finding the vocabulary of vim natural (which it seems you don't, which is fine). 'di(' for instance deletes the inside of parentheses. Which is a natural action to perform, if your cursor is inside parentheses.


The key feature in vim for me is that I never have to move my fingers from the typing position on the keyboard. I never have to look away to find the home key or the arrow keys.

All the things mentioned in the article are just there to not miss the nice features of other editors.


There're things I agree or disagree on with author (for example, I still have NerdTree installed, but find myself almost never using it, instead I use tree -f in separate terminal window) but probably only one thing I'm still not sure about:

I don't use buffers explicitly at all, only tabs instead, like in any IDE. Sometimes vsplit. I even have custom mappings for ctags to open stuff in new tabs instead of buffers. I treat hidden buffers as legacy needed mostly for technical reasons. Yet I keep seeing other people using multiple buffers, switching between them. So, should I reconsider, maybe? And why?


I used tabs, but nowadays I don't seem to need them. One day I thought I could try if I could survive by just using buffers, and apparently I do. Might depend on the way you want to navigate the project and so on. For me personally the most common buffer switch is between two or three documents at a time and for those needs split windows are absolutely the best for me (which removes any needs for tabs, naturally).


The switch to tabs for me came after I started using vimperator/pentadactyl in my web browser, which I find glorious. (Sorry no links, on mobile)

I used "lusty juggler" before but 'gt' is a very natural way for me to "go tab" now and I like it better. Macvim makes it trivial for me to arrange tabs in a consistent order, for example html file to the left of its js file. The tabs also give me a kind of quick view of what my current "project space" is.

Two tab-y things that I find useful are:

* alias "vi -p" (to open files in tabs)

* "vi --remote-tab" (to add a file to an existing session in a new tab from the command line)

Part of why I like tabs may be because I don't do split windows often in vim. When I want to have two files side-by-side I use my os window manager (CMD+right to move current window to right side of screen, etc).


> backslash isn’t bound to anything by default

Actually it is. That thing is called "leader" and is used exactly for the same purpose as author uses backslash. So better way to write

    :nmap \o :set paste!<CR>
would be

    :nmap <leader>o :set paste!<CR>
Reasons to use "leader" are discussed more than once, so I'll leave reading the docs/blogposts to you.


Why do you advocate using vim in a terminal?

I prefer unite[1] to ctrl-p[2], it's much more flexible.

1: https://github.com/Shougo/unite.vim 2: https://github.com/kien/ctrlp.vim


I wanted to like unite, but couldn't get it to behave as I expected: when opening a file via unite, it doesn't respect the active window, it ignores the splits I have. IIRC it always opened the file in the top left window.


That's weird. Unite doesn't exhibit this behaviour for me.

My config is here: https://github.com/wridgers/vimto/blob/master/rc/25-unite.vi...


Thanks, will give it another shot with your config.


I also prefer cntrlp, it's much more performant in my experience.


This is true (something like junegunn's fzf is even faster than either), but I think the tradeoff is between performance and consistency of interface. Unite can provide the same interactions for recent files, buffers, file navigation, grep results, etc.


You can do this with ctrlp too. The standard sources are files, buffer, and MRU files, but it comes with extensions for things like the quickfix list (grep results), tags, and scripts in the runtime path. You can also write your own: https://github.com/kien/ctrlp.vim/tree/extensions


Really? With unite you can use vimproc to fork out the searching process. Much quicker. Using unite and ctrlp with a 30k file source base, ctrlp was far to slow for me.


I've found split windows and buffers in vanilla vim to be somewhat lacking -- CtrlSpace [1] and GoldenView [2] plugins are truly awesome enhancements. The latter I wish I could have at the OS level, just incredibly efficient usage of screen real estate, and the former makes buffer management a breeze.

[1] https://github.com/szw/vim-ctrlspace [2] https://github.com/zhaocai/GoldenView.Vim


Not familiar with goldenview - but it looks like something similar could be achieved with eg xmonad? Or are you not using Xorg and a tiling wm?


I do use a tiling WM, just not Xmonad ;-)

With i3[1] you get split windows out of the box, but the splits are fixed by 1/2s (kind of a Russian Doll box model) that you can then incrementally resize via hotkey by some percentage of your choosing.

That's different than GoldenView which automatically gives the focused window the lion's share of screen real estate, thus providing a kind of distraction free mode with the added ergonomic benefit of not having to crane one's neck to left and right when working with split windows on a 27" monitor.

Maybe Xmonad, Awesome, and other highly programmable TWMs provide such functionality (or are trivial to pull off), although haven't heard mention of it (spent a couple of months with Awesome before switching to i3).

[1] http://i3wm.org/screenshots/


Right. I generally just make do with fewer windows (typically Firefox with a gazillion tabs w/vimperator, and a terminal or two, each running screen with a few screens) -- so I rarely need to do much jockying around with windows. A little more shifting around on my laptop (14"), a little more on my desktop (20"@2048x1152).

I can see the need for more windows on a 27" (or 30") though. Maybe xmonad with "Spiral" or "Spiral Golden Ratio" does something similar (although probably not quite the same)?

https://www.haskell.org/haskellwiki/Xmonad/Screenshots

Generally I just use a standard tiled layout, with 2/3 of the screen for the "main" window (vertical split, works best on a 16:9/16:10 display), and bring witch ever window I want there with alt+enter.

But then, I find that things that change "automatically" end up being distracting (eg: relative line numbers in vim) -- so odds are we just have different preferences.


> Emacs has a useful mode which highlights hexidecimal colors in CSS and SASS

There's plugin for it in vim. Even several of them, as always. I don't remember which one I used and if it was completely ok, but I can find https://github.com/skammer/vim-css-color right away.


Emacs can highlight colors in ANY text buffer if you activate it.


Thanks for reading! Don't forget to check out the follow-up to this article, "Everything I Missed in Vim After 11 Years" - http://statico.github.io/vim2.html


The author mentions a lack of good smart completion, but if you use C# there is omnisharp, which works quite well.

https://github.com/OmniSharp/omnisharp-vim


Another person who recommends pathogen... There's multiple better plugin managers now including Neobundle and vundle... I find neobundle to be unquestionably superior and well worth using.


They aren't "better" and most of pathogen users are well aware of them. I don't think they are bad enough to discourage anyone from using them if it woks for him, but when asked I'm always recommending pathogen as the only option, which I'm using myself.

Why? Well, there could be multiple answers, but essentially there's one main reason: it's just dead simple, while vundle and other ruby-inspired ones are not. Pretty much for the same reason I like pathogen+git thousand times more than emacs' package manager.

So even if it could be arguable that pathogen is better than vundle, there's completely no reason not to advise it.


There is a new one coming out recently called vim-plug: https://github.com/junegunn/vim-plug/

The major feature is that it can install plugins in parallel. I've switched from vundle to it and have been quite happy.


Just curiously, what do you find superior?

pathogen loads the plugins which is all I need. Does Neobundle do something else?


Here's a vimrc that showcases some of its features: https://github.com/bling/dotvim/blob/master/vimrc#L324

Pathogen loads plugins, but it doesn't manage them. Neobundle lets me list some plugins in my vimrc and it'll take care of installing them, updating them, and even only loading them on filetypes where they're useful.

Pathogen does none of that and I find every one of those features useful. One of the big ones, honestly, is just the simplicity of listing a new bundle in my vimrc, syncing it to all computers, and having it deal with getting it. Much better than syncing large git repos across computers.


Why is iTerm2 being suggested for OS X when the built-in Terminal.app also supports 256 colors?

Also, I find MacVim to be a better experience than Vim in the terminal.


I also prefer using the terminal, but I've switched to neovim anyway. I found macvim to be difficult to configure and I just prefer having tmux terminal splits next to my vim split and I can see stuff happening as I edit the file. I also prefer iTerm2 to Terminal.app but I think it's just personal preference. I know how to use the iTerm2 settings pretty well by now to get configurations I want.


For me it's definitely mouse reporting. If my hand is already on the mouse I really like clicking tmux panes. Sometimes it's also easier to just scroll with a trackpad too.

iTerm lets you do this, but Terminal.app doesn't.


iTerm 2 has way more options than Terminal.app, my favorite being the ability to set your color scheme.


The killer feature for me is Hotkey Windows - I set it up so that pressing Ctrl+Space from anywhere will slide out a terminal. So convenient.

http://apple.stackexchange.com/questions/48796/iterm-as-a-sl...


To be fair, you can do the same for iTerm (or any application, really) by using other tools. Quicksilver, for instance, allows you to define system-wide hotkeys.


Terminal.app has had color schemes since forever.


Apropos of nothing in particular: a good way of spotting vim hipsters is that they don't know what ; does, because they never used t or f. They do however very carefully use hjkl to move around, because the cursor keys are for squares ;)


I remapped ; a long time ago (to ":", because I can't be bothered to hold down the shift key) because I rarely need to repeat a t/T/f/F motion. I typically already know how many times I need to invoke it (and use "3f)" for example), or I use a quick "/" followed by a couple of letters in the word I want to jump to.


That's exactly what I do and I find it to be a great improvement over the stock bindings. I also bind "q;" to behave like "q:".

Unlike others in this thread, though, I do find the original behavior of ";" useful occasionally. I bind that behavior to ";;", which is still quite fast to type whenever I do need it.


That's a great idea; never thought of it before. The only worry is that it is not going to work on remote systems out of the box, confusing my muscle memory.


Yeah that's true. I have a lot of remappings and shortcuts in my vimrc file, and I struggle a bit when I'm using vanilla vim on another server. Thankfully, I'm usually able to snyc my ~/.vim/ and ~/.vimrc files to that machine if I'll be using it for more than just a one-off.

But it is frustrating otherwise.


The main thing I've yet to figure out wrt vim is good keybindings with a Norwgian key layout. We have ø where ; lives, æ in place of ', no single (non-shift ) [ and ] due to å. and a composing accent/single/back quote. Loosing three full keys to actual letters is a though break ;) I know a lot of people simply switch to a US layout, but it's not really a great solution when freq uently also typing in Norwegian.


Eh, I've been using vim for 15 years and find it incredibly rare to repeat t or f's. Usually they're one-offs.


Eh, I've been using vi{,m} for 15 years too and I `ftFT;,' things on a daily basis.

Remove two `a' characters of the current line:

fax;.

Note: no mode change necessary

Also, line editing in /bin/{,k,ba}sh -o vi without `ftFT;,' is a pain.


Exactly. The gain from remapping ':' to ';' far outweighs the losses from not being able to repeat finds


In my experience nerdtree is bad. You loose a lot of goodnes that splits can offer you. Netrw or netrw+vinegar is more vim friendly way to do file navigation.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: