Live data from Hacker News

Vim Recipes

vim.runpaint.org

11–20 of 28 posts

Re: Vim Recipes

#11
I just ran across the following, today:

Vim offers strong file encryption with Blowfish

http://blogs.techrepublic.com.com/security/?p=4870

Haven't looked into it much, yet. On a Windows machine, today, where I did notice that it seems to bork tab-based autocompletion when specifying a filename while saving (^I doesn't trigger autocompletion).

EDIT: Credit due to:

http://www.reddit.com/r/vim/comments/ey0ma/vim_offers_strong...

Re: Vim Recipes

#12
post #10
post #2

This is pretty nice! My wish for these types of things - can you just put out a big list key combos to browse through? I know the basic concepts of vim but I just want to see how the commands can be strung together. Something like: - ggVG: highlight the whole file - jj: escape (this is in my .vimrc, not standard) - xp: swap letters - vab: highlight an s-exp (inluding the parens) - gt: go to the next tab to the right…

Before I made a brief foray in the land emacs, I used tabs in VIM rather than leveraging the buffer system (I came from a Windows world, so I was used to tabs in other editors). Then emacs opened my eyes to magic of buffers, and when I returned to VIM (for various reasons), I found buffers to be better than tabs, especially once I first learned the commands, and then updated my .vimrc with a few useful shortcuts, par…

I checked out buffers - it's not clear to me why they are better than tabs. It seems like a different UI treatment for basically the same thing. Can you clue me in?

Re: Vim Recipes

#13
post #2

This is pretty nice! My wish for these types of things - can you just put out a big list key combos to browse through? I know the basic concepts of vim but I just want to see how the commands can be strung together. Something like: - ggVG: highlight the whole file - jj: escape (this is in my .vimrc, not standard) - xp: swap letters - vab: highlight an s-exp (inluding the parens) - gt: go to the next tab to the right…

gg=G: Autoformat the entire file. Useful to apply changes after changing tab options.

Re: Vim Recipes

#14

     Happy New Year◎,◎appy shopping
●---------------------------------------● ●------ http://goo.gl/l5v0b ------●

●------ http://goo.gl/l5v0b ------●

●------ http://goo.gl/l5v0b ------●

●------ http://goo.gl/l5v0b ------●

●------ http://goo.gl/l5v0b ------●

●------ http://goo.gl/l5v0b ------●

●------ http://goo.gl/l5v0b ------●

●------ http://goo.gl/l5v0b ------●

●------ http://goo.gl/l5v0b ------●

●------ http://goo.gl/l5v0b ------●

●------ http://goo.gl/l5v0b ------●

●------ http://goo.gl/l5v0b ------●

●------ http://goo.gl/l5v0b ------● ●---------------------------------------● Happy New Year◎,◎appy shopping

Re: Vim Recipes

#15
post #10
post #2

This is pretty nice! My wish for these types of things - can you just put out a big list key combos to browse through? I know the basic concepts of vim but I just want to see how the commands can be strung together. Something like: - ggVG: highlight the whole file - jj: escape (this is in my .vimrc, not standard) - xp: swap letters - vab: highlight an s-exp (inluding the parens) - gt: go to the next tab to the right…

Before I made a brief foray in the land emacs, I used tabs in VIM rather than leveraging the buffer system (I came from a Windows world, so I was used to tabs in other editors). Then emacs opened my eyes to magic of buffers, and when I returned to VIM (for various reasons), I found buffers to be better than tabs, especially once I first learned the commands, and then updated my .vimrc with a few useful shortcuts, par…

Please tell me the difference. All I see is that it's more difficult to switch when using buffers instead of tabs (have to press :, have to add ! if it's not saved).

Re: Vim Recipes

#16

I just ran across the following, today: Vim offers strong file encryption with Blowfish http://blogs.techrepublic.com.com/security/?p=4870 Haven't looked into it much, yet. On a Windows machine, today, where I did notice that it seems to bork tab-based autocompletion when specifying a filename while saving (^I doesn't trigger autocompletion). EDIT: Credit due to: http://www.reddit.com/r/vim/comments/ey0ma/vim_offers_…

Blowfish encryption (and persistent undo) came in 7.3:

https://groups.google.com/group/vim_announce/browse_thread/t...

Re: Vim Recipes

#17
post #12
post #10

Earlier quoted context omitted.

Before I made a brief foray in the land emacs, I used tabs in VIM rather than leveraging the buffer system (I came from a Windows world, so I was used to tabs in other editors). Then emacs opened my eyes to magic of buffers, and when I returned to VIM (for various reasons), I found buffers to be better than tabs, especially once I first learned the commands, and then updated my .vimrc with a few useful shortcuts, par…

I checked out buffers - it's not clear to me why they are better than tabs. It seems like a different UI treatment for basically the same thing. Can you clue me in?

Tabs are all about layout. Look into the windows (and how they fit in with buffers) and you'll start to notice the difference.

Basically, the only case where you should be using tabs is when you have several different arrangements of windows that you want to switch back and forth between.

Re: Vim Recipes

#18
post #10

Earlier quoted context omitted.

Before I made a brief foray in the land emacs, I used tabs in VIM rather than leveraging the buffer system (I came from a Windows world, so I was used to tabs in other editors). Then emacs opened my eyes to magic of buffers, and when I returned to VIM (for various reasons), I found buffers to be better than tabs, especially once I first learned the commands, and then updated my .vimrc with a few useful shortcuts, par…

Please tell me the difference. All I see is that it's more difficult to switch when using buffers instead of tabs (have to press :, have to add ! if it's not saved).

There are multiple plugins to cosmetically improve interaction with buffers, my favourite is minibufexplorer. Using tabs like you might in other editors is fine for a beginner, but once you begin to learn and use more advanced vim features you'll very quickly realize they don't scale.

Also, you should always make sure 'set hidden' is in your '~/.vimrc'. It's a crime that it's not default in my opinion. Takes care of the dumb "have to add ! if it's not saved)." thing.

Re: Vim Recipes

#19

Earlier quoted context omitted.

Please tell me the difference. All I see is that it's more difficult to switch when using buffers instead of tabs (have to press :, have to add ! if it's not saved).

There are multiple plugins to cosmetically improve interaction with buffers, my favourite is minibufexplorer. Using tabs like you might in other editors is fine for a beginner, but once you begin to learn and use more advanced vim features you'll very quickly realize they don't scale. Also, you should always make sure 'set hidden' is in your '~/.vimrc'. It's a crime that it's not default in my opinion. Takes care of…

Two words: FuzzyFinder.

Bind it to a key and switching between buffers (or on-disk files that are not even loaded) becomes as simple as typing a few letters of the filename.

No more scanning of abbreviated tab-labels, no more trial and error cycling through buffers. Highly recommended.

Re: Vim Recipes

#20
post #10
post #2

This is pretty nice! My wish for these types of things - can you just put out a big list key combos to browse through? I know the basic concepts of vim but I just want to see how the commands can be strung together. Something like: - ggVG: highlight the whole file - jj: escape (this is in my .vimrc, not standard) - xp: swap letters - vab: highlight an s-exp (inluding the parens) - gt: go to the next tab to the right…

Before I made a brief foray in the land emacs, I used tabs in VIM rather than leveraging the buffer system (I came from a Windows world, so I was used to tabs in other editors). Then emacs opened my eyes to magic of buffers, and when I returned to VIM (for various reasons), I found buffers to be better than tabs, especially once I first learned the commands, and then updated my .vimrc with a few useful shortcuts, par…

For any newbies who are curious what all this talk of buffers and tabs in vim is, check out:

http://img200.imageshack.us/img200/9031/windowsv.png

And, in vim you can type:

  :help buffers
and

  :help tab-page
Post reply on HN