Live data from Hacker News

Vim 8.1

vim8.org

71–80 of 93 posts

Re: Vim 8.1

#71

Earlier quoted context omitted.

Completely agree. Use whatever you're comfortable with. No one should feel any shame for not using VIM/Emacs. But with that said, I feel like once you are comfortable with these tools, it's a more pleasurable experience.

They all do pretty much the same, just implemented in different ways. The only reason I tell people that vim is the better choice (when starting from scratch) is that Vi is on every unix system and it is nice to be able to work on any machine. If you don't plan on using unknown machines, do whatever works best for you.

>Vi is on every unix system

Except Debian's install CD. They only have nano.

Re: Vim 8.1

#72

After running :terminal, is there a way to yank text from my editor window and paste it into the terminal? Likewise, is there a way to copy text from the output of a command (run in the terminal) and paste it into the other window?

The default keybindings are ctrl-w "" (assuming you want to paste from " register - or * to paste from clipboard: ctrl-w " * ).

It's a shortcut for pasting.

Re: Vim 8.1

#73
post #70

Earlier quoted context omitted.

Path I took is to learn the basic movements. Then just put a sticky note with new commands each week. Whatever I didn't use I didn't commit to memory. But knowing commands exists helps.

looking to do this at an intermediate level. any commands you can recommend?

Star and hash - find previous and next match for word under cursor

n and N - find previous and next match for current search.

Re: Vim 8.1

#74
post #2

I want to learn Vim and tried several times (with vim modes form Intellij mainly) but failed under pressure to get actual things done. I see great potential and I know I have to sacrifice 1-2 month of productivity to get up to speed but I fail every time.

It's okay: We all did.

Re: Vim 8.1

#75
post #61

Earlier quoted context omitted.

Same here, I've been using Vim for a long time. The main reason is that I touch type and I really don't like to use the arrow keys. However, I really wonder if I'm really more productive using Vim rather standard shortcuts plus the trackpad.

I know im vim'ing wrong, but I just can't stop using arrow keys. Part of it is because I end up navigating around a little bit in insert mode sometimes, and switching between arrow keys for insert mode ans hjkl for other modes seems dumb. I don't have a problem using hjkl, I guess my problem is NOT needing to move around inside insert mode. Tips?

iNavigating in insert mode is your problem.ESCo

iThe default mode is called "normal mode" for a reason.ESC:wq

Re: Vim 8.1

#76
post #70

Earlier quoted context omitted.

Path I took is to learn the basic movements. Then just put a sticky note with new commands each week. Whatever I didn't use I didn't commit to memory. But knowing commands exists helps.

looking to do this at an intermediate level. any commands you can recommend?

Make sure you know your buffers and marks.

Also make sure you understand the difference between u/CTRL-R and g+/g-.

Macros (q) are also useful. Also, v, V, CTRL-V for selections. And gv to re-select previous selected area and gn / gN to operate on the next/previous match.

Re: Vim 8.1

#77
So, competition is good. Neovim introduces async. Bram, after years of refusing to do it, releases vim 8 with async. Neovim introduced an embedded terminal. Bram thereafter introduces an embedded terminal in 8.1. I'll be curious to see how close the two implementations are to each other.

Re: Vim 8.1

#78
post #12

Earlier quoted context omitted.

Use real vim, not emulators. Emulators all suck, and won't teach you the right habits. Vim is also extremely powerful when customized to your needs. Build your own setup over time. Start with vanilla vim and add to it over time. If anything annoys you and requires too much manual repetition, it can probably be automated and streamlined. Force yourself to use Vim for everything, and soon enough it'll be second nature.…

What, specifically, is the problem with emulators that make them not teach the right habits? I get that emulators are likely more bloated and have less features than real vim/neovim. But, to me, that's not a dealbreaker, especially since it can be really convenient to use an emulator in an IDE.

vim's feature-set is not just large -- it's vast. After 11+ years using it, I doubt I'm familiar with 1%.

There is no emulator that has that completeness. Most scarcely implement the beginner commands.

Re: Vim 8.1

#79
post #70

Earlier quoted context omitted.

Path I took is to learn the basic movements. Then just put a sticky note with new commands each week. Whatever I didn't use I didn't commit to memory. But knowing commands exists helps.

looking to do this at an intermediate level. any commands you can recommend?

By far I think the most over looked commands are the commands while in insert mode. They do the auto complete. They all follow this pattern letter.

Try out: l (line), n/p (next/previous instance of word), f (file)

Note that you can hammer these.

The next important thing I suggest is using buffers, splits, and marks.

Re: Vim 8.1

#80
post #50

After running :terminal, is there a way to yank text from my editor window and paste it into the terminal? Likewise, is there a way to copy text from the output of a command (run in the terminal) and paste it into the other window?

In a terminal window, you can type CTRL-W N (with upper case N) to switch the terminal to normal mode, where you can then move in the buffer and copy things in the terminal buffer using regular vim commands. You can go back to typing commands in the terminal by typing i or a (as when going in insert mode). You can paste in the terminal using CTRL-W " followed by the register name. See :help terminal

Thanks all!
Post reply on HN