map l
map h
map j
map k
map :splitj " Horizontal split
map :vsplitl " Vertical split
map :close
map K " Convert vertical to horizontal split
map > L " Convert horizontal to vertical splitVim Splits – Move Faster and More Naturally
11–20 of 68 posts
Re: Vim Splits – Move Faster and More Naturally
#12In addition to that, I can heartily recommend the ZoomWindowPlugin: https://github.com/skeept/dotvim/blob/master/plugin/ZoomWinP... Basically, if you have multiple split windows, it allows you to do a cmd+O to zoom the current split view (i.e. making it the only view visible). That's neat if there's something tricky going on (say a weird bug) and you want to focus just on this piece of code, without seeing anything e…
Any advantage to this plugin over mapping one key to ':tabopen' and another to ':tabclose %'? I have this in my .vimrc and it seems to get the same results: nmap :tabedit % nmap :tabclose
Edit re below: OK, good point. But I would still prefer the plugin (and plan to install it) because I just don't use tabs, preferring to stick with splits.
Re: Vim Splits – Move Faster and More Naturally
#13I am SO SATISFIED with my splits key remapping I have to share it: map l map h map j map k map :split j " Horizontal split map :vsplit l " Vertical split map :close map K " Convert vertical to horizontal split map > L " Convert horizontal to vertical split
Although I use M-- and M-| for vertical and horizontal splits.
Re: Vim Splits – Move Faster and More Naturally
#14Earlier quoted context omitted.
Any advantage to this plugin over mapping one key to ':tabopen' and another to ':tabclose %'? I have this in my .vimrc and it seems to get the same results: nmap :tabedit % nmap :tabclose
Splits are not tabs. Edit re below: OK, good point. But I would still prefer the plugin (and plan to install it) because I just don't use tabs, preferring to stick with splits.
Open your split as a new tab. The new tab (i.e. that split) takes up all of vim. When you want to return to your splits, just close that tab.
Re: Vim Splits – Move Faster and More Naturally
#15After years of abusing my little finger for using Ctrl & the RSI that goes with it, I tend to use alt/meta with my thumb more and more nowadays, for this I make it usable in insert mode also, this is probably one of the oldest bits of my .vimrc "quick window movements map map l map k map j map h imap li imap ki imap ji imap hi
Only problem with those imaps is that now you can't type ì, ë, ê, or è. Vim is pretty dumb about utf-8. I'd also suggest using instead of the ...i dance. Edit: "The way [Vim] stores alt+letter in its input queue collides with UTF-8/Unicode handling" -- LeoNerd in freenode/#vim at 2013-04-15 15:22:29
It might not work the way you prefer using your favorite input method, but vim allows you to enter any utf-8 character, and even has mnemonic digraphs for many you are most likely to want. To get è, for example, in input mode just type -k`e.
Re: Vim Splits – Move Faster and More Naturally
#16In addition to that, I can heartily recommend the ZoomWindowPlugin: https://github.com/skeept/dotvim/blob/master/plugin/ZoomWinP... Basically, if you have multiple split windows, it allows you to do a cmd+O to zoom the current split view (i.e. making it the only view visible). That's neat if there's something tricky going on (say a weird bug) and you want to focus just on this piece of code, without seeing anything e…
Any advantage to this plugin over mapping one key to ':tabopen' and another to ':tabclose %'? I have this in my .vimrc and it seems to get the same results: nmap :tabedit % nmap :tabclose
Re: Vim Splits – Move Faster and More Naturally
#17I am SO SATISFIED with my splits key remapping I have to share it: map l map h map j map k map :split j " Horizontal split map :vsplit l " Vertical split map :close map K " Convert vertical to horizontal split map > L " Convert horizontal to vertical split
I moved over to evil-mode (Vim emulation) in Emacs a couple of months ago and do most things the Vim way but some things are more efficient to do in a non-Vim manner and this is one of them. Although I use M-- and M-| for vertical and horizontal splits.
Re: Vim Splits – Move Faster and More Naturally
#18I am SO SATISFIED with my splits key remapping I have to share it: map l map h map j map k map :split j " Horizontal split map :vsplit l " Vertical split map :close map K " Convert vertical to horizontal split map > L " Convert horizontal to vertical split
HTH
Re: Vim Splits – Move Faster and More Naturally
#19Earlier quoted context omitted.
I moved over to evil-mode (Vim emulation) in Emacs a couple of months ago and do most things the Vim way but some things are more efficient to do in a non-Vim manner and this is one of them. Although I use M-- and M-| for vertical and horizontal splits.
+1 For evil-mode. I'm still using MacVim and Emacs+Evil side by side because many things that my vim does (via plugins etc) my emacs/evil doesn't do yet and I lack the time to research it all. But having elisp for extension is such a joy to use. I've dabbled a bit with evil, too, and I really like how easy it is to extend it.
Re: Vim Splits – Move Faster and More Naturally
#20Earlier quoted context omitted.
Only problem with those imaps is that now you can't type ì, ë, ê, or è. Vim is pretty dumb about utf-8. I'd also suggest using instead of the ...i dance. Edit: "The way [Vim] stores alt+letter in its input queue collides with UTF-8/Unicode handling" -- LeoNerd in freenode/#vim at 2013-04-15 15:22:29
"Vim is pretty dumb about utf-8." It might not work the way you prefer using your favorite input method, but vim allows you to enter any utf-8 character, and even has mnemonic digraphs for many you are most likely to want. To get è, for example, in input mode just type -k`e.