r/programming • u/alcuadrado • Sep 24 '15
Vim Creep
http://www.norfolkwinters.com/vim-creep/416
u/blind3rdeye Sep 25 '15
I was a great fan of vim in the past, but I've actually moved away from it in favour of IDEs with other features. There are a couple of reasons...
The most basic reason is that I want to be able to use the feature of the IDEs. And although vim can get a plugin or something for this or that feature, I don't really want to be looking for extensions and tweaks all the time.
The main think though is a kind of non-reason. I've had the realisation that although vim as excellent for writing code, writing code is not the more difficult or more time consuming part of programming. Design, testing, and debugging are more difficult, more important, and more time consuming. The actual typing of symbols just isn't a big deal. So although vim can have some cool ways of making macros and copying stuff and so on, that stuff just isn't really important. Vim makes it really easy to increment a heap of numbers that are in list or something; but my code shouldn't have that kind of stuff in it anyway - the code should be more abstract, without cut-and-paste sections, and without arbitrary constants scattered around needing to be tweaked.
So I guess the bottom line is that as I did more programming, I got better at using vim, but I also found that I cared less about the kinds of power vim gave me, and I cared more about the kinds of power that other IDEs gave me. The power from those IDEs could be added to vim with a bit of work; but so why bother? I don't need the vim stuff anyway. So I don't use vim anymore.
18
u/Atario Sep 25 '15
To me, Vim is much more useful as a general-purpose text munger than as an IDE. Then again I'm a filthy Visual Studio pleb, so what do I know.
134
u/whichton Sep 25 '15
Exactly this. Typing is never the bottleneck, thinking is. I probably spend 5-10x the time thinking about how to write a function than typing it out. And that is why an IDE is much more useful - it helps much more with the visualization of code than any editor.
32
u/Phrodo_00 Sep 25 '15
writing is often the bottleneck when editing configs, vim is awesome for that. Also, some IDEs have pretty nice vim modes.
I use IDEs for static typed languages (when IDEs actually help), but write Python in vim.
→ More replies (3)28
u/whichton Sep 25 '15
IDEs help with dynamic languages too. I use Python in Visual Studio, and I get autocomplete, debugging and REPL all inside VS. See Python Tools for Visual Studio. If you use Linux, you can try PyCharm from JetBrains, it is supposed to have similar features, though I have not used it personally.
→ More replies (2)→ More replies (1)60
u/firstglitch Sep 25 '15
It is not about being a bottleneck. It is about maintaining the flow of your thought. When you are sufficiently proficient in VIM, you can do things involuntarily, and edit text without breaking the flow of your thought. For example, when you are driving you can zone out and think about other things, because our brain has developed sufficient autonomy for doing that task. In a similar way, the user interface provided by vim is something that is amiable to that kind of autonomous handling by the brain. Using a pointing device like mouse will never be like that.
88
Sep 25 '15
Using a pointing device like mouse will never be like that.
Citation needed
→ More replies (27)23
u/antpocas Sep 25 '15
I never got this "flow of thought" thing. Whenever I'm programming, typing doesn't break my flow of thought. By the time I start typing, I'm mostly done with thinking. I already know what I'm going to do in my head.
0
→ More replies (15)21
u/apfelmus Sep 25 '15
In a similar way, the user interface provided by vim is something that is amiable to that kind of autonomous handling by the brain. Using a pointing device like mouse will never be like that.
Actually, there is evidence to the contrary: Keyboard vs Mouse. Quotes:
We’ve done a cool $50 million of R & D on the Apple Human Interface. We discovered, among other things, two pertinent facts:
Test subjects consistently report that keyboarding is faster than mousing.
The stopwatch consistently proves mousing is faster than keyboarding.
[..]
It takes two seconds to decide upon which special-function key to press. Deciding among abstract symbols is a high-level cognitive function. Not only is this decision not boring, the user actually experiences amnesia! Real amnesia! The time-slice spent making the decision simply ceases to exist.
→ More replies (15)42
u/superPwnzorMegaMan Sep 25 '15
So you install a vim plugin for your IDE. Best of both worlds.
35
u/net_goblin Sep 25 '15
Sadly, most vim plugins are inadequate. Most of those I tried miss the command mode. I don’t want Ctrl+F or Ctrl+H for search and replace, I want “:%s/foo/bar/g”, and all the nice stuff that comes with it.
→ More replies (6)13
u/sososojacques Sep 25 '15
IntelliJ's vim plugin has this. It's not perfect, but that's the best middleground I found to get stuff done so far. A real IDE, and a good vim support.
→ More replies (6)13
u/cowinabadplace Sep 25 '15
Absolutely. I don't think I could write code without IdeaVim. Shifting between parens in Clojure would be a nightmare.
→ More replies (1)19
u/TheMerovius Sep 25 '15
I literally never saw a vim plugin for an IDE that was worth the trouble. My favorite example is always visual block mode: IDEs don't have a concept of that, so IDE plugins can't have a concept of that either. I never have seen a vim plugin that can do visual block mode… :( And it's one of the most important features of vim.
→ More replies (24)2
u/arvinsim Sep 25 '15
Yup. I have moved from Vim to Intellij + Ideavim. I could never go back to non-modal editing without feeling clumsy.
25
u/JimboMonkey1234 Sep 25 '15
Yup, that's just it. Vim is fun to use and a great text editor (arguably the best text editor) but I rarely find myself needing to edit text. I either need an IDE for code or a WYSIWYG rich text editor for documents, so that leaves vim for light tasks and small scripts.
6
u/guepier Sep 25 '15
I rarely find myself needing to edit text
By contrast, I find that this takes a large portion of my time.
That said, I’m working in research at the moment, and I rarely write code that I had the luxury of planning beforehand. Analysis requires a lot of exploratory programming, most of which lands in the garbage can (read: archived in a separate git branch) at the end of the day.
There’s a lot of editing going on.
→ More replies (2)23
u/flying-sheep Sep 25 '15
rich text editor for documents
whyyyy?
everything i every laid my eyes on in this field was horribly inferior to TeX.
16
u/TheMerovius Sep 25 '15
As a person who is pretty comfortable reading and writing LaTeX: This must be irony, because this software is objectively crap. It's just sadly the only software with decent typesetting, in particular for math, so it's without an alternative for text that needs to look good as the highest priority.
→ More replies (1)10
u/Ran4 Sep 25 '15
TeX is a fucking chore though. Everything breaks all the time, there's countless bugs everywhere, and the syntax is different everywhere. Fuck, just typing in my native language requires loading multiple modules.
I'll still use it because it gives you a nice looking result, but despite being a vim user, I'm definitely not happy about using TeX.
→ More replies (4)→ More replies (6)4
u/JimboMonkey1234 Sep 25 '15
I do in fact use latex (w/ vim) for math and CS proofs, but if you think you can convince me to use it for, say, an essay (or anything that doesn't include formulas), you'd be more likely to convince me to try emacs. There's no way I'd subject myself to the insanity that is doing basic shit in latex if I don't have a good reason.
15
u/sandsmark Sep 25 '15
The most basic reason is that I want to be able to use the feature of the IDEs. And although vim can get a plugin or something for this or that feature, I don't really want to be looking for extensions and tweaks all the time.
imho, if you start installing a ton of plugins to get vim to behave like you want, you might not want to use vim. if you just want a vi-like editor there are plenty of editors and IDEs that provide a vi-mode, but with a lot more features that people want out of the box (e. g. QtCreator, which is one of the least crappy IDEs for c++ development in general).
I've had the realisation that although vim as excellent for writing code, writing code is not the more difficult or more time consuming part of programming. Design, testing, and debugging are more difficult, more important, and more time consuming.
I agree with you wholeheartedly, but this suggests the opposite of what you're trying to say. using vi(m) allows me to spend more time on those things, and less time on just writing code.
but vim isn't for everyone, and trying to argue that people should use some tool that I like is a waste of time. people should use whatever they are the most productive in.
→ More replies (4)5
Sep 25 '15
In general I agree, but there are situations where IDE can't help. The code bases I've been dealing in the last seven years or so are simply too big for an IDE (MS Visual Studio, Eclipse+CDT) to handle, and vim works.
11
u/renatoathaydes Sep 25 '15
Thank you. I always wondered why some people seem to think that Vim is great for programmers when it just helps you type, copy/cut/paste stuff (great for email writing sure)... the kind of thing that just shouldn't be that important to programmers. Debuggers (with REPL-like code execution within the context of the program - for Java!), Navigation through code, auto-refactoring, function usage analysis, that's the kind of thing that makes me more productive.
10
u/Jugg3rnaut Sep 25 '15
Once you're fairly proficient with vim, your mind is allowed to not worry about the mundane tasks of programming, like copy pasting stuff, and you can just focus on thinking. Don't look at vim as the goal, its just there to remove obstacles to your thinking process. Thats what I found anyway.
2
u/StorKirken Sep 25 '15
Mind you, navigating and doing boring replacements of old data or code is also the job of us code monkeys. Vim's macro, regex and plugin system is quite useful for that.
→ More replies (1)4
u/AdamLovelace Sep 25 '15
I've never gotten nuts with vim. I never felt the need to remain in the editor to perform certain tasks. Hell, I never even open multiple files at once, I always dump back out to Bash when I need another file.
As a side note, I've never found something I wanted that an IDE could do that I couldn't do in the same, less, or negligibly similar amount of time and effort in Bash unless you're using some of the more arcane frameworks (that is, arcane to me). Plus, I mean, let's face it... I'm here to solve puzzles. There is something inherently appealing in figuring out the Bash one-liner to pull all the log messages out of your code base and count the number of times your application has logged each in the past week over a cluster of N machines. Give me the tools and I can give you magic. Give me the tools to arbitrarily improve my process and it's unicorns and rainbows all the way down.
I once got in an argument with a coworker that a developer working in Bash with Vim could work as fast or faster than a developer working in IntelliJ. I'm now prepared, should we have this discussion again, to claim a seasoned Bash developer can work faster.
6
u/flukshun Sep 25 '15 edited Sep 25 '15
The point isn't really to make vim an IDE, it's to have an editor that's focused on editing, and making your desktop your IDE with specialized tools for other components for compiling, debugging, testing, scm, etc. It's very hard for an IDE to do all these things effectively unless it's focused on a very specific development platform. There is no single IDE that could implement my daily workflow unless it was called Flukshun IDE (M-Th edition). I've accumulated a large number of bash scripts/aliases to simplify aspects of my workflow. Those are my 'plugins' and nobody will care about them except me. Most of them even I don't care about anymore as my workflow has continued to change/evolve.
The only consistency Ive had across most of my projects is my editor, vim. I also use it for meeting notes, editing config files, outlining presentations, whatever. For me it's probably the singlemost worthwhile program be 'invested' in.
TL;DR: not for everyone, but crucial to many
3
u/killerstorm Sep 25 '15
I went the opposite route: I started with IDEs and later switched to editors, as it appeared that IDEs don't provide enough benefits to justify the overhead.
Design, testing, and debugging are more difficult,
It really depends on what you're doing, sometimes when you have a good design in mind and it boils down to typing.
3
u/comp-sci-fi Sep 25 '15
Like touch typing. If typing is your bottleneck...
Yes, IDE's shine for a huge codebases. It's what enterprise buys them for, and what they're optimised for. Vim has ctags; compiler errors can be quickfix integrated; various completions. All work, but a bit clunky: not type-aware intellisense, not incremental compilation etc.
But I find an IDE is overkill for small and/or non-enterprise projects. An extra layer, gets in the way, superstructure complication without reward.
BTW A setup I sometimes use is inotify to detect file changes triggering compile and run in a tmux window (or, when a project evolves to use input files/config, detect change and run). It takes more than 200ms, but it feels instant. I should polish this up, so it's easier to use on the next project, but you lose flexibility.
As always: tool for the job.
3
u/Deathspiral222 Sep 25 '15
I've had the realisation that although vim as excellent for writing code, writing code is not the more difficult or more time consuming part of programming. Design, testing, and debugging are more difficult, more important, and more time consuming.
Completely agree. This is exactly my experience as well. Something trivial like "find all references to this function, including polymorphism, interfaces and inheritance" is invaluable in understanding a codebase yet just about impossible in vim. The same applies to having really tight integration with unit tests and debuggers - it's just much easier to do this in an IDE.
→ More replies (3)3
u/vytah Sep 25 '15
I think vim is more for sysadmins, than programmers:
it works on everything, over any connection
works in text mode, uses almost no memory and no bandwidth
works well with large files, like logs
integrates well with shell
has few things in common with
sedandawk(and that thing isedroots)needs only a keyboard
doesn't require all keycodes to match between terminal and server
3
u/dv_ Sep 26 '15
Refactoring is a huge bonus that can indeed be sort of a vim killer. What personally turns me off IDEs is often their constricted setup (you must arrange your source tree in a certain way, you must use build system X, etc.) and their sluggish, high-latency reaction times (Eclipse for example). Qt Creator is the best IDE I've seen in Linux so far, and is a serious option, but I still don't get much added benefit from using it, because I develop in C or C++ 99,9% of the time. These languages have a messy syntax that makes it near impossible to write refactoring tools. But without such tools, IDEs lose a killer feature.
With languages like Java, D, C#, the situation is quite different. IDEs make much more sense with them.
As for vim itself, I use it a lot, but I don't think its the revelation or anything. It absolutely excels at integrating non-typing operations into the workflow without interrupting, compared to many other editors. Selecting lines in visual mode, then pressing ESC, and doing search/replace by doing something like :%s@old@new@ is considerably faster than the search/replace dialog in most editors, which require a significantly different workflow, and therefore, a switching in my mind. This generally does not make much of a difference for small edit operations, but when writing large amounts of code, it matters, especially if coding is part of the thought and design process.
(I generally agree that high-level design needs to be done before anything is typed, but sometimes, you do need to write prototypes and experimental code to see if this high-level idea actually works out; also, I prefer to design lower-level aspects such as the details of a C API for a library as I go, since this is much more efficient.)
→ More replies (4)10
u/HomemadeBananas Sep 25 '15
That's why I stopped using vim. My school does a good job of exposure to it, but I stopped liking it after my first couple of semesters of learning to program. I don't want to need a manual for my text editor or download addons and tweak the config all the time. I have stuff to get done.
→ More replies (16)2
u/snarfy Sep 25 '15
One argument I've heard for Vim (not sure I agree) is that it forces you to write code that is easy to debug, test, and reason about without a debugger. Why bother with all of this test code when you can just set a breakpoint?
4
Sep 25 '15
New people using Vim tend to think that without plugins you are too limited. That's wrong!
You already have built-in in Vim file browsing with netrw, you can use it for source code browsing.
You have code exploring, like going to definitions/declarations with ctags.
You can call any external methods like gcc or debuggers directly from within Vim.
Vim is so powerful without any plugins. Learn your built-ins. I highly recommend reading "Pactical Vim:Edit Text at the Speed of Thought" by Drew Neil before replacing Vim with plugins.
6
Sep 25 '15
You can call any external methods like gcc or debuggers directly from within Vim.
Those are the things you are trying to avoid in the first place. IDEs provide far more useable alternatives to them. I never, ever want to have to launch gdb ever again, it is a nightmare.
→ More replies (2)→ More replies (5)2
→ More replies (7)2
u/SirUtnut Sep 25 '15
It's not just about decreasing typing time. It's about allowing you to edit chide at the speed of thought. If you think of a great solution to a problem and need to type it up, it's really disruptive to the thought process to have to pause it for a bit while your hands catch up.
Vim only saves me a couple minutes per day, but they're the most important couple minutes.
26
u/jimbs Sep 25 '15
The first program I wrote with VI was a simulation that used lots of calculus and had many variable names liked dx, dy and dd.
After that, I could never use VI again.
14
199
u/char2 Sep 25 '15
Emacs user of >10 years here: Everything about this post works just as well (conceptually) with emacs. The old ways persist for a reason. Rock on, fellow stalwarts.
278
u/davros_ Sep 25 '15
Funny, it's no longer "vim vs emacs", it's "vim & emacs vs everyone else"
27
→ More replies (9)39
u/aaronsherman Sep 25 '15
Those of use who've been diehard vi and emacs users for 20+ years are glad to see that the world has caught up. :-)
12
u/postmodest Sep 25 '15
I used [l|x]emacs from 93 to 2008, then gave up and moved to NetBeans, then gave up and moved to IntelliJ. Now I use vim for editing "files beginning with '.' or ending with 'conf'". Just because vim is every-dang-where.
...I still can't do vim bindings in bash. That's just unnatural.
5
u/dpash Sep 25 '15
Amen that that brother. Vi bindings in readline is just weird. I tried it and I just didn't like it.
→ More replies (3)39
u/sethamin Sep 25 '15 edited Sep 25 '15
Sure. Just with more keystrokes and a meta key.
79
u/fermion72 Sep 25 '15
I'm a Vim guy. I teach an introduction to computer science course to 300 students. Last week I suggested that they all use emacs because I figured (1) insert mode screws with beginners and ctrl-x,ctrl-c is easy to learn, and (2) it will get me to learn emacs.
I'm in emacs hell right about now -- "Okay guys, to cut/paste, do ctrl-space, then select, then ctrl-y...I mean ctrl-w. Oh, and your Macs don't automatically map the Meta key, so you have to use ESC instead, but you don't hold down ESC like ctrl..." That fact that yank means exactly the opposite in emacs and Vim is boggling. Grr.
168
Sep 25 '15
I am going against my own personal feelings here, but why not just tell them to use notepad++ or an ide for whatever language they are using. For intro computer science you really don't need a good text editor, you need just the basics. Some will naturally gravitate towards them over time.
83
Sep 25 '15
I concur. It is such overkill to be teaching emacs/vim in comp sci 101. Why not just let them know about the options out there?
→ More replies (19)→ More replies (22)16
u/Sluisifer Sep 25 '15
There's only so much mental overhead space for learning new things. Don't clog it up by doing too much at once.
One of the things I like about the Learn ____ The Hard Way stuff is that he says just use Notepad++ or equivalent. Get some syntax highlighting and that's it.
→ More replies (2)7
u/arctander Sep 25 '15
If I may, a few things for teaching emacs:
The built in tutorial accessible via C-H t which works well only in 80x24 size windows :-(
Emacs in two pages just the first two pages of that page, not the seminar notes
Emacs is my go to editor for programming and writing a document of any significant length. Vi and it's cousin Vim, are there for anything quick and dirty. A modal editor just seems like 1979 or earlier.
The other thing that has been so darn handy with Emacs is its portability. I've run it under DOS (Lugaru Software version), VMS, Pyramid SysV, SunOS, MIPS OS, Linux, all the Unix's, Windows, Mac, and have never had to re-learn how to edit on a platform. I'm sure Vi/M is portable too these days. Anyway, its turtles all the way down.
→ More replies (1)→ More replies (5)20
u/austingwalters Sep 25 '15 edited Sep 25 '15
I'm glad to hear you suggested/told them to learn emacs. I've used both, but settled on Emacs while I was still in high school. It was always what I perceived as the most "hard core" programmers using. It taught me about lisp, and what not all before I entered college. More importantly, this decision helped me dramatically when I started a job after college.
When I started my first job after college there was a group of 13 of us, all just hired, and we were working with a director to "source" us (assign us to teams). Prior to assignment we were getting all the software we needed setup on our nice shinny new macs.
One question from the director was,
"what IDE's/text editor do you guys need?"
We went around the room:
"Sublime!", "IntelliJ!", "Eclipse!", "Sublime!", "Eclipse!", "Eclipse!", "Emacs!" ... silence
The director stopped the conversation, looked at me, and said:
"You've told me all I need to know"
The next day, I get placed to mentor several of the new hires (I also was the only one who new Rails, which was necessary for our project). Within a year I was promoted and officially a technical lead for a pretty large team at 23.
About a month after my promotion the director (now a VP) comes up to me at a Christmas party. Shakes my hand, congratulates me on the promotion, and tells me:
"I knew you could go far. If you can bend emacs to your will, you can do anything"
Quite honestly, I find the reality of things hard to believe myself... Truly, knowing emacs and the perception around it has put me in a great position already in my life. I'm definitely good at my job, but it's knowing emacs and using it in work, school, and every-day-life that put me in the position I am in.
Sure, it's hard as hell to break that learning curve (hell, I'm still learning), but if you can overcome it people often will respect you more. Plus, my favorite thing is writing my own modes. I keep my own version of github-style stats, logging my productivity in emacs (lines created/destroyed), auto run tests, send emails, format invoices, it's really amazing.
Anyways, thought I would share why I think it's great you're teaching the class emacs.
Edit: Grammar
→ More replies (6)11
u/Deathspiral222 Sep 25 '15 edited Sep 25 '15
I don't understand this thinking. It sounds like you were doing a lot of Java (thus the Eclipse and IntelliJ references) and honestly, an IDE is better than emacs or Vim when it comes to refactoring large codebases written in Java.
As a trivial example: take any large open source project written in Java and try to rename all references to a SPECIFIC function called foo() in emacs. There may be a dozen foo() functions in the codebase but we just want to refactor this particular name (hopefully to call it something other than foo().
This kind of thing takes two keystrokes in an IDE and it can take hours in an editor that doesn't understand the context of a language.
EDIT: I say this as someone who has a 600 line .vimrc file from years and years of tweaking, so I understand the value of vim/emacs.
→ More replies (12)4
u/vplatt Sep 25 '15
It works just as well with Eclipse. Or Visual Studio. Or IntelliJ. I know; I've used all three at various levels of keyboard-fu. But ... whatever. None of that matters. You can resort to mousing for everything and hunt and peck typing and be a better programmer than someone who spends all their time mastering an editor or IDE.
→ More replies (1)→ More replies (2)2
Sep 25 '15
... The problem is that many people don't recognize that your text editor may have more powerful features - they instead opt for shininess and similar things. Emacs and vim are very similar in that they're not trying to be WYSIWYG or anything close to it.
17
Sep 25 '15
Vim creep is what happened to my coworker who uses Rally (a truly disgusting piece of software) through a Vim plugin. It even does ASCII burndown charts. I'm a Vim cult member, but that's a whole new level.
5
u/TitsBurgers Sep 25 '15
I second Rally being awful. But we have some kind of partnership with them at HP. So I never said that.
→ More replies (2)6
Sep 25 '15
Yep. Literally the only reason we use it on our team is because our upper management spent TONS of money on it and insist that literally every team in the company use it so that the money isn't wasted. And also so they get their pretty dashboards.
Best part is that we're 100% research, so it's an exercise in bullshitting.
All the Rally devs dogfood it and claim it's the greatest shit ever. I wish I could meet one in person to see what a fucking failure of a human being looks like.
0
147
u/Darkmoth Sep 24 '15
A colleague of mine was talking up the virtues of Vim (we're a Windows shop), so in response I decided to learn all the keyboard commands of Visual Studio - there are eight-hundred and thirteen. I'm a perverse bastard.
I'm still working at it, but ye gods has using the keyboard made me faster. In Visual Studio. Run the test suite? BAM. Switch to Team window and commit? BAM. Switch tool windows? BAM taptaptap (don't ask).
Ironically, I have sort of convinced myself that my co-worker probably has a point.
147
u/jollybobbyroger Sep 24 '15
A big difference between Vim and your 813 hotkeys is that Vim has a structure to the key bindings. Where you have to memorize individual hotkeys for each command in VS, Vim commands are simple languages. So when you learn a new action or scope, you can combine that with everything else you already know.
E.g. I know how to indent the entire file. Cool. Then I learn about the block scope, so I immediately know how to indent the block. Then I learn how to format text to be confined within the set text width. Now I immediately know how to format the entire file and a text block. Then I learn about the "from cursor to character X" scope and now I can perform all known actions on this scope as well.
Note that the scopes are not like selections. They are controlled by keyboard input, even though in Vim, selections are just another action as well and now that I know the key for that, I know how to select any of the scopes I already know.
For VS and other IDE's and editors, each permutation of these scopes and actions would require its own hotkey, or it can only work with a selection and for that you have to spam
ctrl+arrow/pg{up,down}/{home,end}, which to a Vim user are clunky and imprecise.This is of course just scratching the surface of all the power of Vim that are accessible through a few key presses..
60
u/Darkmoth Sep 24 '15
A big difference between Vim and your 813 hotkeys is that Vim has a structure to the key bindings
No, I agree. That was my first thought when looking at them all. It'll take quite a while to memorize the ones I need (which isn't really all 813). To be fair, that also makes it funnier.
5
u/temp3298463 Sep 25 '15 edited Sep 25 '15
For VS and other IDE's and editors, each permutation of these scopes and actions would require its own hotkey, or it can only work with a selection and for that you have to spam ctrl+arrow/pg{up,down}/{home,end}
I don't know what other editors you're using, but mine lets me select a block, the entire file, or every occurance of a word with a single keystroke.
8
u/jollybobbyroger Sep 25 '15
What about "from the cursor to the {first,last} occurrence of character X", or within/around/surrounding the pair of quotes, parenthesis, html tag, brackets, sentence, function argument, block, paragraph .. ?
→ More replies (20)4
u/dpash Sep 25 '15 edited Sep 25 '15
Like when you learn about markers and then you're like "cool, I can reformat all the paragraphs from here to that marker I made earlier".
I can never remember how to make markers, which means I normally only ever use `` because I don't have an `a set. I should really look that up.
I do use Vim's block selection all the time. That's really handy.
→ More replies (1)6
u/blargtastic Sep 25 '15
Marks are insanely useful. How many times have you ever wanted to do something in one function that involves checking something from another? (Hint: all the time). Just do ma to set a as a mark right here and then go off and check the other function. Then do `a to return. The advantage is that in large files you often forget exactly where the original spot was when hunting down what you need to know, which wastes time.
→ More replies (5)→ More replies (11)9
Sep 25 '15
I don't use Vim itself (UI bugs me so I use Sublime Text with Vintageous) but I've always considered Vim's keybindings to be akin to a language.
4
u/tolos Sep 25 '15
"Your problem with Vim is that you don't grok vi."
akin to a language
I think most people would agree.
30
u/VanFailin Sep 25 '15
This is why I don't really care about vim. The message here isn't that vim is some sacred greatest editor ever, but that forcing yourself to fully learn your tools will produce better results than just getting good enough.
16
u/ChallengingJamJars Sep 25 '15
From another discussion, this learning-your-tools things includes things like word, it is a powerful document editor that some people think "just works", but then they run into all sorts of difficulties with formatting. But if you actually take the time learn what the internal model of a document is and work to that strength it is surprisingly good.
→ More replies (3)5
u/bilog78 Sep 25 '15
things like word, it is a powerful document editor that some people think "just works", but then they run into all sorts of difficulties with formatting. But if you actually take the time learn what the internal model of a document is and work to that strength it is surprisingly good.
Actually no. Yes, you can try and avoid many of the pitfalls of “naive” usage of Word, but even after you know it inside out it's not surprisingly good. Its internal model is fundamentally broken. Its editing capabilities are pitiful. Its formatting capabilities don't even match up with CSS2. A large part of this is that it tries to be too many things from a word processor to a desktop publishing application, failing miserably at all of them.
→ More replies (16)3
u/b-rat Sep 25 '15
They could've set the tone better from the start because it has nothing to do with producing 4 line vs 10 page solutions
→ More replies (1)→ More replies (24)2
u/pianohacker Sep 25 '15
That's a deeply crazy but entertaining quest.
So many mysteries like, "Why is Comment Selection bound to Ctrl-E Ctrl-C, Ctrl-E C, Ctrl-K Ctrl-C but not Ctrl-K C? Whoooo knows?"
0
39
u/Forbizzle Sep 25 '15
ITT, an argument older than the internet.
27
u/dpash Sep 25 '15
If it was vi vs Emacs, I'd agree, but they seemed to have teamed up and taken on everyone else.
→ More replies (3)
116
Sep 24 '15
I decided, about a year ago, after 20 years of working almost exclusively in vi and its spawn, to force myself to use emacs for a full year. I finally realized after 9 months that my productivity was so negatively impacted, I couldn't continue the experiment and finally let myself return to vi(m). God, it was a glorious feeling to come home.
43
u/ponkanpinoy Sep 25 '15
Your Stockholm syndrome is showing :p
I've used and enjoyed both, I eventually stuck with emacs for the interpreter integration and elisp.
13
u/BilgeXA Sep 24 '15
It only took you 9 months, eh?
→ More replies (2)145
u/thatfool Sep 24 '15
Sounds about normal. Most vi users take this long to figure out how to quit emacs.
→ More replies (1)53
u/captainjon Sep 25 '15
I still can't figure it out. Usually I log on a second shell and kill the pid.
→ More replies (12)→ More replies (14)5
u/robreim Sep 25 '15
I had the opposite experience, though I didn't use vim for nearly as long as you did. I used vim early in my unix days for around 4 years before deciding to try emacs. 10 years later I now find myself avoiding vim. I can use vim if I have to, but memories of accidentally typing without first putting myself in insert mode haunt me so much that, even if emacs is unavailable, I'd rather reach for nano for a quick system file edit.
"oh dear, what commands did I just run. Let's hit 'u' a few times. Seems ok? But how can I really be sure? sigh I'll just :q! and start over to be safe".
→ More replies (6)4
u/dpash Sep 25 '15
Modern versions of vim will tell you if you've undone everything since the last save. You can also use :e to reopen the file. Of course, you'll not remember this, because no one knows every vim command. I only remember :e every few years and it looks like I won't again for a few more now. :)
20
u/Blecki Sep 25 '15
I've never found the actual writing of the code to be such an arduous task that I need so much help formatting. Designing well takes far more effort than typing.
→ More replies (5)3
u/Rusky Sep 25 '15
It's not about being able to type quickly, it's about manipulating and navigating through the code without thinking too much about the mechanics of what you're doing.
Switching to the mouse or arrow keys and back is a lot more heavyweight than vim's combinations of normal-hand-position keyboard commands.
7
u/Blecki Sep 25 '15
I understand your argument. My point is that that doesn't matter because it's not a bottleneck. It's premature optimization.
→ More replies (1)
37
u/Merad Sep 25 '15
Eh, I've used vim for years, and it's my main text editor on linux, but it's just that - a text editor. I'll pop open vim to write a script in python or bash, or maybe a simple single file C program, but if I want to do serious development work I'd rather use a development environment, aka IDE.
→ More replies (1)4
u/cadekat Sep 25 '15
What do you need to consider it an IDE? Almost everything can be added with plugins.
Code Completion (plus navigation improvements)? YouCompleteMe
Integrated Build? makeshift
Syntax Checking? syntastic
Find in Files? Ag.vim
19
u/vplatt Sep 25 '15
How about method extraction with automatic parameter and return value creation? How about automatically adding imports I haven't added yet for a library function I'd decided to use?
Just curious. I haven't seen those abilities outside of IDEs.
→ More replies (1)35
u/Deathspiral222 Sep 25 '15
To me, an IDE needs to understand the meaning of the code, not just treat it as a bunch of symbols. I mentioned this in another comment, but in a large codebase, with twelve functions all called foo(), I want to refactor all references to THIS SPECIFIC method foo() to rename them to something else. IntelliJ can do this in a keypress but I've never found anyone who can do it in vim.
→ More replies (17)20
u/rycars Sep 25 '15
The vim users I know often don't seem to realize you can do things like this in an IDE. I don't know how I'd live without the ability to find all references or jump to definition with a couple key presses.
Vim-style editors for use within an IDE are news to me, though (obvious when you think about it, but it's never occurred to me before). I might have to try one out.
→ More replies (4)12
u/Merad Sep 25 '15
Basically what /u/Deathspiral222 said. Intelligent navigation, code generation, and refactoring are the big ones, IMO. My work environment is VS 2013 with R#, so I'm used to much more than that, but every IDE I've tried (Netbeans, Eclipse, IntelliJ, PyCharm) delivers on them in some form and I don't think I've ever seen vim or emacs set up with comparable features.
4
u/almond_butt Sep 25 '15
I need to be able to see call and type hierarchy, have run configurations, refactor smartly, provide default implementations, getters/setters, point out syntax errors, show lint warnings, build automatically with each save, organize imports, correctly import the right classes based on code, debugging with expressions/stepping, etc.
→ More replies (1)→ More replies (2)2
u/whichton Sep 25 '15
Thing is, typing is a very small part of coding, probably no more than 10%. 90% of coding is reading code, thinking, reasoning, debugging, testing, etc. Actual typing is very less. IDE helps with all of the above (except the thinking part). So even if you are a vim expert, it makes much more sense to install a vim mode for your IDE than go the other way.
172
Sep 24 '15
Horse. Shit.
Editors don't make you a better programmer.
143
23
93
u/the_dummy Sep 24 '15
The ability to perform complex and precise manipulations efficiently makes it easier, however.
→ More replies (28)31
13
u/mindbleach Sep 25 '15
Interfaces matter for productivity, focus, and frustration, and fuck anyone who thinks those aren't important to coding well.
→ More replies (3)17
u/Nyxisto Sep 24 '15
but the willingness to try out new stuff does. A good thing about learning editors like Vim is that in the process you figure out what tools work for you and which don't, you customize things to your liking and make your work environment your own. It might not even give you any objective advantage in the end, but experimenting instead of just going with the most convenient solution is part of what makes someone a good programmer.
→ More replies (1)7
u/millstone Sep 25 '15
Am I allowed to dislike vim? Or did I just give up too soon?
→ More replies (1)27
u/crowseldon Sep 25 '15
Horse. Shit.
The command line doesn't make you a better programmer...
Of course, you made a strawman out of this article and threw it down in a black or white way...
Let's ask the pragmatic programmer
Use a Single Editor Well The editor should be an extension of your hand; make sure your editor is configurable, extensible, and programmable.
So using a single editor well will improve your productivity overall (which doesn't mean you can't use other editors or IDEs).
As with the command line... it's a crucial tool and you might just be better overall because of it.
→ More replies (8)9
u/dpash Sep 25 '15 edited Sep 25 '15
I can't agree with this more. I've been using Vim for nigh on 18 years and wouldn't be without it except in one situation: Java development. The directory structure alone makes navigating the code a hassle without etags/ctags configured. It's just that IntelliJ knows far more context about my code than vim could.
But in every other situation, I use vim, whether I'm writing bash, Perl, puppet or an email. Hell I'll still drop back to the terminal and vim for some Java tasks, because I know in that particular instance, my knowledge lets me do that manipulation quicker, before switching back to the IDE.
I don't think I'd enjoy using vim as my IDE's editor, because I imagine it would be hard to access both the power of both successfully.
→ More replies (3)5
u/so_you_like_donuts Sep 25 '15
Have you looked into CtrlP and Eclim? I've been personally using them for quite some time for Java development and it works out quite well for me.
CtrlP is quite nice especially if you're dealing with a Gradle project with multiple subprojects (and it's fast like a bat out of hell).
For coding 95% of the time I need to do something Java-related I use the
:JavaImportOrganize,:JavaCorrectand:JavaRenamecommands provided by Eclim, then Alt+Tab to Eclipse for anything non-trivial.→ More replies (3)3
u/b-rat Sep 25 '15
I agree, we had lots of people who insisted on using vim or emacs and doing every assignment in them and they didn't produce code that was any better than what I threw together in.. I think I was using dev-c++ at the time or something, especially this whole "4 lines of code" vs "10 pages" thing at the start, it really sets a bad tone for the rest of the article.
5
u/zeug Sep 25 '15
You are correct, but vim and emacs tend to attract people who are or will become better programmers.
They are powerful, extensible, and have a steep learning curve. There is a decent overlap between the people who spend the time and even enjoy learning tools like this, and the people who tend to write well structured and performant code.
Correlation != causation, but the correlation is pretty strong IMO.
→ More replies (1)2
Sep 25 '15
You are correct, but vim and emacs tend to attract people who are or will become better programmers. They are powerful, extensible, and have a steep learning curve. There is a decent overlap between the people who spend the time and even enjoy learning tools like this, and the people who tend to write well structured and performant code.
Lol, that's a shit load to infer from an editor choice. Which one do you prefer?
→ More replies (4)4
35
Sep 25 '15
:wq?
:x, peasant.
12
8
u/MagicalVagina Sep 25 '15
:wq is easier on the fingers than x. At least on qwerty and colemak.
→ More replies (5)→ More replies (15)2
29
u/quicknir Sep 25 '15
The scenario outlined in the post of watching a power vim user and being so amazingly overawed with their key stroke power sounds like something a lot of vim users fantasize about but doesn't really happen in reality.
On the other hand, I have sat with emacs and vim people and showed them things in the code, and asked them to jump to a class or function definition, and watched them struggle to locate it.
If your language has good indexing and auto complete available and you are using something sub-par just to use vim or emacs, you are doing yourself a disservice. I'm not sure what intrinsically appeals to people so much about being "old school" that they would deprive themselves of so much useful functionality.
I use vim bindings in pycharm for python and vim bindings in Eclipse for C++. If I had to pick between the IDE and the vim keybindings I would choose in a heartbeat.
3
u/exex Sep 25 '15
I've seen it just once in action. One of our professors was explaining code and suddenly decided to change it. For a few seconds the text started flowing around the screen in a way that didn't seem to follow any rules except his thinking. Then he was done and the class was silent with awe. Nearly 2 decades later I've still not seen another person manipulate text like that. That memory makes me often question if I should invest more time into learning VIM (despite the big impression it made I didn't convert to it). Would it still make the same impression if I'd see it again today? I wonder about that as well...
3
u/kqr Sep 25 '15
The scenario outlined in the post of watching a power vim user and being so amazingly overawed with their key stroke power sounds like something a lot of vim users fantasize about but doesn't really happen in reality.
It does happen. At least three out of the... seven? Vim users I know personally use it because they saw someone else use it and they wanted to be able to manipulate code that way themselves.
8
u/zbobet2012 Sep 25 '15
Emacs and VIM have better autocomplete and code indexing tools then most IDE's. And those choices are pluggable. If you don't know about those tools, so much is the loss for you.
Consider YouCompleteMe for vim and company-irony for emacs.
3
Sep 25 '15
I think his point is also about not having to track all of these things down.
→ More replies (2)→ More replies (4)3
u/quicknir Sep 25 '15
Of course I know about those tools. I had YCM installed. It lacks things as basic as find references. Let alone call graphs, inheritance hierarchy, step by step macro expansion, etc. The fact that you think that these tools are better than a good IDE only shows that you have no idea what's going on with IDEs. Maybe you should give IDEs a proper chance before making comparisons; otherwise you run the risk of being called out by someone who's used both properly.
Rtags is the only emacs/vim system that comes close to a good modern ide (for C++). And it's a pain in the ass to setup, and still not nearly as good.
→ More replies (11)→ More replies (2)2
u/atilaneves Sep 25 '15
If someone can't easily jump to definition in Emacs, their configuration is... less than ideal. It's the same with "vim users" using arrow keys. They're not using it right.
4
u/Ironballs Sep 25 '15
Vim is a great editor but a shitty IDE. Thankfully Vim is available in every IDE these days. I use evil in Emacs, IdeaVim in IDEA, and VsVim in Visual Studio every day at work.
13
u/username223 Sep 25 '15
Is "vim creep" the guy with the handlebar mustache and plaid flannel, sitting behind his MacBook in the coffee shop masturbating to ASCII porn?
8
17
u/whackri Sep 25 '15 edited Jun 07 '24
doll onerous support aback rustic resolute violet straight plate squash
This post was mass deleted and anonymized with Redact
→ More replies (3)22
u/Rusky Sep 25 '15
A lot of it depends on the language. Trying to write Java in Vim is an exercise in frustration, but honestly that's more Java's fault for being so ceremonial.
→ More replies (5)5
u/deong Sep 25 '15
You're naming your packages wrong. They should be "package I.fucking.hate.you.you.verbose.pile.of.hippopotamus.shit.fuckup.of.a.language;"
Now at least typing a short story every time you need to interact with any aspect of the language is a tiny bit of catharsis.
→ More replies (2)
10
Sep 24 '15
I can relate. Learning Vim right now and at first it was a chore, but now it's starting to be more fun with each passing day :)
10
u/antiquechrono Sep 25 '15
Here's a tip, if you haven't rebound esc you should put it on something easy to press. I have mine bound to jk so if you press j followed by k really quickly it does escape instead. If you want to play with that you can just type ":imap jk <Esc>" without the quotes and it will change the mapping till you close vim.
17
u/vplatt Sep 25 '15
Bind it to your CapsLock key. It's useless anyway.
29
→ More replies (11)6
u/thoomfish Sep 25 '15
Better yet, remap capslock to ctrl globally, and use Ctrl-[ as escape.
→ More replies (1)3
u/dpash Sep 25 '15
But then how do you move up and down the file? :P
My previous laptop had F1 far too close to escape. I had to rebind that fairly soon after getting it. There's only so many times you can scream in anger about opening the help pages instead of leaving insert mode.
→ More replies (2)→ More replies (1)2
2
u/ForeverAlot Sep 25 '15
Indeed, rebind
<Esc>-- I haveinoremap jf <Esc>after experimenting with several options -- but also learn to leverage<Leader>to define your own language for custom bindings. The default (\?) works poorly for my keyboard layout but<Space>has worked out well:map <Space> <Leader>, and then I have bindings likennoremap <Leader>fs :w!<CR>for "file-save". But see this note from my commit message:<Space> is typically mapped to move-right, the same action as the l motion key. I've used it as an alias for / for years, and that has worked well because that action does not time out.
<Leader> does time out, so simply redefining g:mapleader as <Space> will cause the original motion whenever the action times out. To avoid this, <Space> must further be bound to <nop>. Additionally, either "<Space>" must be escaped or a literal space character must be used:
nnoremap <Space> <nop> " These are equivalent. let g:mapleader = " " let g:mapleader = "\<Space>"Instead of this hassle, g:mapleader can be left alone and <Space> can be aliased to it. This will not cause the normal motion on time out, and it will display the command if showcmd is set.
6
3
u/ramenAtMidnight Sep 25 '15
So I've been using vim plugins inside Visual Studio and WebStorm.
The only downside is that I can't copy/paste my code to, say, Skype chat, and vice versa. Any suggestions on how to do it?
13
u/_lerp Sep 25 '15 edited Sep 25 '15
Short version: You need to copy/paste into the correct register, "+y and "+p copy and paste to the system clipboard respectively.
Long Version: To understand why you can't do this you need to understand how vim's copy/pasting works. First of all to be more true to vim copying is called yanking.
When you yank the text is put into something vim calls a register. A register is pretty much a place in which to store text. By default vim yanks into the unnamed register " and 0. However there are a whole lot more registers. You can pretty much use any character as a register. Some of the registers have a special meaning, such as the register + which is the system clipboard. The last bit to explain is the double quotes. This is simple the notation for telling vim a specific register to use for the subsequent command.
So "+y is saying Yank into the Register + (the system clipboard).
Once you understand registers and what commands write where you can do many useful things. For example the d and x commands write the text they delete to the 1-9 registers, 1 containing the last thing you deleted and the subsequent registers containing last 7 things you deleted in chronological order. But hold on, we know how to paste from a register! So "2p pastes the thing you deleted before that last deletion.
Further reading: http://vimdoc.sourceforge.net/htmldoc/change.html#registers
→ More replies (1)4
u/code-affinity Sep 25 '15 edited Sep 25 '15
If you want the Windows clipboard to be the default register for yanks and puts, add
set clipboard=unnamedto your _vsvimrc (for VsVim) or _viemurc (for ViEmu) or _vimrc or (for GVim for Windows).
*Edit: I don't know how to reconcile this with _lerp's claim that unnamed is already the default register, and that + is the system clipboard. All I know is, I've had thiss line in my _vsvimrc for a long time and I cut and paste between other applications and Visual Studio / VsVim all the time.
0
Sep 25 '15
[deleted]
2
u/the_dummy Sep 25 '15
That's just the terminal binding. Internally, p will 'paste' or 'put' something you've yanked or cut.
8
2
2
u/dmart914 Sep 25 '15
Speaking of Vim creep, I just started to notice many websites use j and k bindings for next/prev (Facebook, RES). I'm fairly new to Vim, so I'm not sure if that was inspired by some predecessor.
2
u/Amadan Sep 25 '15
No, J/K is Vi legacy, owing to this being the keyboard that Vi was first created on.
→ More replies (1)
2
u/mrafcho001 Sep 25 '15
My 2 favorite things about vim (besides everything everyone else has already mentioned) are:
No visual wasted space
Registers
Vim is just code from top to bottom, with 2 lines of space used for status line/command line. Some of my coworkers using various IDEs have so much shit taking away from the code editing area. I've seen some people only have as little as 16 lines of visible code. Not sure how anyone can work like that. I've tried using IDEs and I just can't configure them to be so distraction free as vim. Even if successful in closing all the GUI stuff, eventually some action will cause something to open up and would require manually closing it instead of going away when I'm done. With Vim all plugs that I use pop up for me to perform some action and vanish away when I'm done.
I regularly use 3-5 registers for copying and pasting stuff. In other editors copying and pasting is nothing short of a chore. I love being able to just copy everything I'll need once and paste any of it effortlessly.
15
u/OffbeatDrizzle Sep 24 '15
I don't understand how people can use vim to write code - intellisense is such a god send these days
55
u/LucHermitte Sep 24 '15
Intellisense like is available to vim as well. Check YouCompleteMe: https://github.com/Valloric/YouCompleteMe
8
7
u/rlbond86 Sep 25 '15
This is just code completion. IntelliSense does that, but also much more. It can tell me where a particular method is called in my code base - even if there are other classes with methods that have the same name. IntelliSense actually understands your code, not just its identifiers.
→ More replies (2)4
u/LucHermitte Sep 25 '15
It's a little bit more that code completion. Its IntelliSense feature is based on clang, but restricted to the current translation unit in C and C++.
clang is bringing a revolution to "old" editors. Code indexing is now available (a little bit with YCM, with clang-indexer as well (to be used with vim-clang) ; and last year at cppcon14, a google guy spoke about another clang based code indexer that they should opensource, well I'm still waiting for it as its should work better than clang-indexer that I'm not really maintaining right now).
I won't be surprised to see eventually clang based refactoring tools that we'll able to plug to from vim and emacs.→ More replies (2)→ More replies (3)2
8
8
u/codebje Sep 25 '15
I rely on intellisense for Java, not so much for Haskell. I think the language plays a large part in whether intellisense is useful.
As a contrast, in Java I find it a pain to manually import classes, often forgetting exactly where in the package hierarchy they are, so having IntelliJ do that for me is a god send. But in Haskell I usually only need a small number of imports, some generic ones like Monad, Applicative, List, and one or two for whatever libraries I might be using. That's easy to handle manually.
I don't depend so much on intellisense for Clojure hacking, either. Or JavaScript.
Come to think of it, I pretty much just use it for Java.
→ More replies (4)6
u/x-skeww Sep 25 '15
Well, of course you don't depend much on it for JavaScript because you can't depend on something which isn't there.
You have to use TypeScript or at least t.ds files for the libraries you're using in order to get decent tooling. You also need to use ES6 classes and modules.
With a jquery.d.ts file:
4
u/codebje Sep 25 '15
I am using IntelliSense as a proprietary eponym for the class of smart editing behaviours including autoformatting, code completion, documentation integration, and linting, rather than as the (I think) Visual Studio implementation of it.
And I can have all those things for JavaScript (I do use the linter part of it) but I don't miss not having them :-)
→ More replies (5)16
4
u/memgrind Sep 24 '15
I daily help people navigate mere 2 million lines of code, with heavy #ifdef and macros. Vim users eventually manage (with all usable plugins installed) if the darn thing is grep-able. Utterly fail if the block is #ifdef and inactive for the build, and miss all references generated from macros. Users of other editors, which lack strong intellisense, effectively require babysitting through the whole process.
Still, vim is the first thing I install on a machine. Practically irreplaceable when I get to view 1GB log-files, especially remotely.
→ More replies (4)17
Sep 25 '15
Intellisense is nothing special, it's just brand name for one of Microsoft's static analysis tool. Pretty much every compiler worth its salt provides the same functionality.
→ More replies (1)→ More replies (14)3
u/crowseldon Sep 25 '15
even in IDEs, I'll use vim plugins for keybindings and other goodies.
The ability to stay on the home row is just the tip of the iceberg for these editors but is still absolutely awesome.
3
u/FootbaII Sep 25 '15
along with a fine-tuned personalized .vimrc file onto a flash drive
Nope. Github dotconfig repository, dude!
2
u/krista_ Sep 25 '15
vim is pretty bad ass, and switching to it is a bit of a paradigm shift for some: using vim teaches being very deliberate, such as "i want to edit what is between the quotes", or " i want to delete 3 lines", and trains you think about each and every action
when i want to do more whimsical work, i use slickedit.
2
u/druidjc Sep 25 '15
I've never understood how people could have such rabid devotion to a text editor. Do these same people write lengthy paeans about the superiority of bifold wallets over trifold wallets or how their life has been measurably better since they switched fabric softeners from Downy to Snuggle?
2
Sep 25 '15
I used Vim for a few years but I stopped because it just has too many unintuitive quirks. It's also difficult for anyone else to use your computer and you end up relying on plug-ins of varying quality to make it work with various IDEs or other tools. Also, I noticed that many editing tasks were slower on vim because of the need to go into visual mode or add additional commands to copy into a buffer. Eight times out of ten if I was copying and pasting something, I wanted to keep whatever I copied into the buffer, not switch it out, and that means additional keystrokes. I might go back in the future, but I just don't know if it was worth all of the time I spent learning it. Maybe I'll give Sublime a try.
2
u/dpash Sep 25 '15
You know vim has around 30 clipboards, right? Including the three Xwindows clipboards. That's 29 more than most editors and only two keystrokes more.
2
Sep 25 '15
Right, but my point is that most of the time, I want to use what you might call traditional copying and pasting, so having to use two additional keystrokes to do something I do many times per day is annoying.
→ More replies (2)
2
u/awakehope Sep 25 '15
What a pile of crap. If you need a bloody vim in order to write proper code then you're not a programmer. If you can't write proper code in netbeans, sublime or atom and you think that using vim will make you a "codeguru" then you're absolutely wrong.
1
1
u/Fuzzy_Socrates Sep 25 '15
I never knew... all my friends use pico and nano, and I have always been giddy to show them something new I found in vim. I wanna go deeper now.
1
Sep 25 '15
The article mentions replacing Xcode's editor with MacVim - is that possible in the literal sense of the word or does it just mean that he edits source code in MacVim and uses Xcode for building etc?
(Same goes for Visual Studio, but I personally don't use that.)
AFAIK, Vim is not really pluggable. Are there some useful tips?
→ More replies (2)
1
u/mcilrain Sep 25 '15
A bluetooth keyboard that can fold up to fit in my pocket made me really appreciate vim when used on a mobile, don't think I'd ever use it on a desktop though.
1
Sep 25 '15 edited Sep 25 '15
NONONONONONONONONONONONONONO!!!!!!!!! whaling out loud, like a... whale, I guess
The last line f*d up the whole beautiful thing. It's not ":wq", it's ":x" (or ZZ, or a map, if you are really good).
1
u/Pik16 Sep 25 '15
I started using vim because I needed proper copying functionality that no other cli editor seemed to have.
1
u/mk_gecko Sep 25 '15
I'd like to also plug Midnight Commander (mc). I've just discovered how easy it is to use sh://computer to transfer files back and forth -- much easier that scp, sftp.
1
u/0b01010001 Sep 25 '15
So. Has anyone worked out a scheme to operate vim with an xbox controller yet?
1
u/Raknarg Sep 25 '15
Is it really insinuating that to be a good programmer you have to use vim? Seriously?
→ More replies (1)
1
u/wadawalnut Sep 25 '15
I thoroughly enjoyed reading that
2
u/sysop073 Sep 25 '15
All vim users did, that was the point. It's an article that says "if you use vim, you're a badass. Feel good about yourself", and lays it on almost comically thick. It contains no useful information other than "use vim"
→ More replies (1)
1
1
1
1
u/Malurth Sep 25 '15
Yeah I still don't buy the Vim/Emacs thing.
When writing/editing code I almost never think to myself, "gee, my ability to put text where I want it is so slow/cumbersome." It's plenty fast for me as is. I'll focus on learning to write better code, not memorizing keyboard shortcuts, thanks.
→ More replies (1)2
u/adr86 Sep 25 '15
The beauty of vim is that you don't have to memorize keyboard shortcuts. It lets you compose a small handful of them into a variety of different things as you need it. It is like a ten word vocabulary... much more than it appears on the surface since you can combine the words in so many ways.
1
u/lucicam Sep 25 '15
That... That was beautiful. The only article about a text editor that I've ever encountered that gave me groosebumps.
1
u/Gotebe Sep 25 '15
Writing an essay about a thing you love is cool.
However, not all things to love are borne equal ;-)
1
u/samsam_aha Sep 25 '15
I learned Emacs basics in a week. It's been 4 months with VIM and I still have to look at the cheat sheet.
1
u/shevegen Sep 26 '15
I am glad I got out of it.
It messes with your brain.
I don't want to become a slave to any editor - editors should stay out of my way. I want to create programs to simplify my life, not invest time to cater or invest more and more time into any editor, not necessarily vim alone.
In all those old comparisons of "vim versus emacs", only one thing was for sure: there were two losers duking it out.
1
u/phpdevster Sep 25 '15
I tell this story whenever I can. The first day at my first agency job, the tech lead on my project was like:
"Here's ubuntu. Here's vim. Have fun".
Up until that point I was a Windows Notepad++ scrub.
Changed my life.
96
u/comp-sci-fi Sep 25 '15
oblig learning curves http://farm4.staticflickr.com/3109/3251176498_c3485a55fb.jpg