Skip to content

Commit

Permalink
Fix #4 to allow alternative key maps again
Browse files Browse the repository at this point in the history
  • Loading branch information
Reed Esau committed Nov 9, 2014
1 parent 84fb671 commit e6258a5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
9 changes: 8 additions & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,20 @@ manager.

You can change the behavior of this plugin in your `.vimrc`:

For instance, you can change the default mappings:
For instance, the default mappings of:

```vim
let g:wheel#map#up = '<c-k>'
let g:wheel#map#down = '<c-j>'
```

...can be changed to use the Command key in MacVim:

```vim
let g:wheel#map#up = '<D-k>'
let g:wheel#map#down = '<D-j>'
```

If you have any existing mappings to `<c-k>` or `<c-j>`, they will be
preserved.

Expand Down
20 changes: 12 additions & 8 deletions plugin/wheel.vim
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,19 @@ if !exists('g:wheel#map#mouse')
let g:wheel#map#mouse = 1 " 1=natural, 0=disable, -1=reverse
endif

if !exists('g:wheel#map#up') && empty(maparg('<c-k>', 'n'))
let g:wheel#map#up = '<c-k>'
else
let g:wheel#map#up = ''
if !exists('g:wheel#map#up')
if empty(maparg('<c-k>', 'n'))
let g:wheel#map#up = '<c-k>'
else
let g:wheel#map#up = ''
en
endif
if !exists('g:wheel#map#down') && empty(maparg('<c-j>', 'n'))
let g:wheel#map#down = '<c-j>'
else
let g:wheel#map#down = ''
if !exists('g:wheel#map#down')
if empty(maparg('<c-j>', 'n'))
let g:wheel#map#down = '<c-j>'
else
let g:wheel#map#down = ''
en
endif

if !exists('g:wheel#map#left')
Expand Down

0 comments on commit e6258a5

Please sign in to comment.