Skip to content

Commit

Permalink
Remove unnecessary visual mode mappings
Browse files Browse the repository at this point in the history
Closes #9, reported by @justinmk.
  • Loading branch information
guns committed Mar 3, 2015
1 parent 0c81175 commit bdc9b74
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
11 changes: 9 additions & 2 deletions doc/vim-sexp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ WRAP COMMANDS (normal, visual)~
list, a space is conditionally appended after the opening bracket so
that any typed characters will be separated from the next element.

CURSOR INSERTION (normal, visual)~
CURSOR INSERTION (normal)~

<LocalLeader>h *<Plug>(sexp_insert_at_list_head)*
<LocalLeader>l *<Plug>(sexp_insert_at_list_tail)*
Expand All @@ -252,7 +252,8 @@ LIST MANIPULATION (normal, visual)~

<LocalLeader>@ *<Plug>(sexp_splice_list)*
Splice the current list (compound FORM) into its parent scope [count]
times by deleting each list's brackets.
times by deleting each list's brackets. This mapping is not available
in visual mode.

<LocalLeader>o *<Plug>(sexp_raise_list)*
<LocalLeader>O *<Plug>(sexp_raise_element)*
Expand Down Expand Up @@ -455,5 +456,11 @@ accurate and relatively quick, so it is the default setting.
" Default
let g:sexp_maxlines = -1
<
==============================================================================
IV. CHANGELOG *sexp-changelog*

03 March 2015
- Remove visual mode mappings from sexp_insert_at_list_head,
sexp_insert_at_list_tail, and sexp_splice_list.

vim:tw=78:et:sw=8:sts=8:ts=8:ft=help:norl:
9 changes: 3 additions & 6 deletions plugin/sexp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,9 @@ function! s:sexp_create_mappings()
endif
endfor

for plug in ['sexp_indent', 'sexp_indent_top']
for plug in ['sexp_indent', 'sexp_indent_top',
\ 'sexp_insert_at_list_head', 'sexp_insert_at_list_tail',
\ 'sexp_splice_list']
let lhs = get(g:sexp_mappings, plug, s:sexp_mappings[plug])
if !empty(lhs)
execute 'nmap <silent><buffer> ' . lhs . ' <Plug>(' . plug . ')'
Expand All @@ -218,8 +220,6 @@ function! s:sexp_create_mappings()
\ 'sexp_round_head_wrap_element', 'sexp_round_tail_wrap_element',
\ 'sexp_square_head_wrap_element', 'sexp_square_tail_wrap_element',
\ 'sexp_curly_head_wrap_element', 'sexp_curly_tail_wrap_element',
\ 'sexp_insert_at_list_head', 'sexp_insert_at_list_tail',
\ 'sexp_splice_list',
\ 'sexp_lift_list', 'sexp_lift_element',
\ 'sexp_raise_list', 'sexp_raise_element',
\ 'sexp_swap_list_backward', 'sexp_swap_list_forward',
Expand Down Expand Up @@ -358,9 +358,7 @@ Defplug xnoremap sexp_curly_tail_wrap_element sexp#wrap('v', '{', '}', 1, g:se
" Insert at list terminal
Defplug! nnoremap sexp_insert_at_list_head sexp#insert_at_list_terminal(0)
Defplug xnoremap sexp_insert_at_list_head sexp#insert_at_list_terminal(0)
Defplug! nnoremap sexp_insert_at_list_tail sexp#insert_at_list_terminal(1)
Defplug xnoremap sexp_insert_at_list_tail sexp#insert_at_list_terminal(1)
" Raise list
Defplug! nnoremap sexp_raise_list sexp#docount(v:count, 'sexp#raise', 'n', 'sexp#select_current_list', 'n', 0, 0)
Expand All @@ -370,7 +368,6 @@ Defplug xnoremap sexp_raise_element sexp#docount(v:count, 'sexp#raise', 'v', ''
" Splice list
Defplug! nnoremap sexp_splice_list sexp#splice_list(v:count)
Defplug xnoremap sexp_splice_list sexp#splice_list(v:count)
" Swap list
Defplug! nnoremap sexp_swap_list_backward sexp#docount(v:count, 'sexp#swap_element', 'n', 0, 1)
Expand Down

0 comments on commit bdc9b74

Please sign in to comment.