[vimchi] Fave Custom Key Mappings

0 views
Skip to first unread message

Fred

unread,
Apr 29, 2010, 10:25:18 AM4/29/10
to vimchicago
What are your fave key mappings?

Mine:

imap jj <Esc>
nmap <leader>w <C-w><C-w>_
nmap <silent> <Leader>n :NERDTreeToggle<CR>

Kent Cowgill

unread,
Apr 29, 2010, 10:38:43 AM4/29/10
to vimch...@googlegroups.com
On Thu, 29 Apr 2010 07:25:18 -0700 (PDT), Fred <lee.f...@gmail.com>
wrote:
> What are your fave key mappings?

I :split windows a lot and like an easy way to move between them:

" set some easy key mappings for switching buffers: when switching to a
buffer above or
" below, completely expand it, shrinking all others maximally
nmap <c-k> <c-w>k<c-w>_
nmap <c-j> <c-w>j<c-w>_

The above work best with:
" set a min window height for stacking windows
set wmh=0

The same idea for switching right/left :vsplit:
nmap <c-l> <c-w>l<c-w>\|
nmap <c-h> <c-w>h<c-w>\|
set wmw=0

My all time favorite maps a previously useless key (when writing code) to
something extremely useful:

" in insert mode, remaps tab to ctrl-n, for autocomplete
inoremap <Tab> <C-N>


--
Kent Cowgill ke...@c2group.net

http://kentcowgill.org/blog http://youtube.com/kcowgill
http://kentcowgill.org/photos http://flickr.com/people/kcowgill
Reply all
Reply to author
Forward
0 new messages