Live data from Hacker News

Vim Creep

rudism.com

201–210 of 237 posts

Re: Vim Creep

#201
Fully recognize I am outing myself here but the timing seems great given the Vim articles that have been coming up lately, as well as my Lead Engineer keeps bugging me to really get into Vim. I have used it before, but never GOT it. Is there an online guide that is great (and not just a story like this one) or do I need to get the O'Reily Vi and Vim book?

Re: Vim Creep

#202

Earlier quoted context omitted.

Wow. That guy's VimFu is crazy. I wish I was half as fast as he is.

Gary Bernhardt (guy doing that screencast) also does [Destroy All Software][1]. Lot of useful Ruby/Rails videos, done with vim. He's just as fast as this video, if not faster, and he doesn't slow down. [1]: http://destroyallsoftware.com/

Ah, I thought the voice was familiar. I like the fact that he types fast but mostly acts smooth. Very easy to follow.

side note, everyone has to watch his https://www.destroyallsoftware.com/talks/wat/ talk

Re: Vim Creep

#203
post #199
post #181

Earlier quoted context omitted.

> You can use proportional fonts (I use Verdana) Vim uses what my terminal uses. No ideas if my terminal(terminator) allows proportional fonts, but I always have used monospaced. Proportional looks ugly to me when it comes to code. > The interface chrome is graphical, not text in a grid. This allows nice details such as a drop-shadow from the minimap when it covers the text and proportional fonts in the file tree’s f…

>> It uses Python as its scripting language, so you can use Python libraries easily, and don’t have to learn an editor-specific language. Similarly, it uses JSON for settings. >Python is much more mainstream than vimscript, yes, but there are still people who don't know python and don't want to learn it. Learning python for them isn't very different from learning vimscript. You've quite obviously never tried to code…

> You've quite obviously never tried to code anything in vimscript, have an axe to grind with Python, or are Tim Pope

All your claims are preposterous. I have coded in Vimscript, I use Python and have no axe to grind; and I am not Tim Pope(duh).

> Vimscript is a horrible abomination that's painful to do just about anything in. Python is far, far superior.

I don't remember claiming Python is inferior to vimscript. Have you actually used vimscript, or are you speaking from superficial experience? Vimscript is not a general purpose programming language, but does the job of extending vim fine.

I was in middle of writing a small function which syncs up nerdtree highlighting with bufexplorer buffer switch(came here to take a break). Here is what it looks like:

    function! ChangeBuffer()
        if bufwinnr(t:NERDTreeBufName) != -1
            exe "normal! :NERDTreeFind\\\"
        endif
    endfunction
    let g:BufExplorerFuncRef = function('ChangeBuffer')

    
The amount of general purpose programming involved is minimal.

1. BufExplorer provides a hook which takes a function reference. A variable assignment.

2. If nerdtree is active(simple function call), call the command to find the current buffer in nerdtree(vim specific normal command execution), and switch back to editing pane(again normal mode command)

A good part of tasks make use of exe, nnoremap, iabbrev etc; and vimscript is powerful and pleasant enough for the rest(lists, dicts, simulated objects, variable namespacing...). It has it's quirks, but so has many mainstream languages - you know about the quirks when you are using the language, and avoid them.

Re: Vim Creep

#204

This feels like an article about a religion or cult, not a software program. I just don't get it. Ever since newer editors got block editing or multiple insertion cursors, and RegEx find & replace across multiple files, and searching filenames to open... I feel like I've already got everything I need! What am I missing out on? I don't feel like my text editor holds back my productivity. Using something like Sublime,…

It is in a sense. For some reason, vi[m] gets more play on this site, but pretty everything you can say about vim also applies to emacs, with one critical different (and the reason I switched): vi* is modal editing. Every report I've seen on the subject says that modal editing is a no-no. As a vi user, after seeing this for the first time I realized that, indeed, it had happened to me several times that I thought I was in text mode but was actually in command mode.... oops. I type 80+wpm so by the time realized the mistake I had trashed my file beyond recognition and had overran the undo buffer. There was nothing to do but lose all changes and start again.

This can't happen in emacs because editing isn't modal (though commands are very contextual). vi* is certainly easier on the hands than all the cording but getting rid of modal editing means no more wasting time when your brain is out of sync with the editor.

Having said all that, I'd still pick a nice IDE over either of them, since the IDE understands the language I'm editing and can e.g. change from simple minded "mass edits" to actual refactoring.

Re: Vim Creep

#206

Earlier quoted context omitted.

Exactly. This is one reason why I never tell people they are wrong regarding a choice of text editors. Keep in mind I usually have multiple VIM instances open and an instance of gedit (because I do some things that VIM is a little clumsy at regarding my todo list). What I usually say is something like: There are text editors and then there are text editors. If you are only spending a few hours a month in front of a t…

W.r.t your Todo list, have you tried VimOutliner? It's excellent for that, even having macros for checkboxes and such.

I haven't tried it. I will take a look. If it has a bunch of useful macros it might work. I might be able to program my own macros as well.

The thing is that Cut this text and past it here is still a very useful paradigm for my todo list, while remove line 47, change the "* " at the beginning of the line to "3) " and replace the current line starting with "3) " is a little less helpful. Note that items in the queue to make my short to-do list are coded either * for larger tasks or % for smaller ones. In theory VIM + macros would work. Just not sure I want to write the macros.

Re: Vim Creep

#207
post #79

This is an extremely awesome, fantastic, exhilarating use of hyperbole. What I gained from the article wasn't any explanation of why Vim is great; indeed, there was little included in this respect, aside from moving "entire blocks of code with the flick of a finger." Even the cool feeling of proficiency you get from knowing a tool well, and the fun of getting to show off a skill to a "how did he do that!?" audience w…

Just watch the video of the page http://blog.extracheese.org/2010/11/screencast-custom-vim-re... to get the gist of "entire blocks of code with the flick of a finger".

While, his vim skills are impressive, I question the value of "refactoring" your code to use magic numbers. Isn't this a big no-no in most code bases?

Re: Vim Creep

#208
post #125

Earlier quoted context omitted.

Brilliant people don't need to be brilliant in everything. You can use lesser tools and still accomplish a lot.

Or maybe they're not lesser tools.

Yes, but the set of brilliant people is larger than the set of brilliant people using the best tool in each area. We don't live in a perfect world, and brilliant people make trade-offs. Unless you know what kind of trade-offs they made, you can't generalize their choices. For instance, when Peter Norvig switched from Lisp to Python for his classes, many people argued that Python was an "acceptable Lisp". When asked about his decision, Norvig answered that Python was a better choice for his teaching goals, and nothing else.

Also, let's not confuse techniques with tools. It is unfortunate that, other than modal editing which is too generic, we don't have a name for Vi-style editing which does not involve Vi, so people confuse Vi-style editing (e.g. the technique), with Vi (e.g. the tool). The tool may have its own shortcomings which render it unsuitable.

Re: Vim Creep

#209
post #79

This is an extremely awesome, fantastic, exhilarating use of hyperbole. What I gained from the article wasn't any explanation of why Vim is great; indeed, there was little included in this respect, aside from moving "entire blocks of code with the flick of a finger." Even the cool feeling of proficiency you get from knowing a tool well, and the fun of getting to show off a skill to a "how did he do that!?" audience w…

Just watch the video of the page http://blog.extracheese.org/2010/11/screencast-custom-vim-re... to get the gist of "entire blocks of code with the flick of a finger".

Great screencast, and thanks for including it - but man, that guy really should get a quieter keyboard.

Re: Vim Creep

#210
post #121
post #104

Earlier quoted context omitted.

And he end it with :wq This part make me smile... Wonder what others tough when see that?

For rhetorical effect, `:wq` is right. But in the real world, `:x` is the better choice.

I still use `:wq` once every blue moon. Only out of habit though.
Post reply on HN