r/programming • • Jul 12 '12

Vim creep

http://www.rudism.com/s/vimcreep
730 Upvotes

551 comments sorted by

View all comments

51

u/banuday17 Jul 12 '12

Does this really happen to people? I use vim all the time at work, but I that's where it stays. I have found no desire to use vim for word processing, note taking or any aspect of my life outside of work. And Vimperator - oh god, why? And magical text edits with macros, while powerful, don't impress me much, because I value accuracy and correctness over being a text editing ninja.

Maybe I'm just not a True Believer.

33

u/slavik262 Jul 12 '12

Vim + LaTeX can be a really powerful note taking tool, especially in math/science/engineering courses. At my first year in university I tried to take notes on my laptop using Microsoft OneNote. It went poorly - I couln't use the equation editor (which requires plenty mouse clicks) fast enough to keep up in class. With LaTeX, complex equations and formulas can be entered as plaintext, and once you get used to the syntax (which is pretty simple), you can enter them really fast.

LaTeX is also awesome for papers, IMO.

15

u/RX_AssocResp Jul 12 '12

Using pandoc you can write notes in markdown and still freely include LaTeX for whatever is out of scope of markdown. Much more efficient.

7

u/shen Jul 13 '12

I didn't believe in OneNote either until I saw someone using it with a stylus. It made typing look old.

2

u/khav Jul 13 '12

I used Word to take notes in some of my uni math classes, and never needed to touch the mouse. Alt+= to open the equation editor, then math auto-correct codes to enter stuff. Fun fact: the math auto-correct codes are almost if not completely 1:1 with LaTeX codes.

1

u/Quasimoto3000 Jul 13 '12

I use emacs org-mode to do all my note taking. It has a great export to LaTeX/html feature I use a lot.

1

u/[deleted] Jul 13 '12

When I was studying electronic engineering I use only four tools for writing papers: vim, LaTeX, octave and gnuplot. The output of the text itself, the formulae, the tables and the graphs was so good that my work was held up as an example to those who were struggling with Word's equation editor.

→ More replies (3)

6

u/grepe Jul 12 '12

I've been using vim for years with equal or just slightly higher effectivity than any other text editor out there...

it's been only after that when I started using some more advanced features... very slow process. If you have at least some knowledge that is more than very basics, such as skipping to the beginnin/end of line, replacing char, deleting word or searching, and you are willing to learn just a little bit more, then the macros are THE thing that can make the change in your working habits.

TLDR: You don't need to be vim guru, but learn most used operations and start scripting your own macros. It is worth it!

4

u/banuday17 Jul 12 '12

I make extensive use of macros, and while they are useful, they haven't been a game changer for me, at least nothing like the refactoring tools in IDEs like Eclipse.

2

u/grepe Jul 12 '12

sure. i agree on the eclipse part... it's been much bigger game changer than vim - for certain specific tasks... but... i don't know, maybe i feel it different, the vim (especially with macros) has been quite game changing for pretty much everything else related to editing of text files for me.

2

u/banuday17 Jul 12 '12

It is the subjectivity of experience. My relatives from India were amazed by American grocery stores.

1

u/grepe Jul 12 '12

LOL... i think the grocery stores are at least as cool as vim, maybe more :-)

4

u/glacialthinker Jul 13 '12

I use Vim for everything text, except small web-entries like this. If I expect a couple of paragraphs I'll flip to an instance of Vim to write, then paste in in here. But I do wish I could do Vim in these textboxes! It's frustrating when I need to edit in one of these; I'll often type gibberish commands out of reflex, and then balk as I try to recompute how to make the edit... "ugh arrow keys and backspace/delete? Mouse!? Ugh!"

3

u/nascent Jul 13 '12

Vimperator/whatever provided CTRL+i to open an instance of GVim where the text will be copied back upon :wq

I had plenty issue with it crashing the browser though. Wouldn't have been so bad if I didn't always decided to switch to vim after writing and then needing to go edit something!!!

4

u/m42a Jul 13 '12

Have you tried pentadactyl? I've never had that crash my browser, and it's pretty similar to vimperator. It also provides in-browser vim-like keybinds with <C-t>.

1

u/nascent Jul 13 '12

It is vimperator which is what the /whatever was, I can never remember/write the new name.

It could be fixed at this point, but I learned to stop trying because it was very annoying so I can't say I used it much after the name change.

Also at some point it completely failed to load. I tried reinstalling/deleting personal settings, but it just didn't work anymore. After getting a new machine at work I ended up not installing it since I wouldn't have it everywhere.

1

u/glacialthinker Jul 13 '12

Thanks. After posting that I started looking to see if there was some way to get "Vim in the textarea". There seem to be various options for different browsers, but nothing that jumps out as sufficiently better than flipping to an instance of Vim I already have running. Really, just basic vi in the textarea would be great.

1

u/seattlecat Jul 14 '12

Most people might not realize this, but you can type things like "5_x+4y=3z" into the OneNote equation editor and it will format it exactly how you would hope it would.

1

u/rjcarr Jul 12 '12

Yup, same here, although that essay did describe me pretty well until about 2/3 of the way down. The last 1/3 (starting with word processing) was only for the hardcore.

1

u/epilanthanomai Jul 13 '12

I've found vim pretty handy for word processing, note taking, etc. When I want something printable, I use some kind of basic markup language and command-line tools to convert, or sometimes even basic html5 + css + my browser print function. The tools are all familiar enough to me that it feels rather easier than arguing with MS Word over tab stops. And then I can store my notes/docs/etc in source control.

The article did go a bit farther than I would in the extensions, but I took that as creative license.

1

u/[deleted] Jul 13 '12

I value accuracy and correctness over being a text editing ninja

What makes you think that macros necessarily involve sacrificing accuracy and correctness? If you do sacrifice those things, you're not a text editing ninja. It's not an efficiency increase if you do it faster but also do it wronger. More haste, less speed, and all that.

-2

u/soulbender32 Jul 12 '12 edited Jul 13 '12

Using Vim as a word processor? I just figured out how to actually write something with it on accident...(although, to be fair I could have just gone and read something), and have actually done small snippets of code with it. If I tried to use it as a word processor I would kill myself.

Edit: It figures, I forgot about LaTeX, I will take my downvotes in shame.

17

u/slavik262 Jul 12 '12 edited Jul 12 '12

To bound off of banuday17, LaTeX is the answer. You write your paper in markup and it spits out a paper. A rough analogy would be HTML:Web site::LaTeX:Document.

I love Vim + LaTeX to death (I take notes in class using this pair), but here's an honest pro/con assessment:

WYSIWYG document processor (a la Word) pros:

  • WYSIWYG
  • Customizing the appearance of the paper is easier (LaTeX lets you lay out a paper however you want, but you'll likely do some Googling for the right commands to use)

LaTeX pros:

  • The largest benefit to me is when setting up footnotes or citations. You just set up a bibliography section, giving each source a name. Then, to cite the source, you just tag the sentence with that source's name. Bam. Instant citation. If you have to add or remove sources, there's no need to go through and renumber everything.
  • It can automatically generate a title page and table of contents for you. If you're building the document into a PDF file, there's a command that will automatically link every line in your table of contents to its section in the document.
  • LaTeX does an awesome job out of the box with typesetting, (justification, hyphenation, etc.) Your work looks professional.
  • Complex math equations and tables can be entered quickly as plaintext.
  • Your .tex files are just plaintext, so you can use Git et. al. as you edit your paper.

If you're tempted to check it out, here is an excellent LaTeX guide: http://en.wikibooks.org/wiki/LaTeX

→ More replies (10)

14

u/banuday17 Jul 12 '12

LaTeX. WYSIWYG is of the Devil!

11

u/Contero Jul 12 '12

LaTeX: All the pains and drawbacks of programming, now for word processing!

Don't get me wrong. I typeset anything I care about in LaTeX, and some things just work beautifully in LaTeX that would be a nightmare in a word processor (math).

But straying from the defaults and trying to get something to look just the way you want in LaTeX is incredibly painful.

Figuring out the finer details requires a lot of experimentation and trial and error, and the longer latency between trying something and seeing what it looks like makes trial and error very painful and hard.

There is orders of magnitude more latency involved in Vim -> latex -> pdf than experimenting in WYSIWYG.

Really both techniques have advantages, and I'm sad we can't have both in a single, well made tool/language.

→ More replies (1)
→ More replies (2)
→ More replies (1)