Permalink
Browse files

Merge pull request #309 from jonleighton/non_mac_mappings

Ported some of the MacVim mappings to work with GVim.
  • Loading branch information...
kalbasit committed Dec 6, 2011
2 parents 7ae0b49 + 704fec5 commit b328ed5e33566d769a99bc9b844bc7c507745ec6
Showing with 34 additions and 9 deletions.
  1. +4 −3 README.markdown
  2. +30 −6 gvimrc
View
@@ -197,7 +197,7 @@ Ack.vim uses ack to search inside the current directory for a pattern.
You can learn more about it with :help Ack
**Customizations**: Janus rebinds command-shift-f (`<D-F>`) to bring up
-`:Ack `.
+`:Ack `. [Ctrl-Shift-F (`<C-F>`) for GVim.]
## [Align](http://github.com/tsaleh/vim-align)
@@ -213,7 +213,7 @@ current working directory. It behaves similarly to command-t in
Textmate.
**Customizations**: Janus rebinds command-t (`<D-t>`) to bring up this
-plugin. It defaults to `<Leader>t`.
+plugin. [Ctrl-t (`<C-t>`) for GVim.] It defaults to `<Leader>t`.
## [ConqueTerm](http://code.google.com/p/conque/)
@@ -223,7 +223,8 @@ terminal like normal. You can also escape out of insert mode to use
other vim commands on the buffer, like yank and paste.
**Customizations**: Janus binds command-e (`<D-e>`) to bring up
-`:ConqueTerm bash --login` in the current buffer.
+`:ConqueTerm bash --login` in the current buffer. [Ctrl-e (`C-e`) for
+GVim.]
**Note**: To get colors working, you might have to `export TERM=xterm`
and use `ls -G` or `gls --color`
View
36 gvimrc
@@ -61,12 +61,36 @@ if has("gui_macvim")
imap <D-M-Right> <Esc> <C-w>l
map <D-M-Left> <C-w>h
imap <D-M-Left> <C-w>h
-
- " Adjust viewports to the same size
- map <Leader>= <C-w>=
- imap <Leader>= <Esc> <C-w>=
+else
+ " Ctrl-T for Command-T
+ map <C-t> :CommandT<CR>
+ imap <C-t> <Esc>:CommandT<CR>
+
+ " Ctrl-Shift-F for Ack
+ map <C-F> :Ack<space>
+
+ " Ctrl-e for ConqueTerm
+ map <C-e> :call StartTerm()<CR>
+
+ " Alt-][ to increase/decrease indentation
+ vmap <A-]> >gv
+ vmap <A-[> <gv
+
+ " Ctrl-Option-ArrowKey to switch viewports
+ map <C-S-Up> <C-w>k
+ imap <C-S-Up> <Esc> <C-w>k
+ map <C-S-Down> <C-w>j
+ imap <C-S-Down> <Esc> <C-w>j
+ map <C-S-Right> <C-w>l
+ imap <C-S-Right> <Esc> <C-w>l
+ map <C-S-Left> <C-w>h
+ imap <C-S-Left> <C-w>h
endif
+" Adjust viewports to the same size
+map <Leader>= <C-w>=
+imap <Leader>= <Esc> <C-w>=
+
" Don't beep
set visualbell
@@ -79,7 +103,7 @@ color ir_black
" ConqueTerm wrapper
function StartTerm()
execute 'ConqueTerm ' . $SHELL . ' --login'
- setlocal listchars=tab:\ \
+ setlocal listchars=tab:\ \
endfunction
" Project Tree
@@ -113,7 +137,7 @@ function s:CdIfDirectory(directory)
" Allows reading from stdin
" ex: git diff | mvim -R -
- if strlen(a:directory) == 0
+ if strlen(a:directory) == 0
return
endif

0 comments on commit b328ed5

Please sign in to comment.