Live data from Hacker News

Vim Creep

rudism.com

211–220 of 237 posts

Re: Vim Creep

#211

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's all about building up a maximally powerful keyboard text editor from potent primitives. When it comes to out-of-the-box editors, nothing gives more bang for the buck on arbitrary text files than vim. That's not to say it's the best overall. If you like to customize your environment, emacs is better. If you like tight OS integration and advanced GUI features, many editors are better. If you want the most producti…

Thanks. That's the best explanation I've ever heard. That makes sense!

Re: Vim Creep

#212
post #123

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,…

For me, it's about the interface. In descending order: intuitive, consistent, modular, comfortable, portable. Intuitive: most commands resemble natural language, without awkward or arbitrary mappings. For instance: - w: (forward) word; - cw: change (forward) word; - c2w: change 2 (forward) words; - 2cw: twice change word; - ciw: change inner word; There is no intervening translation. For instance, to change a word in…

Main stream editors work differently...

Change forward word is in a mainstream editor: [Shift]+[Ctrl]+[Right]

Change line: Home, [Shift]+[End]

...and so on...

Moreover you forgot to mention that you always need to switch modes...

Mainstream editors are pretty efficient, unfortunately in the UNIX World there are hardly any good ones. The best ones I can think of are Eclipse and gedit.

Unfortunately there is no Notepad++-like thing on UNIX. (And Kate just became messy and buggy when KDE4 came out.)

BTW: Has any vim fan ever used the refactoring feature in Eclipse? Or edited Code during runtime using the Graphical Debugger? I doubt it... ;-)

Re: Vim Creep

#213
post #164

Earlier quoted context omitted.

and Ctrl + R for redo.

... and this to go back to the state of the file 10 minutes ago: :earlier 10m and :later 10m to go back. Note: This is independent of undo/redo cycles as Vim keeps track of that in a tree-like structure. There's just no really great default way of accessing it. See Gundo for a plugin that tries to make it more accessible.

You just blew my mind.

Re: Vim Creep

#214

Earlier quoted context omitted.

As a heavy user of Sublime, Coda 2 and someone that is still getting to grips with vim, I'd say the real advantage of vim is you can do all of that over ssh with minimal keystrokes over a crappy connection.

You can use any editor over ssh these days. Just mount it with sshfs.

Sure, but you can't do low-latency screen-sharing inside a tmux session over sshfs.

Re: Vim Creep

#215
post #123

Earlier quoted context omitted.

For me, it's about the interface. In descending order: intuitive, consistent, modular, comfortable, portable. Intuitive: most commands resemble natural language, without awkward or arbitrary mappings. For instance: - w: (forward) word; - cw: change (forward) word; - c2w: change 2 (forward) words; - 2cw: twice change word; - ciw: change inner word; There is no intervening translation. For instance, to change a word in…

Main stream editors work differently... Change forward word is in a mainstream editor: [Shift]+[Ctrl]+[Right] Change line: Home, [Shift]+[End] ...and so on... Moreover you forgot to mention that you always need to switch modes... Mainstream editors are pretty efficient, unfortunately in the UNIX World there are hardly any good ones. The best ones I can think of are Eclipse and gedit. Unfortunately there is no Notepad…

> Main stream editors work differently... > Change forward word is in a mainstream editor: [Shift]+[Ctrl]+[Right]

I stand corrected.

> Change line: Home, [Shift]+[End]

Here there is a translation at work: the editor lacks an atomic "change line" command, so users resort to "move cursor to the beginning of line, then select text up to the end of the line", which is something you could do in Vim, too, if you wanted.

> Moreover you forgot to mention that you always need to switch modes...

I don't understand. Do you mean you have to switch between Insert and Normal mode? If so, this is where newbies - including me some years ago - make their bigger mistake: you don't linger in Insert mode, you hit Esc as soon as you end entering text. Either you are typing text, or you are in Normal mode. This is the reason you need the Esc key as easily accessible as possible. On my keyboard, it is on the Caps Lock key. And : is unshifted.

> BTW: Has any vim fan ever used the refactoring feature in Eclipse? Or edited Code during runtime using the Graphical Debugger? I doubt it... ;-)

I'm with you on this. Still, people confuse Vi-style editing with either Vim or other Vi clones. Vi-style editing is neither Vi nor Vim nor Elvis nor [name an editor]. I used Eclipse and Visual Studio, yes, and guess what: I had Vi-style-editing plugins on both. What people call "the best of both worlds".

EDIT: Vi-style editing rocks at editing text, which is a subset - or not the same - of editing code. A user editing code with a mainstream editor offering powerful code-completion and refactoring facilities may have at her disposal a more powerful tool than a user editing code with a Vi-style editor lacking such facilities.

Re: Vim Creep

#216
post #215

Earlier quoted context omitted.

Main stream editors work differently... Change forward word is in a mainstream editor: [Shift]+[Ctrl]+[Right] Change line: Home, [Shift]+[End] ...and so on... Moreover you forgot to mention that you always need to switch modes... Mainstream editors are pretty efficient, unfortunately in the UNIX World there are hardly any good ones. The best ones I can think of are Eclipse and gedit. Unfortunately there is no Notepad…

> Main stream editors work differently... > Change forward word is in a mainstream editor: [Shift]+[Ctrl]+[Right] I stand corrected. > Change line: Home, [Shift]+[End] Here there is a translation at work: the editor lacks an atomic "change line" command, so users resort to "move cursor to the beginning of line, then select text up to the end of the line", which is something you could do in Vim, too, if you wanted. >…

Sure, vi-style editing is something I also find awesome. The key combinations are really smart and I love the shortcuts D and dd, or search through a file with n and N.

And yes, vi(m) is inferior to much less sophisticated editors when it comes to juggling large chunks of code. Or maybe not...

Anyways, now that I have a Macbook, I need to learn vim because it lacks all the cool keys you have on a PC keyboard :D At least I'm now using at nearly as productively as gedit or the like. (On average)

BTW: This caps-look trick is awesome, I'll set it up now!

Re: Vim Creep

#217

Earlier quoted context omitted.

I don't understand vimmers, but I use Emacs and I can say that having your work environment be 100% programmable is pretty damned nice.

So what kind of stuff do you program inside of it? What kinds of problems do you solve? I mean, I've never really felt the need to program an add-on to text editor. I download syntax highlighting packages, and there are common macros like "remove trailing whitespace" already installed. Keyboard shortcuts can be changed in lots of editors and OS's. In the past, I've definitely been upset that a particular editor didn'…

"Keyboard shortcuts can be changed in lots of editors and OS's."

Yes, but you can't change the editing model as easily, e.g. converting a modeless editor in a modal one just by changing a few shortcuts.

My take is that there are two camps: people who adapt themselves to the tools they use and people who try to adapt their tools to their ways and their ever-changing view of the world. The former want the tool to help them to get things done, the latter want the tool to help them to get things done their own way. The former look at tools as tools, the latter look at tools as extensions of themselves.

Re: Vim Creep

#218

Earlier quoted context omitted.

Some of my coworkers use sublime, and have been very excited about it. I used vim for several years and use emacs now, so probably a hard sell. Still, I get curious when people are Really Excited about other editors (because there may be ideas worth stealing and adding to emacs ;) ). What's the "minimap", the scrollbar that is a shrunken version of the document? The "multiple carets" feature seems handy. Are there an…

Yes, the minimap is what you guessed it was. Other ST features that Vim/Emacs don’t have (by default, at least): • You can use proportional fonts (I use Verdana) • 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 filenames. • On a Mac with smooth scrolling, you can scroll smoothly pi…

"It’s too bad Sublime Text isn’t open source."

Bad bad bad, if you are investing time in mastering a tool which could disappear tomorrow, or take a direction you don't like. This is one of the strongest reasons I chose GNU Emacs as my editor. I remember how burned I was when Visual Studio moved from VBScript to .NET as its macro language. All the time I had invested in learning its macro system and in writing macros went down the drain. Never again.

"Its plugin API doesn’t allow setting tabstops manually, which I would like so I could write a plugin implementing true elastic tabstops."

Elastic tabstops are awesome. This is a feature I do miss in Emacs.

Re: Vim Creep

#219
post #203
post #199

Earlier quoted context omitted.

>> 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. Hav…

> Vimscript is not a general purpose programming language, but does the job of extending vim fine.

If you have the chance to choose to invest time in learning either a language to extend your editor or a general purpose language which you can use to extend your editor, which would be your best bet?

Re: Vim Creep

#220

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's all about building up a maximally powerful keyboard text editor from potent primitives. When it comes to out-of-the-box editors, nothing gives more bang for the buck on arbitrary text files than vim. That's not to say it's the best overall. If you like to customize your environment, emacs is better. If you like tight OS integration and advanced GUI features, many editors are better. If you want the most producti…

Thanks, I really appreciate how you broke it down. One thing that I was wondering about that you don't address directly is: how do you compile/execute your code? Do you have to exit vim every time, run your compile/execute command, then relaunch vim? Sorry if this is really specific.
Post reply on HN