I have hacked my tabline to be a list of my open buffers. It still functions as a tabline, for those of you who use tabs, but it's kinda nice to see all my open buffers in a nice list across the top of my screen. https://github.com/yramagicman/dotfiles/blob/master/.vim/aft...
How to boost your Vim productivity
81–90 of 130 posts
Re: How to boost your Vim productivity
#82The Space and Ctrl+Space thing is interesting, but not interesting enough for me to switch (from , and Ctrl+q – with Ctrl being on Caps Lock).
Re: How to boost your Vim productivity
#83Re: How to boost your Vim productivity
#84Re: How to boost your Vim productivity
#85>It seems like vvv is slower than vp but in practice I don’t need to think beforehand what to select, and what key combination to use.
The way I've always used vim and always thought it was intended to be used is that you do think beforehand. You sit at your editor, think about what changes you want to make, and then key in a set of precision commands in vim-editing-language and it happens.
>This way v replaces viw, vaw, vi", va", vi(, va(, vi[, va[, vi{, va{, vip, vap, vit, vat, ... you get the idea.
I kind of like the precision of having all of those different things, and of course the option of using them for more than just visual select but also change, delete, and so on. Although I suppose this doesn't remove any of those keymappings, I must protest remapping Ctrl+v: I can't even use an editor without block select.
I imagine there's a plugin (or even builtin feature) that at least generalises "s, (s , [s, tags and things of that sort though.
>Stop that stupid window from popping up: >map q: :q
I know it's a weird and irritating thing to have that window pop up when you meant to quit, but it's actually a very neat interface: a whole vim buffer for recomposing commands and your command history for later execution (almost acme-like). Give the poor guy a chance.
As a counterpoint to what I've pointed out above, I'd like to recommend Drew Neil's [Practical Vim](http://www.amazon.com/Practical-Vim-Thought-Pragmatic-Progra...) to anyone who hasn't read it already. It's got a lot of great content, and really goes a long way to explain vim's quirks and methods of doing things.
One of the useful tips I learnt from that was the ex command "normal", which allows you to execute a string of normal mode commands over a range of lines. So, for example, you can append a semicolon to each line in a visual selection by entering
:'%normal A;
A small thing, but one that I've used a lot since learning about it.Re: How to boost your Vim productivity
#86Earlier quoted context omitted.
Lord, that's so useful. I normally include a move to next line part in my macro and then guess at how many times to run it (20@q, repeat until I get it right). It's actually the main reason I often don't bother using macros. This is such a great tip. Thanks!
@@ applies the previously applied macro, so after applying the macro (including the move to next line, but see below too) you can you just hold down @ and quickly go through as many lines as you need. If you overshoot, you can just press u a few times. Another tip: when you forget to add the move to next line to your macro, you don't have to start over. You can append to a macro, just use the upper-case register name…
Re: How to boost your Vim productivity
#87I've been using vim for 15+ years now, since late 1990's. I use viemu in Visual Studio and I've written code in 10+ languages in vim. I've written non-trivial vimscripts and integration tools with other parts of my workflows over the years. I love how comfortable it feels, and I feel crippled when I have to use a 'normal' editor; like walking with a little pebble in your shoe - not a big a deal enough to prevent you from doing anything you could otherwise, but still damn uncomfortable.
With that said, I'm not convinced that I've actually saved time with it. I shudder if I think of the many man-days I spend 10 years ago on getting this and that plugin working, tweaking settings and keybindings for things I use twice a month tops and automating things that I could have done manually 10 times faster. It's not like regular editors are that much slower to use. It felt like throwing off a yoke when I dumped all those plugins so that I could focus on writing software, instead of tweaking the editor so that I could write programs with a few keystrokes.
So yeah, that was gramps' advice I guess...
Re: How to boost your Vim productivity
#88This post has some valuable tips (I'm probably going to try out as a leader), but one or two near the start rub me the wrong way in terms of how I use vim and how it's my impression that it's intended to be used. >It seems like vvv is slower than vp but in practice I don’t need to think beforehand what to select, and what key combination to use. The way I've always used vim and always thought it was intended to be us…
Re: How to boost your Vim productivity
#89Earlier quoted context omitted.
Additionally, on many keyboards (specifically Apple keyboards), you have to hit a modifier key plus the function key. For example, you have to hit Fn + F1 to get F1 because otherwise it's the "Lower LCD Brightness" hotkey. This makes them even less useful.
FYI: there is a setting that flips everything around – F1 to get F1, Fn+F1 to lower the brightness.
Re: How to boost your Vim productivity
#90Earlier quoted context omitted.
Additionally, on many keyboards (specifically Apple keyboards), you have to hit a modifier key plus the function key. For example, you have to hit Fn + F1 to get F1 because otherwise it's the "Lower LCD Brightness" hotkey. This makes them even less useful.
FYI: there is a setting that flips everything around – F1 to get F1, Fn+F1 to lower the brightness.