Live data from Hacker News

Vim for Humans

vimebook.com

171–180 of 251 posts

Re: Vim for Humans

#171
post #107
post #22

A little background. I am familiar with vi and use it only when I ssh into a server. But I never really felt it was more convenient or an improvement over a GUI based text editor or IDE on my development machine. Eg- gedit for simple text editing, Android Studio for android development, Atom for python coding. Everything works out of the box with minimal tweaking required. Genuine questions: -At what point on the lea…

This is exactly what I feel too. After watching Bret Victor's talk https://vimeo.com/67076984 , I feel like Vim way of using computers is backward. I am probably wrong because I never got proficient with Vim. Using it only when I SSH to remote server.

for text editing and specifically text editing code... vim's command set is amazing. it's short verbs for editing text that are easily remembered.

d delete

c change

t 'til

f find

a after

i insert

u undo

o open a new line

p paste or put

n next occurance

b back a word

y yank (copy)

v visual

ect.

coupled with an object that are less friendly to learn but there aren't that many of them

w word

e end of word

( sentence

{ paragraph

text blocks are directly what you want to change

" double quotes

' single quotes

( parenthesis

{ curly brackets

t tag

ci( change inside the (

da" deletes around the double quote, etc.

it's easy to compose sentences for editing text.

this person does more to explain why: http://stackoverflow.com/questions/1218390/what-is-your-most...

Re: Vim for Humans

#172
post #22

A little background. I am familiar with vi and use it only when I ssh into a server. But I never really felt it was more convenient or an improvement over a GUI based text editor or IDE on my development machine. Eg- gedit for simple text editing, Android Studio for android development, Atom for python coding. Everything works out of the box with minimal tweaking required. Genuine questions: -At what point on the lea…

Another feature is that it's the easiest editor to configure and extend to be just how you like it. Parsing company specific log files for example, can be done in a few lines of code.

Re: Vim for Humans

#173
post #5

Earlier quoted context omitted.

I kind of agree but vim's defaults are awful. Tim Pope has put together a good set of non-opinionated defaults which don't change key bindings or customize it otherwise [0]. I have a very similar vanilla setup with no plugins apart from syntax highlighting for some languages not included by default. [0] https://github.com/tpope/vim-sensible

That's why Neovim carefully implemented[1] most of the defaults (and a few others) from sensible.vim. [1] https://github.com/neovim/neovim/issues/2676

Which would you recommend more out of Neovim, or vim with sensible.vim?

Re: Vim for Humans

#174
post #5

Earlier quoted context omitted.

I kind of agree but vim's defaults are awful. Tim Pope has put together a good set of non-opinionated defaults which don't change key bindings or customize it otherwise [0]. I have a very similar vanilla setup with no plugins apart from syntax highlighting for some languages not included by default. [0] https://github.com/tpope/vim-sensible

That may be, but it's tough to use a customized vim on your local machine, and then switch to a stock install on a server somewhere, no?

I don't think it's very hard to switch to stock vim, when the keybindings remain the same. Most of the customisations commonly used are either cosmetic (syntax highlighting, brace matching, search-as-you-type, etc) or don't require much adjustment (delete through all text, etc).

Re: Vim for Humans

#175
post #3

I've only skimmed this but there seems to be a focus on customizing and plugins from the get go. I think it's worth getting to know Vim "as is" before doing such things. Indeed there certainly some things that aren't the most useful or obvious but it's good to understand their original intent. Not to crap on the author of this but I'd recommend Drew Neil's Practical Vim over this (and pretty much every other Vim book…

I disagree. Vim is bare, cold, and strange when coming from a traditional editor, and I probably wouldn't have gotten involved if it were not for a friend who already have a useful .vim and .vimrc for me to use as a starting point. He got me up and running with a Vundle, syntax highlighting for all my languages, autocomplete, and various settings that should have been default with stock vim. Though vimtutor was also…

I avoided vim for years after being introduced to vi at university, not realising vim could be customised to be much more comfortable and modern feeling.

Re: Vim for Humans

#176

Earlier quoted context omitted.

I must be weird or something but I've gone back and forth between vim and emacs for years before finally settling on just vi (Keith Bostic's nvi, to be exact). I've spent countless hours reading about and installing plugins on both of those big editors instead of just getting work done. Now that I just use vi, I realize how little of that stuff I need and how much I can get done with just macros and ! (the shell out…

I've encountered several quite painful behaviors of traditional vi that vim fixes. For instance, with traditional vi, if you start out changing a region, you can't move or change text outside that region without exiting insert mode.

I actually like that feature. I try to stay out of insert mode as much as possible. This feature lets me mash C-w or even C-u without worrying about changing text outside the original scope of my edit. I use the c command to change text inside of an html tag (for example) and I like that this protects me from damaging the tag itself.

Re: Vim for Humans

#177

Earlier quoted context omitted.

I'm curious: what do you use to enter insert mode then?

In default vim, i inserts to the left of the cursor. In ijkl, you simply map h to insert left of the cursor. It's even on the left of your new arrow keys so the mental map works better too! I'm a huge ijkl fan, because I learned wasd long before I learned vim.

Huh! This is really neat. Thanks for taking the time to evangelize. I might have to try this for a day.

Re: Vim for Humans

#178

Earlier quoted context omitted.

> NeoVim seems like a bit of a waste to me, because I think it misses the point. Vim is not a platform. Neovim is designed to be hosted (embedded). Embedding Neovim in a IDE (platform) allows Neovim to be the editor while exposing the IDE as "the platform". It's also a guiding principle of Neovim to not dictate what applications are built with it, so yes, you can leverage its API as a platform. But that's not the sin…

What's the process of embedding neovim into something like xcode? the thing that always got me confused is how the IDE would handle the text changing on an open file like that. What's the flow expected to be?

I'm guessing some kind of event system out of band that the IDE can hook into. Using the OS for that is probably too low level to provide the experience people expect. https://neovim.io/doc/user/msgpack_rpc.html

Re: Vim for Humans

#179
post #30

Wow this site doesn't work at all. I clicked on the "download the ebook" and nothing happened. Scrolled down, entered $0 and I get a blank page. Anything above $0, credit card form works fine.

Try disabling adblock/ghostery

Re: Vim for Humans

#180

> 3.5 Our first plugin: the file explorer it would be cool to be able to open files without having to do File -> Open using the menu bar How about using the :edit command? > 3.5.1 Plugin manager: Pathogen > 3.5.2 The NERD Tree: a file explorer The NERD Tree is a plugin that will allow you to display your directory and file tree directly in Vim > 4.1 Learning how to move Most distributions of vim include the netrw plu…

ctrl-p: https://github.com/ctrlpvim/ctrlp.vim
Post reply on HN