I use (Vim IMproved - not vi) vim all the time. I find it interesting to see what features other people tend to use in vim, there seems to be some minor differences in their workflows, but it's not clear who "wins" the productivity battle. I only use a very small number of it's features: * `:tabe` Create a new tab * `:e .` Start browsing files in that tab * `:w` Write the file * `:q` Quit the file (`:q!`, seriously,…
>Vim IMproved Oh, so you are using an improved version of Vi IMproved? ;)
Ten Years of Vim
51–60 of 123 posts
Re: Ten Years of Vim
#52I don't mean that rudely, it's just that emacs can do everything vim does & far more.
Re: Ten Years of Vim
#53Surprised to see that he's gone back to an empty vimrc after years with high customization. To me customization is such a great part of vim that I can't imagine being without it. For instance, I have shortcuts to find and replace on visual selection. I also have at least 5 plugins in my vimrc that are absolutely necessary for my workflow. Pure vim is nice if you need to occasionally edit files, but if you use it as y…
My experience has also been with a decaying amount of customization. As I get better with Vim I learn more and more how to do things in a "Vim-native" manner which I had previously needed plugins for. For example, when I first started using Vim, I relied heavily on NERDTree. These days, netrw works perfectly fine for me.
Re: Ten Years of Vim
#54"And I still can't find how to quit"
Re: Ten Years of Vim
#55One thing google can do that blows most peoples mind when I show them: Did you know vim supports time travel undo? Sometimes you do some things then undo and redo trying to get back to a certain point in time. In vim you can step forward and back through all this by doing "g-" or "g+" to travel backwards or forwards in time. Or you can say ":earlier 50s" to go back to where you were 50 seconds ago. Most editors treat…
All the JetBrains IDE's keep a history of your edits, I accidentally rm -rf'd the wrong dir and reverted my code back thanks to JetBrains. I can't imagine vim saving your old files that have yet to be checked in to SVN / git (breaking changes anyone?) that you've not yet opened on vim. Funny you mention that though, a coworker opens files in vim and does changes and tests but keeps it open if he's going to try someth…
Re: Ten Years of Vim
#56Earlier quoted context omitted.
I'm guessing you mean "dd" and "yy" to delete/yank lines. "x" deletes a single character, what you mean extract a line? If you learn "w", which just means advance by a word, you can combine them with your existing knowledge for much better use. So "dw" becomes delete a word, or "d3w" means delete next 3 words. "v" is also useful in conjunction with "w" / "b".
'[d|c]iw', to delete/change the word your inside of is another small improvement.
Re: Ten Years of Vim
#57I read an article a few years ago, the name of which escapes me. It was something like “Idiomatic Vim” or “Linguistic Vim”. I would love to find that article again, if anyone happens to know based on the sparse info I’ve just provided, I would greatly appreciate it. One of the things I learned was that you can do things like yank to a character. In other words, if your cursor is at the beginning of “The quick brown f…
It’s full of tips on doing things “the Vim” way without plugins.
Re: Ten Years of Vim
#58Re: Ten Years of Vim
#59* Vim tends to be installed/available almost everywhere, Kakoune isn't
* Vim has a much bigger ecosystem
* There are some very advanced features hidden in vim that most people don't know about. If you depend on those, substituting vim with another editor can be hard.
Re: Ten Years of Vim
#60OP should consider using buffers: you can :ls to display the list of buffers (which I have mapped to gl ) and then :bn (where n is a buffer number) to go to some specific buffer. Also, in the same fashion of gt and gT for tabs, I mapped gb to go to the next buffer, gB to the previous one, and g space to go to the last one. IIRC all these key bindings are unused by default. In my opinion tabs are more useful/interesti…
map :tabn
map :tabp
I also alias ":split" to ":tabe", because my fingers will be forever wired to type ":split " when I want to open a new file. cnoreabbrev split tabe