Live data from Hacker News

Vim: Takeaways from One Year of Typing

sankho.github.io

41–50 of 98 posts

Re: Vim: Takeaways from One Year of Typing

#41
The key to learning vim for me was to create my own vimrc from the ground up. I decided to not add anything to that file that I didn't understand what it was for. That and time. As long as you can open a file in vim, add a couple of lines of code and save it, you're good to go. Just keep using it and that vim magic will come to you ;)

Re: Vim: Takeaways from One Year of Typing

#42
There is another element in using Vim that's not mentioned -- it's a super fun journey, full of surprising discoveries, handsome rewards for a little effort, and generally the happy experience in continuous getting nice things from a seemingly inexhaustible source.

As an example, having used Vim for ten years, just within the last few weeks I started to seriously learn and use Ultisnips, SkyBison, Vim-swoop, etc. It has been pure fun and rewarding.

To be clear, I don't use that many plugins. Often time I discover something already built into Vim proper which can replace a plugin (after some light scripting/configurations), then I usually uninstall that plugin. This has happened more frequently in recent years, possibly because of my improved Vim-fu (still a mediocre user I am sure). So both productivity and portability get improved while I am having fun learning new things.

Re: Vim: Takeaways from One Year of Typing

#43
post #31

I've tried switching to VIM (from few years of using Sublime) few times already, but failed every single time: bare VIM is too dysfunctional to my taste and ways of working with text editor (missing tabs, file/folder treee view, easy switching documents, easy visual copy/paste and so on, missing code expanding/completion...). Last time I tried spf-vim[0] but while it looked 'cool' (it has colors, it does code complet…

Some thoughts: What you call tabs are what vim calls buffers. (EDIT vim has something called tabs as well but they do something else.) Completion press e.g. control-x (although I actually use a plugin here so I don't know how good vim's built in is). Visual selection add set mouse=a to the .vimrc Or using the "v" command

What he calls tabs are actually tabs: :tabe create tab :tabn next tab, :tabp previous tab, :tabm move tab.

I have tabn/tabp bound to l and h for easy nav and t for create.

Re: Vim: Takeaways from One Year of Typing

#44
Does anyone know if Vim has the power of multi line editing / multiple cursors like w/ Sublime Text? The large majority of my productivity involved copying and pasting with multi line select, and jumping words and different boundaries on multiple lines at once. Anything that matches ST for Vim?

Re: Vim: Takeaways from One Year of Typing

#45

For what it's worth, the author (sankho) mentions that he uses other editors for project-wide find and replace. This can be done in vim too (although I do not --- I'll return to this). You can check out the typically great vimcasts post on this: http://vimcasts.org/episodes/project-wide-find-and-replace/ For whatever reason, I find it easier to use commandline tools to do large search and replaces. I do embrace the v…

It's possible to run a macro on a list of files? I usually just open the files one by one and @@:wq (oops)

Re: Vim: Takeaways from One Year of Typing

#46
post #38
post #31

I've tried switching to VIM (from few years of using Sublime) few times already, but failed every single time: bare VIM is too dysfunctional to my taste and ways of working with text editor (missing tabs, file/folder treee view, easy switching documents, easy visual copy/paste and so on, missing code expanding/completion...). Last time I tried spf-vim[0] but while it looked 'cool' (it has colors, it does code complet…

One thing I'd stress: Start with Vim for side tasks, not to replace Sublime. Once you have the basics down, you can then layer on the IDE features (addons like Ag, NerdTree, CtrlP) that make Vim comparable to what you are used to in Sublime. I'm happy to act as a coach for you (and anyone else), if it's helpful. If you have a good plan of attack, you can get Sublime-like functionality pretty quickly.

+10 to the suggestion to layer IDE features progressively.

My setup is after trial and error: vim + (nerd tree, command-T, tagbar, Gundo) inside a tmux session. On another tmux window, I use 'find ... exec...' to search. So far excellent for me, I feel Zen like coding with this setup with no IDE noise :-).

Re: Vim: Takeaways from One Year of Typing

#47

Does anyone know if Vim has the power of multi line editing / multiple cursors like w/ Sublime Text? The large majority of my productivity involved copying and pasting with multi line select, and jumping words and different boundaries on multiple lines at once. Anything that matches ST for Vim?

I think there does exist a way to enter a visual block mode, but i is kind of a pain. You might try looking around for some third party modules. Here is one I found by doing a github search: https://github.com/terryma/vim-multiple-cursors

Re: Vim: Takeaways from One Year of Typing

#48
post #31

I've tried switching to VIM (from few years of using Sublime) few times already, but failed every single time: bare VIM is too dysfunctional to my taste and ways of working with text editor (missing tabs, file/folder treee view, easy switching documents, easy visual copy/paste and so on, missing code expanding/completion...). Last time I tried spf-vim[0] but while it looked 'cool' (it has colors, it does code complet…

In my personal experience (fwiw), people who try vim and don't get it either 1) just don't want/need what vim offers, or 2) don't approach it with the "vim is an editing language" approach.

If you're in the #1 camp, chalk it up to experience and move on.

Otherwise, at some point consider giving it another try, but Google up some articles specifically about the language aspect of vim. It's a lot easier to get up to speed and make better use of vim that way.

Re: Vim: Takeaways from One Year of Typing

#50

Does anyone know if Vim has the power of multi line editing / multiple cursors like w/ Sublime Text? The large majority of my productivity involved copying and pasting with multi line select, and jumping words and different boundaries on multiple lines at once. Anything that matches ST for Vim?

There is a plugin for that: https://github.com/terryma/vim-multiple-cursors

But I find that I can usually accomplish the same thing with macro or a targeted search and replace.

Post reply on HN